aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundMgr.cpp
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-01-25 02:38:18 +0100
committerthenecromancer <none@none>2010-01-25 02:38:18 +0100
commit9880a4985b6345ebad297dd9040fae1096d9abff (patch)
treebfac9297883d02250adb18d6908b9a7078f91ae4 /src/game/BattleGroundMgr.cpp
parent7aa63d583437c9171fda4fcb9ab51d24084c6e32 (diff)
Fix Rated Arena scores display (Matchmaking Value is not implemented)
--HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundMgr.cpp')
-rw-r--r--src/game/BattleGroundMgr.cpp15
1 files changed, 8 insertions, 7 deletions
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