mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
Minor changes for HandleBattleFieldPortOpcode
This commit is contained in:
@@ -433,6 +433,8 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
_player->SpawnCorpseBones();
|
||||
}
|
||||
|
||||
TeamId teamId = ginfo.teamId;
|
||||
|
||||
// remove player from all bg queues
|
||||
for (uint32 qslot = 0; qslot < PLAYER_MAX_BATTLEGROUND_QUEUES; ++qslot)
|
||||
if (BattlegroundQueueTypeId q = _player->GetBattlegroundQueueTypeId(qslot))
|
||||
@@ -443,10 +445,10 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
}
|
||||
|
||||
// send status packet
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType(), ginfo.teamId);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType(), teamId);
|
||||
SendPacket(&data);
|
||||
|
||||
_player->SetBattlegroundId(bg->GetInstanceID(), bg->GetBgTypeID(), queueSlot, true, bgTypeId == BATTLEGROUND_RB, ginfo.teamId);
|
||||
_player->SetBattlegroundId(bg->GetInstanceID(), bg->GetBgTypeID(), queueSlot, true, bgTypeId == BATTLEGROUND_RB, teamId);
|
||||
|
||||
sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user