Fix Rated Arena scores display (Matchmaking Value is not implemented)

--HG--
branch : trunk
This commit is contained in:
thenecromancer
2010-01-25 02:38:18 +01:00
parent 7aa63d5834
commit 9880a4985b

View File

@@ -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