mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10801] More ObjectGuid uses in battleground code.
This commit is contained in:
parent
6d13cd6553
commit
3de8212e03
12 changed files with 82 additions and 80 deletions
|
|
@ -350,7 +350,7 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
|
|||
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
|
||||
//we must use temporary variable, because GroupQueueInfo pointer can be deleted in BattleGroundQueue::RemovePlayer() function
|
||||
GroupQueueInfo ginfo;
|
||||
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
|
||||
if (!bgQueue.GetPlayerGroupInfoData(_player->GetObjectGuid(), &ginfo))
|
||||
{
|
||||
sLog.outError("BattlegroundHandler: itrplayerstatus not found.");
|
||||
return;
|
||||
|
|
@ -426,7 +426,7 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
|
|||
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType());
|
||||
_player->GetSession()->SendPacket(&data);
|
||||
// remove battleground queue status from BGmgr
|
||||
bgQueue.RemovePlayer(_player->GetGUID(), false);
|
||||
bgQueue.RemovePlayer(_player->GetObjectGuid(), false);
|
||||
// this is still needed here if battleground "jumping" shouldn't add deserter debuff
|
||||
// also this is required to prevent stuck at old battleground after SetBattleGroundId set to new
|
||||
if (BattleGround *currentBg = _player->GetBattleGround())
|
||||
|
|
@ -449,14 +449,14 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
|
|||
ArenaTeam * at = sObjectMgr.GetArenaTeamById(ginfo.ArenaTeamId);
|
||||
if (at)
|
||||
{
|
||||
DEBUG_LOG("UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
|
||||
DEBUG_LOG("UPDATING memberLost's personal arena rating for %s by opponents rating: %u, because he has left queue!", _player->GetGuidStr().c_str(), ginfo.OpponentsTeamRating);
|
||||
at->MemberLost(_player, ginfo.OpponentsTeamRating);
|
||||
at->SaveToDB();
|
||||
}
|
||||
}
|
||||
_player->RemoveBattleGroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs
|
||||
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_NONE, 0, 0, 0);
|
||||
bgQueue.RemovePlayer(_player->GetGUID(), true);
|
||||
bgQueue.RemovePlayer(_player->GetObjectGuid(), true);
|
||||
// player left queue, we should update it - do not update Arena Queue
|
||||
if (!ginfo.ArenaType)
|
||||
sBattleGroundMgr.ScheduleQueueUpdate(ginfo.ArenaTeamRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
|
||||
|
|
@ -523,7 +523,7 @@ void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
|
|||
//get GroupQueueInfo for queue status
|
||||
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
|
||||
GroupQueueInfo ginfo;
|
||||
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
|
||||
if (!bgQueue.GetPlayerGroupInfoData(_player->GetObjectGuid(), &ginfo))
|
||||
continue;
|
||||
if (ginfo.IsInvitedToBGInstanceGUID)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue