From 9174e5d085b887ff65516e2ba35b8edb3a8b5ef4 Mon Sep 17 00:00:00 2001 From: thenecromancer Date: Tue, 4 Jan 2011 02:52:32 +0300 Subject: [PATCH] [10955] Fixed MSG_PVP_LOG_DATA data prepering. Thnaks to Lightguard for not let this patch lst and prepare to recent sources. Signed-off-by: VladimirMangos --- src/game/BattleGroundMgr.cpp | 9 ++++++--- src/shared/revision_nr.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 69bb705d5..4936a9596 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1274,9 +1274,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 DEBUG_LOG("rating change: %d", bg->m_ArenaTeamRatingChanges[i]); } for(int i = 1; i >= 0; --i) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 7bb11c6f2..8ddbb8c87 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10954" + #define REVISION_NR "10955" #endif // __REVISION_NR_H__