Core: Cleanup locale handling.
It also fixes the recent problem of strange strings. --HG-- branch : trunk
This commit is contained in:
@@ -1634,7 +1634,7 @@ namespace Trinity
|
||||
public:
|
||||
MonsterChatBuilder(WorldObject const& obj, ChatMsg msgtype, int32 textId, uint32 language, uint64 targetGUID)
|
||||
: i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {}
|
||||
void operator()(WorldPacket& data, int32 loc_idx)
|
||||
void operator()(WorldPacket& data, LocaleConstant loc_idx)
|
||||
{
|
||||
char const* text = sObjectMgr.GetTrinityString(i_textId,loc_idx);
|
||||
|
||||
@@ -1715,7 +1715,7 @@ void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisp
|
||||
if (!player || !player->GetSession())
|
||||
return;
|
||||
|
||||
uint32 loc_idx = player->GetSession()->GetSessionDbLocaleIndex();
|
||||
LocaleConstant loc_idx = player->GetSession()->GetSessionDbLocaleIndex();
|
||||
char const* text = sObjectMgr.GetTrinityString(textId, loc_idx);
|
||||
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
|
||||
@@ -612,7 +612,7 @@ class WorldObject : public Object, public WorldLocation
|
||||
const char* GetName() const { return m_name.c_str(); }
|
||||
void SetName(const std::string& newname) { m_name=newname; }
|
||||
|
||||
virtual const char* GetNameForLocaleIdx(int32 /*locale_idx*/) const { return GetName(); }
|
||||
virtual const char* GetNameForLocaleIdx(LocaleConstant /*locale_idx*/) const { return GetName(); }
|
||||
|
||||
float GetDistance(const WorldObject *obj) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user