mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[7408] Fixed last hidden non-localized message case in BattleGround.cpp.
Note: 1) CHAT_MSG_BG_SYSTEM_NEUTRAL not dependent from target guid so use SendMessageToAll and cleanup code 2) BattleGround.cpp now not dependent from Chat.h
This commit is contained in:
parent
28a8e0c9cf
commit
cdf99bc169
2 changed files with 6 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue