aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnubisss <none@none>2010-02-23 18:18:00 +0100
committerAnubisss <none@none>2010-02-23 18:18:00 +0100
commitdeec58c8bdf9d3ca2475f582d849017423e79363 (patch)
tree59d61c6e2111b66c27067cb9d7f9e68750f99b59 /src
parentabd9ce7ad1e903cd54a9f205a391624cc32d4c0a (diff)
Properly show the ArenaTeam's name in arena join and leave.
Moreover, this fixes a crash in join/leave. Fixes issue #875. Fixes issue #878. These things happened when Arena.QueueAnnouncer.Enable = 1 in your config. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/BattleGroundMgr.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp
index f7d0e3e2293..864268fc07a 100644
--- a/src/game/BattleGroundMgr.cpp
+++ b/src/game/BattleGroundMgr.cpp
@@ -182,7 +182,9 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG
//announce world (this don't need mutex)
if (isRated && sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE))
{
- sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
+ ArenaTeam *Team = objmgr.GetArenaTeamById(arenateamid);
+ if(Team)
+ sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, Team->GetName().c_str(), ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
}
//add players from group to ginfo
@@ -374,7 +376,11 @@ void BattleGroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
// announce to world if arena team left queue for rated match, show only once
if (group->ArenaType && group->IsRated && group->Players.empty() && sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE))
- sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, group->ArenaType, group->ArenaType, group->ArenaTeamRating);
+ {
+ ArenaTeam *Team = objmgr.GetArenaTeamById(group->ArenaTeamId);
+ if(Team)
+ sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, Team->GetName().c_str(), group->ArenaType, group->ArenaType, group->ArenaTeamRating);
+ }
//if player leaves queue and he is invited to rated arena match, then he have to loose
if (group->IsInvitedToBGInstanceGUID && group->IsRated && decreaseInvitedCount)