Minor changes for HandleBattleFieldPortOpcode
This commit is contained in:
@@ -433,6 +433,8 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
|||||||
_player->SpawnCorpseBones();
|
_player->SpawnCorpseBones();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TeamId teamId = ginfo.teamId;
|
||||||
|
|
||||||
// remove player from all bg queues
|
// remove player from all bg queues
|
||||||
for (uint32 qslot = 0; qslot < PLAYER_MAX_BATTLEGROUND_QUEUES; ++qslot)
|
for (uint32 qslot = 0; qslot < PLAYER_MAX_BATTLEGROUND_QUEUES; ++qslot)
|
||||||
if (BattlegroundQueueTypeId q = _player->GetBattlegroundQueueTypeId(qslot))
|
if (BattlegroundQueueTypeId q = _player->GetBattlegroundQueueTypeId(qslot))
|
||||||
@@ -443,10 +445,10 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// send status packet
|
// 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);
|
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);
|
sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user