*Support localization for messsages in battleground. Author: VladimirMangos
[7411] Use similar localization classes for World::SendWorldText muti-line message. Author: VladimirMangos --HG-- branch : trunk
This commit is contained in:
@@ -584,5 +584,28 @@ void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p )
|
||||
p->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
#endif // TRINITY_GRIDNOTIFIERSIMPL_H
|
||||
template<class Builder>
|
||||
void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p )
|
||||
{
|
||||
uint32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
|
||||
uint32 cache_idx = loc_idx+1;
|
||||
WorldPacketList* data_list;
|
||||
|
||||
// create if not cached yet
|
||||
if(i_data_cache.size() < cache_idx+1 || i_data_cache[cache_idx].empty())
|
||||
{
|
||||
if(i_data_cache.size() < cache_idx+1)
|
||||
i_data_cache.resize(cache_idx+1);
|
||||
|
||||
data_list = &i_data_cache[cache_idx];
|
||||
|
||||
i_builder(*data_list,loc_idx);
|
||||
}
|
||||
else
|
||||
data_list = &i_data_cache[cache_idx];
|
||||
|
||||
for(size_t i = 0; i < data_list->size(); ++i)
|
||||
p->SendDirectMessage((*data_list)[i]);
|
||||
}
|
||||
|
||||
#endif // MANGOS_GRIDNOTIFIERSIMPL_H
|
||||
|
||||
Reference in New Issue
Block a user