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/BattleGround.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/game/BattleGround.cpp') diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index de9c0f6125d..554f8555627 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -36,7 +36,7 @@ #include "SpellAuras.h" #include "Util.h" -namespace MaNGOS +namespace Trinity { class BattleGroundChatBuilder { @@ -45,7 +45,7 @@ namespace MaNGOS : i_msgtype(msgtype), i_textId(textId), i_source(source), i_args(args) {} 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); if (i_args) { @@ -90,9 +90,9 @@ namespace MaNGOS : i_msgtype(msgtype), i_textId(textId), i_source(source), i_arg1(arg1), i_arg2(arg2) {} void operator()(WorldPacket& data, int32 loc_idx) { - char const* text = objmgr.GetMangosString(i_textId,loc_idx); - char const* arg1str = i_arg1 ? objmgr.GetMangosString(i_arg1,loc_idx) : ""; - char const* arg2str = i_arg2 ? objmgr.GetMangosString(i_arg2,loc_idx) : ""; + char const* text = objmgr.GetTrinityString(i_textId,loc_idx); + char const* arg1str = i_arg1 ? objmgr.GetTrinityString(i_arg1,loc_idx) : ""; + char const* arg2str = i_arg2 ? objmgr.GetTrinityString(i_arg2,loc_idx) : ""; char str [2048]; snprintf(str,2048,text, arg1str, arg2str ); @@ -116,7 +116,7 @@ namespace MaNGOS int32 i_arg1; int32 i_arg2; }; -} // namespace MaNGOS +} // namespace Trinity template void BattleGround::BroadcastWorker(Do& _do) @@ -820,7 +820,7 @@ void BattleGround::EndBattleGround(uint32 winner) uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const { //variable kills means how many honorable kills you scored (so we need kills * honor_for_one_kill) - return MaNGOS::Honor::hk_honor_at_level(GetMaxLevel(), kills); + return Trinity::Honor::hk_honor_at_level(GetMaxLevel(), kills); } uint32 BattleGround::GetBattlemasterEntry() const @@ -1692,8 +1692,8 @@ bool BattleGround::AddSpiritGuide(uint32 type, float x, float y, float z, float void BattleGround::SendMessageToAll(int32 entry, ChatMsg type, Player const* source) { - MaNGOS::BattleGroundChatBuilder bg_builder(type, entry, source); - MaNGOS::LocalizedPacketDo bg_do(bg_builder); + Trinity::BattleGroundChatBuilder bg_builder(type, entry, source); + Trinity::LocalizedPacketDo bg_do(bg_builder); BroadcastWorker(bg_do); } @@ -1702,8 +1702,8 @@ void BattleGround::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so va_list ap; va_start(ap, source); - MaNGOS::BattleGroundChatBuilder bg_builder(type, entry, source, &ap); - MaNGOS::LocalizedPacketDo bg_do(bg_builder); + Trinity::BattleGroundChatBuilder bg_builder(type, entry, source, &ap); + Trinity::LocalizedPacketDo bg_do(bg_builder); BroadcastWorker(bg_do); va_end(ap); @@ -1711,8 +1711,8 @@ void BattleGround::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so void BattleGround::SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 arg1, int32 arg2) { - MaNGOS::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2); - MaNGOS::LocalizedPacketDo bg_do(bg_builder); + Trinity::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2); + Trinity::LocalizedPacketDo bg_do(bg_builder); BroadcastWorker(bg_do); } -- cgit v1.2.3