mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[7180] 303 changes in PvpLogDataPacket.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
f3c5e60195
commit
a54586ed93
2 changed files with 13 additions and 21 deletions
|
|
@ -1242,17 +1242,18 @@ void BattleGroundMgr::BuildBattleGroundStatusPacket(WorldPacket *data, BattleGro
|
||||||
void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
||||||
{
|
{
|
||||||
uint8 type = (bg->isArena() ? 1 : 0);
|
uint8 type = (bg->isArena() ? 1 : 0);
|
||||||
// last check on 2.4.1
|
// last check on 3.0.3
|
||||||
data->Initialize(MSG_PVP_LOG_DATA, (1+1+4+40*bg->GetPlayerScoresSize()));
|
data->Initialize(MSG_PVP_LOG_DATA, (1+1+4+40*bg->GetPlayerScoresSize()));
|
||||||
*data << uint8(type); // seems to be type (battleground=0/arena=1)
|
*data << uint8(type); // type (battleground=0/arena=1)
|
||||||
|
|
||||||
if(type) // arena
|
if(type) // arena
|
||||||
{
|
{
|
||||||
// it seems this must be according to BG_WINNER_A/H and _NOT_ BG_TEAM_A/H
|
// it seems this must be according to BG_WINNER_A/H and _NOT_ BG_TEAM_A/H
|
||||||
for(int i = 1; i >= 0; --i)
|
for(int i = 1; i >= 0; --i)
|
||||||
{
|
{
|
||||||
*data << uint32(3000-bg->m_ArenaTeamRatingChanges[i]); // rating change: showed value - 3000
|
*data << uint32(bg->m_ArenaTeamRatingChanges[i]);
|
||||||
*data << uint32(3999); // huge thanks for TOM_RUS for this!
|
*data << uint32(3999); // huge thanks for TOM_RUS for this!
|
||||||
|
*data << uint32(0); // unknown - new in 3.0.3
|
||||||
sLog.outDebug("rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
|
sLog.outDebug("rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
|
||||||
}
|
}
|
||||||
for(int i = 1; i >= 0; --i)
|
for(int i = 1; i >= 0; --i)
|
||||||
|
|
@ -1266,9 +1267,9 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bg->GetWinner() == 2)
|
if(bg->GetStatus() != STATUS_WAIT_LEAVE)
|
||||||
{
|
{
|
||||||
*data << uint8(0); // bg in progress
|
*data << uint8(0); // bg not ended
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1282,9 +1283,6 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
||||||
{
|
{
|
||||||
*data << (uint64)itr->first;
|
*data << (uint64)itr->first;
|
||||||
*data << (int32)itr->second->KillingBlows;
|
*data << (int32)itr->second->KillingBlows;
|
||||||
Player *plr = objmgr.GetPlayer(itr->first);
|
|
||||||
uint32 team = bg->GetPlayerTeam(itr->first);
|
|
||||||
if(!team && plr) team = plr->GetTeam();
|
|
||||||
if(type == 0)
|
if(type == 0)
|
||||||
{
|
{
|
||||||
*data << (int32)itr->second->HonorableKills;
|
*data << (int32)itr->second->HonorableKills;
|
||||||
|
|
@ -1293,18 +1291,12 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// that part probably wrong
|
Player *plr = objmgr.GetPlayer(itr->first);
|
||||||
if(plr)
|
uint32 team = bg->GetPlayerTeam(itr->first);
|
||||||
{
|
if(!team && plr)
|
||||||
if(team == HORDE)
|
team = plr->GetTeam();
|
||||||
*data << uint8(0);
|
if( ( bg->GetWinner()==0 && team == ALLIANCE ) || ( bg->GetWinner()==1 && team==HORDE ) )
|
||||||
else if(team == ALLIANCE)
|
|
||||||
{
|
|
||||||
*data << uint8(1);
|
*data << uint8(1);
|
||||||
}
|
|
||||||
else
|
|
||||||
*data << uint8(0);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
*data << uint8(0);
|
*data << uint8(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7179"
|
#define REVISION_NR "7180"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue