From 6fe36efe0f2a05421965ad57c69b2f950a2cdb72 Mon Sep 17 00:00:00 2001 From: Rat Date: Sun, 20 Dec 2009 15:20:04 +0100 Subject: *apply trinity style to whole source *comment out all mangos to trinity defines *this will make merging a little harder, but code will be more clear --HG-- branch : trunk --- src/game/Object.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/game/Object.cpp') diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 3b976eb1d22..ea4f35dda82 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1513,7 +1513,7 @@ namespace Trinity : i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {} void operator()(WorldPacket& data, int32 loc_idx) { - char const* text = objmgr.GetMangosString(i_textId,loc_idx); + char const* text = objmgr.GetTrinityString(i_textId,loc_idx); // TODO: i_object.GetName() also must be localized? i_object.BuildMonsterChat(&data,i_msgtype,text,i_language,i_object.GetNameForLocaleIdx(loc_idx),i_targetGUID); @@ -1536,10 +1536,10 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid) cell.data.Part.reserved = ALL_DISTRICT; cell.SetNoCreate(); - MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid); - MaNGOS::LocalizedPacketDo say_do(say_build); - MaNGOS::PlayerDistWorker > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do); - TypeContainerVisitor >, WorldTypeMapContainer > message(say_worker); + Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid); + Trinity::LocalizedPacketDo say_do(say_build); + Trinity::PlayerDistWorker > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do); + TypeContainerVisitor >, WorldTypeMapContainer > message(say_worker); CellLock cell_lock(cell, p); cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY)); } @@ -1552,18 +1552,18 @@ void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid) cell.data.Part.reserved = ALL_DISTRICT; cell.SetNoCreate(); - MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid); - MaNGOS::LocalizedPacketDo say_do(say_build); - MaNGOS::PlayerDistWorker > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),say_do); - TypeContainerVisitor >, WorldTypeMapContainer > message(say_worker); + Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid); + Trinity::LocalizedPacketDo say_do(say_build); + Trinity::PlayerDistWorker > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),say_do); + TypeContainerVisitor >, WorldTypeMapContainer > message(say_worker); CellLock cell_lock(cell, p); cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL)); } void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid) { - MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid); - MaNGOS::LocalizedPacketDo say_do(say_build); + Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid); + Trinity::LocalizedPacketDo say_do(say_build); uint32 zoneid = GetZoneId(); @@ -1581,10 +1581,10 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE cell.data.Part.reserved = ALL_DISTRICT; cell.SetNoCreate(); - MaNGOS::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid); - MaNGOS::LocalizedPacketDo say_do(say_build); - MaNGOS::PlayerDistWorker > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do); - TypeContainerVisitor >, WorldTypeMapContainer > message(say_worker); + Trinity::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid); + Trinity::LocalizedPacketDo say_do(say_build); + Trinity::PlayerDistWorker > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do); + TypeContainerVisitor >, WorldTypeMapContainer > message(say_worker); CellLock cell_lock(cell, p); cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE)); } @@ -1998,7 +1998,7 @@ void WorldObject::GetCreatureListWithEntryInGrid(std::list& lList, ui } /* -namespace MaNGOS +namespace Trinity { class NearUsedPosDo { @@ -2067,7 +2067,7 @@ namespace MaNGOS float i_angle; ObjectPosSelector& i_selector; }; -} // namespace MaNGOS +} // namespace Trinity */ //=================================================================================================== @@ -2105,16 +2105,16 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y, // adding used positions around object { - CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY())); + CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY())); Cell cell(p); cell.data.Part.reserved = ALL_DISTRICT; cell.SetNoCreate(); - MaNGOS::NearUsedPosDo u_do(*this,searcher,absAngle,selector); - MaNGOS::WorldObjectWorker worker(this,u_do); + Trinity::NearUsedPosDo u_do(*this,searcher,absAngle,selector); + Trinity::WorldObjectWorker worker(this,u_do); - TypeContainerVisitor, GridTypeMapContainer > grid_obj_worker(worker); - TypeContainerVisitor, WorldTypeMapContainer > world_obj_worker(worker); + TypeContainerVisitor, GridTypeMapContainer > grid_obj_worker(worker); + TypeContainerVisitor, WorldTypeMapContainer > world_obj_worker(worker); CellLock cell_lock(cell, p); cell_lock->Visit(cell_lock, grid_obj_worker, *GetMap(), *this, distance2d); -- cgit v1.2.3