diff options
| author | Anubisss <none@none> | 2010-02-23 18:18:00 +0100 |
|---|---|---|
| committer | Anubisss <none@none> | 2010-02-23 18:18:00 +0100 |
| commit | deec58c8bdf9d3ca2475f582d849017423e79363 (patch) | |
| tree | 59d61c6e2111b66c27067cb9d7f9e68750f99b59 /src | |
| parent | abd9ce7ad1e903cd54a9f205a391624cc32d4c0a (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.cpp | 10 |
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) |
