Core/Battlegrounds: fixed sending battleground and arena windows via gossips and battleground portals

closes #42
This commit is contained in:
Ovahlord
2019-03-20 01:16:29 +01:00
parent 5b4c3e9d14
commit e1edf5c388
3 changed files with 4 additions and 4 deletions

View File

@@ -873,7 +873,7 @@ void BattlegroundMgr::LoadBattlegroundTemplates()
TC_LOG_INFO("server.loading", ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid guid, Player* player, BattlegroundTypeId bgTypeId)
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid guid, Player* player, BattlegroundTypeId bgTypeId, bool hideWindow /*= true*/)
{
if (!player)
return;
@@ -912,7 +912,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid
data->WriteBit(guid[3]);
data->WriteBit(0); // unk
data->WriteBit(guid[5]);
data->WriteBit(1); // hide battleground list window
data->WriteBit(hideWindow); // hide battleground list window
data->FlushBits();

View File

@@ -69,7 +69,7 @@ class TC_GAME_API BattlegroundMgr
/* Packet Building */
void BuildPlayerJoinedBattlegroundPacket(WorldPacket* data, ObjectGuid guid);
void BuildPlayerLeftBattlegroundPacket(WorldPacket* data, ObjectGuid guid);
void BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid guid, Player* player, BattlegroundTypeId bgTypeId);
void BuildBattlegroundListPacket(WorldPacket* data, ObjectGuid guid, Player* player, BattlegroundTypeId bgTypeId, bool hideWindow = true);
void BuildStatusFailedPacket(WorldPacket* data, Battleground* bg, Player* pPlayer, uint8 QueueSlot, GroupJoinBattlegroundResult result);
void BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value);
void BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, Player* player, uint8 queueSlot, uint8 statusId, uint32 time1, uint32 time2, uint8 arenaType);

View File

@@ -72,7 +72,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
void WorldSession::SendBattleGroundList(ObjectGuid guid, BattlegroundTypeId bgTypeId)
{
WorldPacket data;
sBattlegroundMgr->BuildBattlegroundListPacket(&data, guid, _player, bgTypeId);
sBattlegroundMgr->BuildBattlegroundListPacket(&data, guid, _player, bgTypeId, false);
SendPacket(&data);
}