diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 9dd3a4f3c..f8dce99f6 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -23,7 +23,6 @@ #include "Creature.h" #include "MapManager.h" #include "Language.h" -#include "Chat.h" #include "SpellAuras.h" #include "ArenaTeam.h" #include "World.h" @@ -577,15 +576,11 @@ void BattleGround::EndBattleGround(uint32 winner) uint32 loser_rating = 0; uint32 winner_rating = 0; WorldPacket data; - Player *Source = NULL; - const char *winmsg = ""; + int32 winmsg_id = 0; if(winner == ALLIANCE) { - if(isBattleGround()) - winmsg = GetMangosString(LANG_BG_A_WINS); - else - winmsg = GetMangosString(LANG_ARENA_GOLD_WINS); + winmsg_id = isBattleGround() ? LANG_BG_A_WINS : LANG_ARENA_GOLD_WINS; PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound @@ -593,10 +588,7 @@ void BattleGround::EndBattleGround(uint32 winner) } else if(winner == HORDE) { - if(isBattleGround()) - winmsg = GetMangosString(LANG_BG_H_WINS); - else - winmsg = GetMangosString(LANG_ARENA_GREEN_WINS); + winmsg_id = isBattleGround() ? LANG_BG_H_WINS : LANG_ARENA_GREEN_WINS; PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound @@ -681,8 +673,6 @@ void BattleGround::EndBattleGround(uint32 winner) if(team == winner) { - if(!Source) - Source = plr; RewardMark(plr,ITEM_WINNER_COUNT); UpdatePlayerScore(plr, SCORE_BONUS_HONOR, 20); RewardQuest(plr); @@ -722,11 +712,8 @@ void BattleGround::EndBattleGround(uint32 winner) // inform invited players about the removal sBattleGroundMgr.m_BattleGroundQueues[BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType())].BGEndedRemoveInvites(this); - if(Source) - { - ChatHandler(Source).FillMessageData(&data, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_UNIVERSAL, Source->GetGUID(), winmsg); - SendPacketToAll(&data); - } + if(winmsg_id) + SendMessageToAll(winmsg_id,CHAT_MSG_BG_SYSTEM_NEUTRAL); } uint32 BattleGround::GetBattlemasterEntry() const diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0bb62a1af..fdaaac390 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7407" + #define REVISION_NR "7408" #endif // __REVISION_NR_H__