mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-15 06:29:13 +01:00
Core/Battlegrounds: fixed sending battleground and arena windows via gossips and battleground portals
closes #42
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user