From 9880a4985b6345ebad297dd9040fae1096d9abff Mon Sep 17 00:00:00 2001 From: thenecromancer Date: Mon, 25 Jan 2010 02:38:18 +0100 Subject: Fix Rated Arena scores display (Matchmaking Value is not implemented) --HG-- branch : trunk --- src/game/BattleGroundMgr.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 84ab2ba9222..2ff0205fca7 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1298,9 +1298,12 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg) // it seems this must be according to BG_WINNER_A/H and _NOT_ BG_TEAM_A/H for (int i = 1; i >= 0; --i) { - *data << uint32(bg->m_ArenaTeamRatingChanges[i]); - *data << uint32(3999); // huge thanks for TOM_RUS for this! - *data << uint32(0); // added again in 3.1 + uint32 pointsLost = bg->m_ArenaTeamRatingChanges[i] < 0 ? abs(bg->m_ArenaTeamRatingChanges[i]) : 0; + uint32 pointsGained = bg->m_ArenaTeamRatingChanges[i] > 0 ? bg->m_ArenaTeamRatingChanges[i] : 0; + + *data << uint32(pointsLost); // Rating Lost + *data << uint32(pointsGained); // Rating gained + *data << uint32(0); // Matchmaking Value sLog.outDebug("rating change: %d", bg->m_ArenaTeamRatingChanges[i]); } for (int i = 1; i >= 0; --i) @@ -1342,10 +1345,8 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg) uint32 team = bg->GetPlayerTeam(itr->first); if (!team && plr) team = plr->GetTeam(); - if (( bg->GetWinner()==0 && team == ALLIANCE ) || ( bg->GetWinner()==1 && team==HORDE )) - *data << uint8(1); - else - *data << uint8(0); + *data << uint8(team == ALLIANCE ? 0 : 1); // green or yellow + } *data << (int32)itr->second->DamageDone; // damage done *data << (int32)itr->second->HealingDone; // healing done -- cgit v1.2.3