Merge pull request #14167 from Golrag/WorldStates
Core/Opcodes: SMSG_INIT_WORLD_STATES
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
Battlefield::Battlefield()
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "ZoneScript.h"
|
||||
#include "Packets/WorldStatePackets.h"
|
||||
|
||||
enum BattlefieldTypes
|
||||
{
|
||||
@@ -75,7 +76,7 @@ class BfCapturePoint
|
||||
|
||||
virtual ~BfCapturePoint() { }
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
|
||||
// Send world state update to all players present
|
||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||
@@ -317,7 +318,7 @@ class Battlefield : public ZoneScript
|
||||
|
||||
/// Send all worldstate data to all player in zone.
|
||||
virtual void SendInitWorldStatesToAll() = 0;
|
||||
virtual void FillInitialWorldStates(WorldPacket& /*data*/) = 0;
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) = 0;
|
||||
|
||||
/// Return if we can use mount in battlefield
|
||||
bool CanFlyIn() { return !m_isActive; }
|
||||
|
||||
@@ -807,40 +807,39 @@ uint32 BattlefieldWG::GetData(uint32 data) const
|
||||
}
|
||||
|
||||
|
||||
void BattlefieldWG::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlefieldWG::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_ATTACKER) << uint32(GetAttackerTeam());
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_DEFENDER) << uint32(GetDefenderTeam());
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_ACTIVE) << uint32(IsWarTime() ? 0 : 1); // Note: cleanup these two, their names look awkward
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_SHOW_WORLDSTATE) << uint32(IsWarTime() ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_ATTACKER), int32(GetAttackerTeam()));
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_DEFENDER), int32(GetDefenderTeam()));
|
||||
// Note: cleanup these two, their names look awkward
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_ACTIVE), int32(IsWarTime() ? 0 : 1));
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_SHOW_WORLDSTATE), int32(IsWarTime() ? 1 : 0));
|
||||
|
||||
for (uint32 i = 0; i < 2; ++i)
|
||||
data << ClockWorldState[i] << uint32(time(NULL) + (m_Timer / 1000));
|
||||
packet.Worldstates.emplace_back(ClockWorldState[i], int32(time(NULL) + (m_Timer / 1000)));
|
||||
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_H) << uint32(GetData(BATTLEFIELD_WG_DATA_VEHICLE_H));
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_H) << GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_H);
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_A) << uint32(GetData(BATTLEFIELD_WG_DATA_VEHICLE_A));
|
||||
data << uint32(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_A) << GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A);
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_H), int32(GetData(BATTLEFIELD_WG_DATA_VEHICLE_H)));
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_H), int32(GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_H)));
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_A), int32(GetData(BATTLEFIELD_WG_DATA_VEHICLE_A)));
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_A), int32(GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A)));
|
||||
|
||||
for (BfWGGameObjectBuilding* building : BuildingsInZone)
|
||||
building->FillInitialWorldStates(data);
|
||||
building->FillInitialWorldStates(packet);
|
||||
|
||||
for (WintergraspWorkshop* workshop : Workshops)
|
||||
workshop->FillInitialWorldStates(data);
|
||||
workshop->FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
void BattlefieldWG::SendInitWorldStatesTo(Player* player)
|
||||
{
|
||||
WorldPacket data(SMSG_INIT_WORLD_STATES, 4 + 4 + 4 + 2 + (BuildingsInZone.size() * 8) + (Workshops.size() * 8));
|
||||
WorldPackets::WorldState::InitWorldStates packet;
|
||||
packet.AreaID = m_ZoneId;
|
||||
packet.MapID = m_MapId;
|
||||
packet.SubareaID = 0;
|
||||
|
||||
data << uint32(m_MapId);
|
||||
data << uint32(m_ZoneId);
|
||||
data << uint32(0); // AreaId
|
||||
data << uint16(10 + BuildingsInZone.size() + Workshops.size()); // Number of fields
|
||||
FillInitialWorldStates(packet);
|
||||
|
||||
FillInitialWorldStates(data);
|
||||
|
||||
player->SendDirectMessage(&data);
|
||||
player->SendDirectMessage(packet.Write());
|
||||
}
|
||||
|
||||
void BattlefieldWG::SendInitWorldStatesToAll()
|
||||
@@ -1412,9 +1411,9 @@ void BfWGGameObjectBuilding::UpdateTurretAttack(bool disable)
|
||||
}
|
||||
}
|
||||
|
||||
void BfWGGameObjectBuilding::FillInitialWorldStates(WorldPacket& data)
|
||||
void BfWGGameObjectBuilding::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(_worldState) << uint32(_state);
|
||||
packet.Worldstates.emplace_back(uint32(_worldState), int32(_state));
|
||||
}
|
||||
|
||||
void BfWGGameObjectBuilding::Save()
|
||||
@@ -1550,9 +1549,9 @@ void WintergraspWorkshop::UpdateGraveyardAndWorkshop()
|
||||
GiveControlTo(_wg->GetDefenderTeam(), true);
|
||||
}
|
||||
|
||||
void WintergraspWorkshop::FillInitialWorldStates(WorldPacket& data)
|
||||
void WintergraspWorkshop::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(_staticInfo->WorldStateId) << uint32(_state);
|
||||
packet.Worldstates.emplace_back(uint32(_staticInfo->WorldStateId), int32(_state));
|
||||
}
|
||||
|
||||
void WintergraspWorkshop::Save()
|
||||
|
||||
@@ -396,7 +396,7 @@ class BattlefieldWG : public Battlefield
|
||||
|
||||
void SendInitWorldStatesTo(Player* player);
|
||||
void SendInitWorldStatesToAll() override;
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void HandleKill(Player* killer, Unit* victim) override;
|
||||
void OnUnitDeath(Unit* unit) override;
|
||||
@@ -1144,7 +1144,7 @@ public:
|
||||
|
||||
void UpdateTurretAttack(bool disable);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void Save();
|
||||
};
|
||||
@@ -1179,7 +1179,7 @@ public:
|
||||
|
||||
void UpdateGraveyardAndWorkshop();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void Save();
|
||||
};
|
||||
|
||||
@@ -71,10 +71,10 @@ void Arena::RemovePlayer(Player* /*player*/, ObjectGuid /*guid*/, uint32 /*team*
|
||||
CheckWinConditions();
|
||||
}
|
||||
|
||||
void Arena::FillInitialWorldStates(WorldPacket& data)
|
||||
void Arena::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(ARENA_WORLD_STATE_ALIVE_PLAYERS_GREEN) << uint32(GetAlivePlayersCountByTeam(HORDE));
|
||||
data << uint32(ARENA_WORLD_STATE_ALIVE_PLAYERS_GOLD) << uint32(GetAlivePlayersCountByTeam(ALLIANCE));
|
||||
packet.Worldstates.emplace_back(uint32(ARENA_WORLD_STATE_ALIVE_PLAYERS_GREEN), int32(GetAlivePlayersCountByTeam(HORDE)));
|
||||
packet.Worldstates.emplace_back(uint32(ARENA_WORLD_STATE_ALIVE_PLAYERS_GOLD), int32(GetAlivePlayersCountByTeam(ALLIANCE)));
|
||||
}
|
||||
|
||||
void Arena::UpdateArenaWorldState()
|
||||
|
||||
@@ -44,7 +44,7 @@ class Arena : public Battleground
|
||||
void AddPlayer(Player* player) override;
|
||||
void RemovePlayer(Player* /*player*/, ObjectGuid /*guid*/, uint32 /*team*/) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
void UpdateArenaWorldState();
|
||||
|
||||
void HandleKillPlayer(Player* player, Player* killer) override;
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "Util.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include "Transport.h"
|
||||
|
||||
namespace Trinity
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "Object.h"
|
||||
#include "GameObject.h"
|
||||
#include "Packets/WorldStatePackets.h"
|
||||
|
||||
class Creature;
|
||||
class GameObject;
|
||||
@@ -346,7 +347,7 @@ class Battleground
|
||||
|
||||
// Packet Transfer
|
||||
// method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
|
||||
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*data*/) { }
|
||||
void SendPacketToTeam(uint32 TeamID, WorldPacket const* packet, Player* sender = NULL, bool self = true) const;
|
||||
void SendPacketToAll(WorldPacket const* packet) const;
|
||||
|
||||
|
||||
@@ -316,18 +316,18 @@ int32 BattlegroundAB::_GetNodeNameId(uint8 node)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BattlegroundAB::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundAB::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
const uint8 plusArray[] = {0, 2, 3, 0, 1};
|
||||
|
||||
// Node icons
|
||||
for (uint8 node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node)
|
||||
data << uint32(BG_AB_OP_NODEICONS[node]) << uint32((m_Nodes[node] == 0)?1:0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_NODEICONS[node]), int32((m_Nodes[node] == 0) ? 1 : 0));
|
||||
|
||||
// Node occupied states
|
||||
for (uint8 node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node)
|
||||
for (uint8 i = 1; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
|
||||
data << uint32(BG_AB_OP_NODESTATES[node] + plusArray[i]) << uint32((m_Nodes[node] == i)?1:0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_NODESTATES[node] + plusArray[i]), int32((m_Nodes[node] == i) ? 1 : 0));
|
||||
|
||||
// How many bases each team owns
|
||||
uint8 ally = 0, horde = 0;
|
||||
@@ -337,17 +337,17 @@ void BattlegroundAB::FillInitialWorldStates(WorldPacket& data)
|
||||
else if (m_Nodes[node] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)
|
||||
++horde;
|
||||
|
||||
data << uint32(BG_AB_OP_OCCUPIED_BASES_ALLY) << uint32(ally);
|
||||
data << uint32(BG_AB_OP_OCCUPIED_BASES_HORDE) << uint32(horde);
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_OCCUPIED_BASES_ALLY), int32(ally));
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_OCCUPIED_BASES_HORDE), int32(horde));
|
||||
|
||||
// Team scores
|
||||
data << uint32(BG_AB_OP_RESOURCES_MAX) << uint32(BG_AB_MAX_TEAM_SCORE);
|
||||
data << uint32(BG_AB_OP_RESOURCES_WARNING) << uint32(BG_AB_WARNING_NEAR_VICTORY_SCORE);
|
||||
data << uint32(BG_AB_OP_RESOURCES_ALLY) << uint32(m_TeamScores[TEAM_ALLIANCE]);
|
||||
data << uint32(BG_AB_OP_RESOURCES_HORDE) << uint32(m_TeamScores[TEAM_HORDE]);
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_RESOURCES_MAX), int32(BG_AB_MAX_TEAM_SCORE));
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_RESOURCES_WARNING), int32(BG_AB_WARNING_NEAR_VICTORY_SCORE));
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_RESOURCES_ALLY), int32(m_TeamScores[TEAM_ALLIANCE]));
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_RESOURCES_HORDE), int32(m_TeamScores[TEAM_HORDE]));
|
||||
|
||||
// other unknown
|
||||
data << uint32(0x745) << uint32(0x2); // 37 1861 unk
|
||||
packet.Worldstates.emplace_back(uint32(0x745), 0x2);
|
||||
}
|
||||
|
||||
void BattlegroundAB::_SendNodeUpdate(uint8 node)
|
||||
|
||||
@@ -293,7 +293,7 @@ class BattlegroundAB : public Battleground
|
||||
/* Scorekeeping */
|
||||
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
/* Nodes occupying */
|
||||
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
|
||||
|
||||
@@ -1020,32 +1020,34 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
|
||||
UpdatePlayerScore(player, (IsTower(node)) ? SCORE_TOWERS_ASSAULTED : SCORE_GRAVEYARDS_ASSAULTED, 1);
|
||||
}
|
||||
|
||||
void BattlegroundAV::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundAV::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
for (uint8 i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
|
||||
{
|
||||
uint16 owner = m_Nodes[i].Owner;
|
||||
BG_AV_States state = m_Nodes[i].State;
|
||||
|
||||
data << uint32(BGAVNodeInfo[i].WorldStateIds.AllianceAssault) << uint32(owner == ALLIANCE && state == POINT_ASSAULTED);
|
||||
data << uint32(BGAVNodeInfo[i].WorldStateIds.AllianceControl) << uint32(owner == ALLIANCE && state >= POINT_DESTROYED);
|
||||
data << uint32(BGAVNodeInfo[i].WorldStateIds.HordeAssault) << uint32(owner == HORDE && state == POINT_ASSAULTED);
|
||||
data << uint32(BGAVNodeInfo[i].WorldStateIds.HordeControl) << uint32(owner == HORDE && state >= POINT_DESTROYED);
|
||||
packet.Worldstates.emplace_back(uint32(BGAVNodeInfo[i].WorldStateIds.AllianceAssault), int32(owner == ALLIANCE && state == POINT_ASSAULTED));
|
||||
packet.Worldstates.emplace_back(uint32(BGAVNodeInfo[i].WorldStateIds.AllianceControl), int32(owner == ALLIANCE && state >= POINT_DESTROYED));
|
||||
packet.Worldstates.emplace_back(uint32(BGAVNodeInfo[i].WorldStateIds.HordeAssault), int32(owner == HORDE && state == POINT_ASSAULTED));
|
||||
packet.Worldstates.emplace_back(uint32(BGAVNodeInfo[i].WorldStateIds.HordeControl), int32(owner == HORDE && state >= POINT_DESTROYED));
|
||||
}
|
||||
|
||||
data << uint32(AV_SNOWFALL_N) << uint32(m_Nodes[BG_AV_NODES_SNOWFALL_GRAVE].Owner == AV_NEUTRAL_TEAM);
|
||||
packet.Worldstates.emplace_back(uint32(AV_SNOWFALL_N), int32(m_Nodes[BG_AV_NODES_SNOWFALL_GRAVE].Owner == AV_NEUTRAL_TEAM));
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(AV_Alliance_Score), int32(m_Team_Scores[0]));
|
||||
packet.Worldstates.emplace_back(uint32(AV_Horde_Score), int32(m_Team_Scores[1]));
|
||||
|
||||
data << uint32(AV_Alliance_Score) << uint32(m_Team_Scores[0]);
|
||||
data << uint32(AV_Horde_Score) << uint32(m_Team_Scores[1]);
|
||||
if (GetStatus() == STATUS_IN_PROGRESS){ //only if game started the teamscores are displayed
|
||||
data << uint32(AV_SHOW_A_SCORE) << uint32(1);
|
||||
data << uint32(AV_SHOW_H_SCORE) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_A_SCORE), 1);
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_H_SCORE), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
data << uint32(AV_SHOW_A_SCORE) << uint32(0);
|
||||
data << uint32(AV_SHOW_H_SCORE) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_A_SCORE), 0);
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_H_SCORE), 0);
|
||||
}
|
||||
|
||||
SendMineWorldStates(AV_NORTH_MINE);
|
||||
SendMineWorldStates(AV_SOUTH_MINE);
|
||||
}
|
||||
|
||||
@@ -1672,7 +1672,7 @@ class BattlegroundAV : public Battleground
|
||||
void ChangeMineOwner(uint8 mine, uint32 team, bool initial=false);
|
||||
|
||||
/*worldstates*/
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
void SendMineWorldStates(uint32 mine);
|
||||
void UpdateNodeWorldState(BG_AV_Nodes node);
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@ void BattlegroundBE::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundBE::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundBE::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(0x9f3) << uint32(1); // 9 show
|
||||
Arena::FillInitialWorldStates(data);
|
||||
packet.Worldstates.emplace_back(0x9f3, 1);
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
bool BattlegroundBE::SetupBattleground()
|
||||
|
||||
@@ -53,6 +53,6 @@ class BattlegroundBE : public Arena
|
||||
|
||||
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
|
||||
bool SetupBattleground() override;
|
||||
void FillInitialWorldStates(WorldPacket &d) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -145,10 +145,10 @@ void BattlegroundDS::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundDS::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundDS::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(3610) << uint32(1); // 9 show
|
||||
Arena::FillInitialWorldStates(data);
|
||||
packet.Worldstates.emplace_back(3610, 1);
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
bool BattlegroundDS::SetupBattleground()
|
||||
|
||||
@@ -99,7 +99,7 @@ class BattlegroundDS : public Arena
|
||||
|
||||
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
|
||||
bool SetupBattleground() override;
|
||||
void FillInitialWorldStates(WorldPacket &d) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
private:
|
||||
void PostUpdateImpl(uint32 diff) override;
|
||||
|
||||
@@ -845,54 +845,44 @@ bool BattlegroundEY::UpdatePlayerScore(Player* player, uint32 type, uint32 value
|
||||
return true;
|
||||
}
|
||||
|
||||
void BattlegroundEY::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundEY::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(EY_HORDE_BASE) << uint32(m_TeamPointsCount[TEAM_HORDE]);
|
||||
data << uint32(EY_ALLIANCE_BASE) << uint32(m_TeamPointsCount[TEAM_ALLIANCE]);
|
||||
data << uint32(0xab6) << uint32(0x0);
|
||||
data << uint32(0xab5) << uint32(0x0);
|
||||
data << uint32(0xab4) << uint32(0x0);
|
||||
data << uint32(0xab3) << uint32(0x0);
|
||||
data << uint32(0xab2) << uint32(0x0);
|
||||
data << uint32(0xab1) << uint32(0x0);
|
||||
data << uint32(0xab0) << uint32(0x0);
|
||||
data << uint32(0xaaf) << uint32(0x0);
|
||||
packet.Worldstates.emplace_back(uint32(EY_HORDE_BASE), int32(m_TeamPointsCount[TEAM_HORDE]));
|
||||
packet.Worldstates.emplace_back(uint32(EY_ALLIANCE_BASE), int32(m_TeamPointsCount[TEAM_ALLIANCE]));
|
||||
packet.Worldstates.emplace_back(0xAB6, 0x0);
|
||||
packet.Worldstates.emplace_back(0xAB5, 0x0);
|
||||
packet.Worldstates.emplace_back(0xAB4, 0x0);
|
||||
packet.Worldstates.emplace_back(0xAB3, 0x0);
|
||||
packet.Worldstates.emplace_back(0xAB2, 0x0);
|
||||
packet.Worldstates.emplace_back(0xAB1, 0x0);
|
||||
packet.Worldstates.emplace_back(0xAB0, 0x0);
|
||||
packet.Worldstates.emplace_back(0xAAF, 0x0);
|
||||
|
||||
data << uint32(DRAENEI_RUINS_HORDE_CONTROL) << uint32(m_PointOwnedByTeam[DRAENEI_RUINS] == HORDE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL);
|
||||
packet.Worldstates.emplace_back(uint32(DRAENEI_RUINS_HORDE_CONTROL), int32(m_PointOwnedByTeam[DRAENEI_RUINS] == HORDE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(DRAENEI_RUINS_ALLIANCE_CONTROL), int32(m_PointOwnedByTeam[DRAENEI_RUINS] == ALLIANCE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(DRAENEI_RUINS_UNCONTROL), int32(m_PointState[DRAENEI_RUINS] != EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(MAGE_TOWER_ALLIANCE_CONTROL), int32(m_PointOwnedByTeam[MAGE_TOWER] == ALLIANCE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(MAGE_TOWER_HORDE_CONTROL), int32(m_PointOwnedByTeam[MAGE_TOWER] == HORDE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(MAGE_TOWER_UNCONTROL), int32(m_PointState[MAGE_TOWER] != EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(FEL_REAVER_HORDE_CONTROL), int32(m_PointOwnedByTeam[FEL_REAVER] == HORDE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(FEL_REAVER_ALLIANCE_CONTROL), int32(m_PointOwnedByTeam[FEL_REAVER] == ALLIANCE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(FEL_REAVER_UNCONTROL), int32(m_PointState[FEL_REAVER] != EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(BLOOD_ELF_HORDE_CONTROL), int32(m_PointOwnedByTeam[BLOOD_ELF] == HORDE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(BLOOD_ELF_ALLIANCE_CONTROL), int32(m_PointOwnedByTeam[BLOOD_ELF] == ALLIANCE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(BLOOD_ELF_UNCONTROL), int32(m_PointState[BLOOD_ELF] != EY_POINT_UNDER_CONTROL));
|
||||
packet.Worldstates.emplace_back(uint32(NETHERSTORM_FLAG), int32(m_FlagState == BG_EY_FLAG_STATE_ON_BASE));
|
||||
|
||||
data << uint32(DRAENEI_RUINS_ALLIANCE_CONTROL) << uint32(m_PointOwnedByTeam[DRAENEI_RUINS] == ALLIANCE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL);
|
||||
packet.Worldstates.emplace_back(0xAD2, 0x1);
|
||||
packet.Worldstates.emplace_back(0xAD1, 0x1);
|
||||
|
||||
data << uint32(DRAENEI_RUINS_UNCONTROL) << uint32(m_PointState[DRAENEI_RUINS] != EY_POINT_UNDER_CONTROL);
|
||||
packet.Worldstates.emplace_back(0xABE, int32(GetTeamScore(TEAM_HORDE)));
|
||||
packet.Worldstates.emplace_back(0xABD, int32(GetTeamScore(TEAM_ALLIANCE)));
|
||||
|
||||
data << uint32(MAGE_TOWER_ALLIANCE_CONTROL) << uint32(m_PointOwnedByTeam[MAGE_TOWER] == ALLIANCE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(MAGE_TOWER_HORDE_CONTROL) << uint32(m_PointOwnedByTeam[MAGE_TOWER] == HORDE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(MAGE_TOWER_UNCONTROL) << uint32(m_PointState[MAGE_TOWER] != EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(FEL_REAVER_HORDE_CONTROL) << uint32(m_PointOwnedByTeam[FEL_REAVER] == HORDE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(FEL_REAVER_ALLIANCE_CONTROL) << uint32(m_PointOwnedByTeam[FEL_REAVER] == ALLIANCE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(FEL_REAVER_UNCONTROL) << uint32(m_PointState[FEL_REAVER] != EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(BLOOD_ELF_HORDE_CONTROL) << uint32(m_PointOwnedByTeam[BLOOD_ELF] == HORDE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(BLOOD_ELF_ALLIANCE_CONTROL) << uint32(m_PointOwnedByTeam[BLOOD_ELF] == ALLIANCE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(BLOOD_ELF_UNCONTROL) << uint32(m_PointState[BLOOD_ELF] != EY_POINT_UNDER_CONTROL);
|
||||
|
||||
data << uint32(NETHERSTORM_FLAG) << uint32(m_FlagState == BG_EY_FLAG_STATE_ON_BASE);
|
||||
|
||||
data << uint32(0xad2) << uint32(0x1);
|
||||
data << uint32(0xad1) << uint32(0x1);
|
||||
data << uint32(0xabe) << uint32(GetTeamScore(TEAM_HORDE));
|
||||
data << uint32(0xabd) << uint32(GetTeamScore(TEAM_ALLIANCE));
|
||||
data << uint32(0xa05) << uint32(0x8e);
|
||||
data << uint32(0xaa0) << uint32(0x0);
|
||||
data << uint32(0xa9f) << uint32(0x0);
|
||||
data << uint32(0xa9e) << uint32(0x0);
|
||||
data << uint32(0xc0d) << uint32(0x17b);
|
||||
packet.Worldstates.emplace_back(0xA05, 0x8E);
|
||||
packet.Worldstates.emplace_back(0xAA0, 0x0);
|
||||
packet.Worldstates.emplace_back(0xA9F, 0x0);
|
||||
packet.Worldstates.emplace_back(0xA9E, 0x0);
|
||||
packet.Worldstates.emplace_back(0xC0D, 0x17B);
|
||||
}
|
||||
|
||||
WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player)
|
||||
|
||||
@@ -382,7 +382,7 @@ class BattlegroundEY : public Battleground
|
||||
void UpdateTeamScore(uint32 Team);
|
||||
void EndBattleground(uint32 winner) override;
|
||||
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
void SetDroppedFlagGUID(ObjectGuid guid, int32 /*TeamID*/ = -1) override { m_DroppedFlagGUID = guid; }
|
||||
ObjectGuid GetDroppedFlagGUID() const { return m_DroppedFlagGUID; }
|
||||
|
||||
|
||||
@@ -287,21 +287,21 @@ void BattlegroundIC::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundIC::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundIC::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(BG_IC_ALLIANCE_RENFORT_SET) << uint32(1);
|
||||
data << uint32(BG_IC_HORDE_RENFORT_SET) << uint32(1);
|
||||
data << uint32(BG_IC_ALLIANCE_RENFORT) << uint32(factionReinforcements[TEAM_ALLIANCE]);
|
||||
data << uint32(BG_IC_HORDE_RENFORT) << uint32(factionReinforcements[TEAM_HORDE]);
|
||||
packet.Worldstates.emplace_back(uint32(BG_IC_ALLIANCE_RENFORT_SET), 1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_IC_HORDE_RENFORT_SET), 1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_IC_ALLIANCE_RENFORT), int32(factionReinforcements[TEAM_ALLIANCE]));
|
||||
packet.Worldstates.emplace_back(uint32(BG_IC_HORDE_RENFORT), int32(factionReinforcements[TEAM_HORDE]));
|
||||
|
||||
for (uint8 i = 0; i < MAX_FORTRESS_GATES_SPAWNS; ++i)
|
||||
{
|
||||
uint32 uws = GetWorldStateFromGateEntry(BG_IC_ObjSpawnlocs[i].entry, (GateStatus[GetGateIDFromEntry(BG_IC_ObjSpawnlocs[i].entry)] == BG_IC_GATE_DESTROYED ? true : false));
|
||||
data << uint32(uws) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(uws), 1);
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < MAX_NODE_TYPES; ++i)
|
||||
data << uint32(nodePoint[i].worldStates[nodePoint[i].nodeState]) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(nodePoint[i].worldStates[nodePoint[i].nodeState]), 1);
|
||||
}
|
||||
|
||||
bool BattlegroundIC::SetupBattleground()
|
||||
|
||||
@@ -945,7 +945,7 @@ class BattlegroundIC : public Battleground
|
||||
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
|
||||
|
||||
/* Scorekeeping */
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void HandlePlayerResurrect(Player* player) override;
|
||||
|
||||
|
||||
@@ -56,10 +56,10 @@ void BattlegroundNA::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundNA::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundNA::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(0xa11) << uint32(1); // 9 show
|
||||
Arena::FillInitialWorldStates(data);
|
||||
packet.Worldstates.emplace_back(0xa11, 1);
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
bool BattlegroundNA::SetupBattleground()
|
||||
|
||||
@@ -52,6 +52,6 @@ class BattlegroundNA : public Arena
|
||||
|
||||
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
|
||||
bool SetupBattleground() override;
|
||||
void FillInitialWorldStates(WorldPacket &d) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -56,10 +56,10 @@ void BattlegroundRL::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundRL::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundRL::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(0xbba) << uint32(1); // 9 show
|
||||
Arena::FillInitialWorldStates(data);
|
||||
packet.Worldstates.emplace_back(0xbba, 1);
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
bool BattlegroundRL::SetupBattleground()
|
||||
|
||||
@@ -43,7 +43,7 @@ class BattlegroundRL : public Arena
|
||||
BattlegroundRL();
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
void FillInitialWorldStates(WorldPacket &d) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
void StartingEventCloseDoors() override;
|
||||
void StartingEventOpenDoors() override;
|
||||
|
||||
|
||||
@@ -100,10 +100,10 @@ void BattlegroundRV::HandleAreaTrigger(Player* player, uint32 trigger)
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundRV::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundRV::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(BG_RV_WORLD_STATE) << uint32(1);
|
||||
Arena::FillInitialWorldStates(data);
|
||||
packet.Worldstates.emplace_back(uint32(BG_RV_WORLD_STATE), 1);
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
bool BattlegroundRV::SetupBattleground()
|
||||
|
||||
@@ -97,7 +97,7 @@ class BattlegroundRV : public Arena
|
||||
|
||||
/* inherited from BattlegroundClass */
|
||||
void StartingEventOpenDoors() override;
|
||||
void FillInitialWorldStates(WorldPacket &d) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
|
||||
bool SetupBattleground() override;
|
||||
|
||||
@@ -435,44 +435,44 @@ void BattlegroundSA::StartingEventCloseDoors() { }
|
||||
|
||||
void BattlegroundSA::StartingEventOpenDoors() { }
|
||||
|
||||
void BattlegroundSA::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundSA::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
bool allyAttacks = Attackers == TEAM_ALLIANCE;
|
||||
bool hordeAttacks = Attackers == TEAM_HORDE;
|
||||
|
||||
data << uint32(BG_SA_ANCIENT_GATEWS) << uint32(GateStatus[BG_SA_ANCIENT_GATE]);
|
||||
data << uint32(BG_SA_YELLOW_GATEWS) << uint32(GateStatus[BG_SA_YELLOW_GATE]);
|
||||
data << uint32(BG_SA_GREEN_GATEWS) << uint32(GateStatus[BG_SA_GREEN_GATE]);
|
||||
data << uint32(BG_SA_BLUE_GATEWS) << uint32(GateStatus[BG_SA_BLUE_GATE]);
|
||||
data << uint32(BG_SA_RED_GATEWS) << uint32(GateStatus[BG_SA_RED_GATE]);
|
||||
data << uint32(BG_SA_PURPLE_GATEWS) << uint32(GateStatus[BG_SA_PURPLE_GATE]);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_ANCIENT_GATEWS), int32(GateStatus[BG_SA_ANCIENT_GATE]));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_YELLOW_GATEWS), int32(GateStatus[BG_SA_YELLOW_GATE]));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_GREEN_GATEWS), int32(GateStatus[BG_SA_GREEN_GATE]));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_BLUE_GATEWS), int32(GateStatus[BG_SA_BLUE_GATE]));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_RED_GATEWS), int32(GateStatus[BG_SA_RED_GATE]));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_PURPLE_GATEWS), int32(GateStatus[BG_SA_PURPLE_GATE]));
|
||||
|
||||
data << uint32(BG_SA_BONUS_TIMER) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_BONUS_TIMER), 0);
|
||||
|
||||
data << uint32(BG_SA_HORDE_ATTACKS) << uint32(hordeAttacks);
|
||||
data << uint32(BG_SA_ALLY_ATTACKS) << uint32(allyAttacks);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_HORDE_ATTACKS), int32(hordeAttacks));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_ALLY_ATTACKS), int32(allyAttacks));
|
||||
|
||||
// Time will be sent on first update...
|
||||
data << uint32(BG_SA_ENABLE_TIMER) << uint32(TimerEnabled);
|
||||
data << uint32(BG_SA_TIMER_MINS) << uint32(0);
|
||||
data << uint32(BG_SA_TIMER_SEC_TENS) << uint32(0);
|
||||
data << uint32(BG_SA_TIMER_SEC_DECS) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_ENABLE_TIMER), int32(TimerEnabled));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_TIMER_MINS), 0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_TIMER_SEC_TENS), 0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_TIMER_SEC_DECS), 0);
|
||||
|
||||
data << uint32(BG_SA_RIGHT_GY_HORDE) << uint32(GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE);
|
||||
data << uint32(BG_SA_LEFT_GY_HORDE) << uint32(GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE);
|
||||
data << uint32(BG_SA_CENTER_GY_HORDE) << uint32(GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_RIGHT_GY_HORDE), int32(GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_LEFT_GY_HORDE), int32(GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_CENTER_GY_HORDE), int32(GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE));
|
||||
|
||||
data << uint32(BG_SA_RIGHT_GY_ALLIANCE) << uint32(GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE);
|
||||
data << uint32(BG_SA_LEFT_GY_ALLIANCE) << uint32(GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE);
|
||||
data << uint32(BG_SA_CENTER_GY_ALLIANCE) << uint32(GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_RIGHT_GY_ALLIANCE), int32(GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_LEFT_GY_ALLIANCE), int32(GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_CENTER_GY_ALLIANCE), int32(GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE));
|
||||
|
||||
data << uint32(BG_SA_HORDE_DEFENCE_TOKEN) << uint32(allyAttacks);
|
||||
data << uint32(BG_SA_ALLIANCE_DEFENCE_TOKEN) << uint32(hordeAttacks);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_HORDE_DEFENCE_TOKEN), int32(allyAttacks));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_ALLIANCE_DEFENCE_TOKEN), int32(hordeAttacks));
|
||||
|
||||
data << uint32(BG_SA_LEFT_ATT_TOKEN_HRD) << uint32(hordeAttacks);
|
||||
data << uint32(BG_SA_RIGHT_ATT_TOKEN_HRD) << uint32(hordeAttacks);
|
||||
data << uint32(BG_SA_RIGHT_ATT_TOKEN_ALL) << uint32(allyAttacks);
|
||||
data << uint32(BG_SA_LEFT_ATT_TOKEN_ALL) << uint32(allyAttacks);
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_LEFT_ATT_TOKEN_HRD), int32(hordeAttacks));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_RIGHT_ATT_TOKEN_HRD), int32(hordeAttacks));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_RIGHT_ATT_TOKEN_ALL), int32(allyAttacks));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_LEFT_ATT_TOKEN_ALL), int32(allyAttacks));
|
||||
}
|
||||
|
||||
void BattlegroundSA::AddPlayer(Player* player)
|
||||
|
||||
@@ -569,7 +569,7 @@ class BattlegroundSA : public Battleground
|
||||
bool SetupBattleground() override;
|
||||
void Reset() override;
|
||||
/// Called for generate packet contain worldstate data
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
/// Called when a player kill a unit in bg
|
||||
void HandleKillUnit(Creature* creature, Player* killer) override;
|
||||
/// Return the nearest graveyard where player can respawn
|
||||
|
||||
@@ -829,44 +829,44 @@ WorldSafeLocsEntry const* BattlegroundWS::GetClosestGraveYard(Player* player)
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundWS::FillInitialWorldStates(WorldPacket& data)
|
||||
void BattlegroundWS::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(BG_WS_FLAG_CAPTURES_ALLIANCE) << uint32(GetTeamScore(TEAM_ALLIANCE));
|
||||
data << uint32(BG_WS_FLAG_CAPTURES_HORDE) << uint32(GetTeamScore(TEAM_HORDE));
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_CAPTURES_ALLIANCE), int32(GetTeamScore(TEAM_ALLIANCE)));
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_CAPTURES_HORDE), int32(GetTeamScore(TEAM_HORDE)));
|
||||
|
||||
if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_GROUND)
|
||||
data << uint32(BG_WS_FLAG_UNK_ALLIANCE) << uint32(-1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_ALLIANCE), -1);
|
||||
else if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
data << uint32(BG_WS_FLAG_UNK_ALLIANCE) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_ALLIANCE), 1);
|
||||
else
|
||||
data << uint32(BG_WS_FLAG_UNK_ALLIANCE) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_ALLIANCE), 0);
|
||||
|
||||
if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_GROUND)
|
||||
data << uint32(BG_WS_FLAG_UNK_HORDE) << uint32(-1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_HORDE), -1);
|
||||
else if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
data << uint32(BG_WS_FLAG_UNK_HORDE) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_HORDE), 1);
|
||||
else
|
||||
data << uint32(BG_WS_FLAG_UNK_HORDE) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_HORDE), 0);
|
||||
|
||||
data << uint32(BG_WS_FLAG_CAPTURES_MAX) << uint32(BG_WS_MAX_TEAM_SCORE);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_CAPTURES_MAX), int32(BG_WS_MAX_TEAM_SCORE));
|
||||
|
||||
if (GetStatus() == STATUS_IN_PROGRESS)
|
||||
{
|
||||
data << uint32(BG_WS_STATE_TIMER_ACTIVE) << uint32(1);
|
||||
data << uint32(BG_WS_STATE_TIMER) << uint32(25-_minutesElapsed);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_STATE_TIMER_ACTIVE), 1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_STATE_TIMER), int32(25 - _minutesElapsed));
|
||||
}
|
||||
else
|
||||
data << uint32(BG_WS_STATE_TIMER_ACTIVE) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_STATE_TIMER_ACTIVE), 0);
|
||||
|
||||
if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
data << uint32(BG_WS_FLAG_STATE_HORDE) << uint32(2);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_HORDE), 2);
|
||||
else
|
||||
data << uint32(BG_WS_FLAG_STATE_HORDE) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_HORDE), 1);
|
||||
|
||||
if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
data << uint32(BG_WS_FLAG_STATE_ALLIANCE) << uint32(2);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_ALLIANCE), 2);
|
||||
else
|
||||
data << uint32(BG_WS_FLAG_STATE_ALLIANCE) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_ALLIANCE), 1);
|
||||
}
|
||||
|
||||
uint32 BattlegroundWS::GetPrematureWinner()
|
||||
|
||||
@@ -235,7 +235,7 @@ class BattlegroundWS : public Battleground
|
||||
}
|
||||
|
||||
ObjectGuid GetDroppedFlagGUID(uint32 TeamID) { return m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)]; }
|
||||
void FillInitialWorldStates(WorldPacket& data) override;
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
/* Scorekeeping */
|
||||
void AddPoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] += Points; }
|
||||
|
||||
@@ -8795,30 +8795,26 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
|
||||
InstanceScript* instance = GetInstanceScript();
|
||||
Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(zoneid);
|
||||
|
||||
TC_LOG_DEBUG("network", "Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid);
|
||||
WorldPackets::WorldState::InitWorldStates packet;
|
||||
packet.MapID = mapid;
|
||||
packet.AreaID = zoneid;
|
||||
packet.SubareaID = areaid;
|
||||
packet.Worldstates.emplace_back(2264, 0); // 1
|
||||
packet.Worldstates.emplace_back(2263, 0); // 2
|
||||
packet.Worldstates.emplace_back(2262, 0); // 3
|
||||
packet.Worldstates.emplace_back(2261, 0); // 4
|
||||
packet.Worldstates.emplace_back(2260, 0); // 5
|
||||
packet.Worldstates.emplace_back(2259, 0); // 6
|
||||
|
||||
WorldPacket data(SMSG_INIT_WORLD_STATES, (4+4+4+2+(12*8)));
|
||||
data << uint32(mapid); // mapid
|
||||
data << uint32(zoneid); // zone id
|
||||
data << uint32(areaid); // area id, new 2.1.0
|
||||
size_t countPos = data.wpos();
|
||||
data << uint16(0); // count of uint64 blocks
|
||||
data << uint32(2264) << uint32(0); // 1
|
||||
data << uint32(2263) << uint32(0); // 2
|
||||
data << uint32(2262) << uint32(0); // 3
|
||||
data << uint32(2261) << uint32(0); // 4
|
||||
data << uint32(2260) << uint32(0); // 5
|
||||
data << uint32(2259) << uint32(0); // 6
|
||||
|
||||
data << uint32(3191) << uint32(sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS) ? sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) : 0); // 7 Current Season - Arena season in progress
|
||||
// 0 - End of season
|
||||
data << uint32(3901) << uint32(sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) - sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS)); // 8 PreviousSeason
|
||||
packet.Worldstates.emplace_back(3191, int32(sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS) ? sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) : 0)); // 7 Current Season - Arena season in progress
|
||||
// 0 - End of season
|
||||
packet.Worldstates.emplace_back(3901, int32(sWorld->getIntConfig(CONFIG_ARENA_SEASON_ID) - sWorld->getBoolConfig(CONFIG_ARENA_SEASON_IN_PROGRESS))); // 8 PreviousSeason
|
||||
|
||||
if (mapid == 530) // Outland
|
||||
{
|
||||
data << uint32(2495) << uint32(0x0); // 7
|
||||
data << uint32(2493) << uint32(0xF); // 8
|
||||
data << uint32(2491) << uint32(0xF); // 9
|
||||
packet.Worldstates.emplace_back(2495, 0); // 7
|
||||
packet.Worldstates.emplace_back(2493, 0xF); // 8
|
||||
packet.Worldstates.emplace_back(2491, 0xF); // 9
|
||||
}
|
||||
|
||||
// insert <field> <value>
|
||||
@@ -8833,197 +8829,197 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
|
||||
case 1519: // Stormwind City
|
||||
case 1537: // Ironforge
|
||||
case 2257: // Deeprun Tram
|
||||
case 3703: // Shattrath City
|
||||
case 3703: // Shattrath City});
|
||||
break;
|
||||
case 1377: // Silithus
|
||||
if (pvp && pvp->GetTypeId() == OUTDOOR_PVP_SI)
|
||||
pvp->FillInitialWorldStates(data);
|
||||
pvp->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
// states are always shown
|
||||
data << uint32(2313) << uint32(0x0); // 7 ally silityst gathered
|
||||
data << uint32(2314) << uint32(0x0); // 8 horde silityst gathered
|
||||
data << uint32(2317) << uint32(0x0); // 9 max silithyst
|
||||
packet.Worldstates.emplace_back(2313, 0x0); // 7 ally silityst gathered
|
||||
packet.Worldstates.emplace_back(2314, 0x0); // 8 horde silityst gathered
|
||||
packet.Worldstates.emplace_back(2317, 0x0); // 9 max silithyst
|
||||
}
|
||||
// dunno about these... aq opening event maybe?
|
||||
data << uint32(2322) << uint32(0x0); // 10 sandworm N
|
||||
data << uint32(2323) << uint32(0x0); // 11 sandworm S
|
||||
data << uint32(2324) << uint32(0x0); // 12 sandworm SW
|
||||
data << uint32(2325) << uint32(0x0); // 13 sandworm E
|
||||
packet.Worldstates.emplace_back(2322, 0x0); // 10 sandworm N
|
||||
packet.Worldstates.emplace_back(2323, 0x0); // 11 sandworm S
|
||||
packet.Worldstates.emplace_back(2324, 0x0); // 12 sandworm SW
|
||||
packet.Worldstates.emplace_back(2325, 0x0); // 13 sandworm E
|
||||
break;
|
||||
case 2597: // Alterac Valley
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_AV)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0x7ae) << uint32(0x1); // 7 snowfall n
|
||||
data << uint32(0x532) << uint32(0x1); // 8 frostwolfhut hc
|
||||
data << uint32(0x531) << uint32(0x0); // 9 frostwolfhut ac
|
||||
data << uint32(0x52e) << uint32(0x0); // 10 stormpike firstaid a_a
|
||||
data << uint32(0x571) << uint32(0x0); // 11 east frostwolf tower horde assaulted -unused
|
||||
data << uint32(0x570) << uint32(0x0); // 12 west frostwolf tower horde assaulted - unused
|
||||
data << uint32(0x567) << uint32(0x1); // 13 frostwolfe c
|
||||
data << uint32(0x566) << uint32(0x1); // 14 frostwolfw c
|
||||
data << uint32(0x550) << uint32(0x1); // 15 irondeep (N) ally
|
||||
data << uint32(0x544) << uint32(0x0); // 16 ice grave a_a
|
||||
data << uint32(0x536) << uint32(0x0); // 17 stormpike grave h_c
|
||||
data << uint32(0x535) << uint32(0x1); // 18 stormpike grave a_c
|
||||
data << uint32(0x518) << uint32(0x0); // 19 stoneheart grave a_a
|
||||
data << uint32(0x517) << uint32(0x0); // 20 stoneheart grave h_a
|
||||
data << uint32(0x574) << uint32(0x0); // 21 1396 unk
|
||||
data << uint32(0x573) << uint32(0x0); // 22 iceblood tower horde assaulted -unused
|
||||
data << uint32(0x572) << uint32(0x0); // 23 towerpoint horde assaulted - unused
|
||||
data << uint32(0x56f) << uint32(0x0); // 24 1391 unk
|
||||
data << uint32(0x56e) << uint32(0x0); // 25 iceblood a
|
||||
data << uint32(0x56d) << uint32(0x0); // 26 towerp a
|
||||
data << uint32(0x56c) << uint32(0x0); // 27 frostwolfe a
|
||||
data << uint32(0x56b) << uint32(0x0); // 28 froswolfw a
|
||||
data << uint32(0x56a) << uint32(0x1); // 29 1386 unk
|
||||
data << uint32(0x569) << uint32(0x1); // 30 iceblood c
|
||||
data << uint32(0x568) << uint32(0x1); // 31 towerp c
|
||||
data << uint32(0x565) << uint32(0x0); // 32 stoneh tower a
|
||||
data << uint32(0x564) << uint32(0x0); // 33 icewing tower a
|
||||
data << uint32(0x563) << uint32(0x0); // 34 dunn a
|
||||
data << uint32(0x562) << uint32(0x0); // 35 duns a
|
||||
data << uint32(0x561) << uint32(0x0); // 36 stoneheart bunker alliance assaulted - unused
|
||||
data << uint32(0x560) << uint32(0x0); // 37 icewing bunker alliance assaulted - unused
|
||||
data << uint32(0x55f) << uint32(0x0); // 38 dunbaldar south alliance assaulted - unused
|
||||
data << uint32(0x55e) << uint32(0x0); // 39 dunbaldar north alliance assaulted - unused
|
||||
data << uint32(0x55d) << uint32(0x0); // 40 stone tower d
|
||||
data << uint32(0x3c6) << uint32(0x0); // 41 966 unk
|
||||
data << uint32(0x3c4) << uint32(0x0); // 42 964 unk
|
||||
data << uint32(0x3c2) << uint32(0x0); // 43 962 unk
|
||||
data << uint32(0x516) << uint32(0x1); // 44 stoneheart grave a_c
|
||||
data << uint32(0x515) << uint32(0x0); // 45 stonheart grave h_c
|
||||
data << uint32(0x3b6) << uint32(0x0); // 46 950 unk
|
||||
data << uint32(0x55c) << uint32(0x0); // 47 icewing tower d
|
||||
data << uint32(0x55b) << uint32(0x0); // 48 dunn d
|
||||
data << uint32(0x55a) << uint32(0x0); // 49 duns d
|
||||
data << uint32(0x559) << uint32(0x0); // 50 1369 unk
|
||||
data << uint32(0x558) << uint32(0x0); // 51 iceblood d
|
||||
data << uint32(0x557) << uint32(0x0); // 52 towerp d
|
||||
data << uint32(0x556) << uint32(0x0); // 53 frostwolfe d
|
||||
data << uint32(0x555) << uint32(0x0); // 54 frostwolfw d
|
||||
data << uint32(0x554) << uint32(0x1); // 55 stoneh tower c
|
||||
data << uint32(0x553) << uint32(0x1); // 56 icewing tower c
|
||||
data << uint32(0x552) << uint32(0x1); // 57 dunn c
|
||||
data << uint32(0x551) << uint32(0x1); // 58 duns c
|
||||
data << uint32(0x54f) << uint32(0x0); // 59 irondeep (N) horde
|
||||
data << uint32(0x54e) << uint32(0x0); // 60 irondeep (N) ally
|
||||
data << uint32(0x54d) << uint32(0x1); // 61 mine (S) neutral
|
||||
data << uint32(0x54c) << uint32(0x0); // 62 mine (S) horde
|
||||
data << uint32(0x54b) << uint32(0x0); // 63 mine (S) ally
|
||||
data << uint32(0x545) << uint32(0x0); // 64 iceblood h_a
|
||||
data << uint32(0x543) << uint32(0x1); // 65 iceblod h_c
|
||||
data << uint32(0x542) << uint32(0x0); // 66 iceblood a_c
|
||||
data << uint32(0x540) << uint32(0x0); // 67 snowfall h_a
|
||||
data << uint32(0x53f) << uint32(0x0); // 68 snowfall a_a
|
||||
data << uint32(0x53e) << uint32(0x0); // 69 snowfall h_c
|
||||
data << uint32(0x53d) << uint32(0x0); // 70 snowfall a_c
|
||||
data << uint32(0x53c) << uint32(0x0); // 71 frostwolf g h_a
|
||||
data << uint32(0x53b) << uint32(0x0); // 72 frostwolf g a_a
|
||||
data << uint32(0x53a) << uint32(0x1); // 73 frostwolf g h_c
|
||||
data << uint32(0x539) << uint32(0x0); // 74 frostwolf g a_c
|
||||
data << uint32(0x538) << uint32(0x0); // 75 stormpike grave h_a
|
||||
data << uint32(0x537) << uint32(0x0); // 76 stormpike grave a_a
|
||||
data << uint32(0x534) << uint32(0x0); // 77 frostwolf hut h_a
|
||||
data << uint32(0x533) << uint32(0x0); // 78 frostwolf hut a_a
|
||||
data << uint32(0x530) << uint32(0x0); // 79 stormpike first aid h_a
|
||||
data << uint32(0x52f) << uint32(0x0); // 80 stormpike first aid h_c
|
||||
data << uint32(0x52d) << uint32(0x1); // 81 stormpike first aid a_c
|
||||
packet.Worldstates.emplace_back(0x7ae, 0x1); // 7 snowfall n
|
||||
packet.Worldstates.emplace_back(0x532, 0x1); // 8 frostwolfhut hc
|
||||
packet.Worldstates.emplace_back(0x531, 0x0); // 9 frostwolfhut ac
|
||||
packet.Worldstates.emplace_back(0x52e, 0x0); // 10 stormpike firstaid a_a
|
||||
packet.Worldstates.emplace_back(0x571, 0x0); // 11 east frostwolf tower horde assaulted -unused
|
||||
packet.Worldstates.emplace_back(0x570, 0x0); // 12 west frostwolf tower horde assaulted - unused
|
||||
packet.Worldstates.emplace_back(0x567, 0x1); // 13 frostwolfe c
|
||||
packet.Worldstates.emplace_back(0x566, 0x1); // 14 frostwolfw c
|
||||
packet.Worldstates.emplace_back(0x550, 0x1); // 15 irondeep (N) ally
|
||||
packet.Worldstates.emplace_back(0x544, 0x0); // 16 ice grave a_a
|
||||
packet.Worldstates.emplace_back(0x536, 0x0); // 17 stormpike grave h_c
|
||||
packet.Worldstates.emplace_back(0x535, 0x1); // 18 stormpike grave a_c
|
||||
packet.Worldstates.emplace_back(0x518, 0x0); // 19 stoneheart grave a_a
|
||||
packet.Worldstates.emplace_back(0x517, 0x0); // 20 stoneheart grave h_a
|
||||
packet.Worldstates.emplace_back(0x574, 0x0); // 21 1396 unk
|
||||
packet.Worldstates.emplace_back(0x573, 0x0); // 22 iceblood tower horde assaulted -unused
|
||||
packet.Worldstates.emplace_back(0x572, 0x0); // 23 towerpoint horde assaulted - unused
|
||||
packet.Worldstates.emplace_back(0x56f, 0x0); // 24 1391 unk
|
||||
packet.Worldstates.emplace_back(0x56e, 0x0); // 25 iceblood a
|
||||
packet.Worldstates.emplace_back(0x56d, 0x0); // 26 towerp a
|
||||
packet.Worldstates.emplace_back(0x56c, 0x0); // 27 frostwolfe a
|
||||
packet.Worldstates.emplace_back(0x56b, 0x0); // 28 froswolfw a
|
||||
packet.Worldstates.emplace_back(0x56a, 0x1); // 29 1386 unk
|
||||
packet.Worldstates.emplace_back(0x569, 0x1); // 30 iceblood c
|
||||
packet.Worldstates.emplace_back(0x568, 0x1); // 31 towerp c
|
||||
packet.Worldstates.emplace_back(0x565, 0x0); // 32 stoneh tower a
|
||||
packet.Worldstates.emplace_back(0x564, 0x0); // 33 icewing tower a
|
||||
packet.Worldstates.emplace_back(0x563, 0x0); // 34 dunn a
|
||||
packet.Worldstates.emplace_back(0x562, 0x0); // 35 duns a
|
||||
packet.Worldstates.emplace_back(0x561, 0x0); // 36 stoneheart bunker alliance assaulted - unused
|
||||
packet.Worldstates.emplace_back(0x560, 0x0); // 37 icewing bunker alliance assaulted - unused
|
||||
packet.Worldstates.emplace_back(0x55f, 0x0); // 38 dunbaldar south alliance assaulted - unused
|
||||
packet.Worldstates.emplace_back(0x55e, 0x0); // 39 dunbaldar north alliance assaulted - unused
|
||||
packet.Worldstates.emplace_back(0x55d, 0x0); // 40 stone tower d
|
||||
packet.Worldstates.emplace_back(0x3c6, 0x0); // 41 966 unk
|
||||
packet.Worldstates.emplace_back(0x3c4, 0x0); // 42 964 unk
|
||||
packet.Worldstates.emplace_back(0x3c2, 0x0); // 43 962 unk
|
||||
packet.Worldstates.emplace_back(0x516, 0x1); // 44 stoneheart grave a_c
|
||||
packet.Worldstates.emplace_back(0x515, 0x0); // 45 stonheart grave h_c
|
||||
packet.Worldstates.emplace_back(0x3b6, 0x0); // 46 950 unk
|
||||
packet.Worldstates.emplace_back(0x55c, 0x0); // 47 icewing tower d
|
||||
packet.Worldstates.emplace_back(0x55b, 0x0); // 48 dunn d
|
||||
packet.Worldstates.emplace_back(0x55a, 0x0); // 49 duns d
|
||||
packet.Worldstates.emplace_back(0x559, 0x0); // 50 1369 unk
|
||||
packet.Worldstates.emplace_back(0x558, 0x0); // 51 iceblood d
|
||||
packet.Worldstates.emplace_back(0x557, 0x0); // 52 towerp d
|
||||
packet.Worldstates.emplace_back(0x556, 0x0); // 53 frostwolfe d
|
||||
packet.Worldstates.emplace_back(0x555, 0x0); // 54 frostwolfw d
|
||||
packet.Worldstates.emplace_back(0x554, 0x1); // 55 stoneh tower c
|
||||
packet.Worldstates.emplace_back(0x553, 0x1); // 56 icewing tower c
|
||||
packet.Worldstates.emplace_back(0x552, 0x1); // 57 dunn c
|
||||
packet.Worldstates.emplace_back(0x551, 0x1); // 58 duns c
|
||||
packet.Worldstates.emplace_back(0x54f, 0x0); // 59 irondeep (N) horde
|
||||
packet.Worldstates.emplace_back(0x54e, 0x0); // 60 irondeep (N) ally
|
||||
packet.Worldstates.emplace_back(0x54d, 0x1); // 61 mine (S) neutral
|
||||
packet.Worldstates.emplace_back(0x54c, 0x0); // 62 mine (S) horde
|
||||
packet.Worldstates.emplace_back(0x54b, 0x0); // 63 mine (S) ally
|
||||
packet.Worldstates.emplace_back(0x545, 0x0); // 64 iceblood h_a
|
||||
packet.Worldstates.emplace_back(0x543, 0x1); // 65 iceblod h_c
|
||||
packet.Worldstates.emplace_back(0x542, 0x0); // 66 iceblood a_c
|
||||
packet.Worldstates.emplace_back(0x540, 0x0); // 67 snowfall h_a
|
||||
packet.Worldstates.emplace_back(0x53f, 0x0); // 68 snowfall a_a
|
||||
packet.Worldstates.emplace_back(0x53e, 0x0); // 69 snowfall h_c
|
||||
packet.Worldstates.emplace_back(0x53d, 0x0); // 70 snowfall a_c
|
||||
packet.Worldstates.emplace_back(0x53c, 0x0); // 71 frostwolf g h_a
|
||||
packet.Worldstates.emplace_back(0x53b, 0x0); // 72 frostwolf g a_a
|
||||
packet.Worldstates.emplace_back(0x53a, 0x1); // 73 frostwolf g h_c
|
||||
packet.Worldstates.emplace_back(0x539, 0x0); // 74 frostwolf g a_c
|
||||
packet.Worldstates.emplace_back(0x538, 0x0); // 75 stormpike grave h_a
|
||||
packet.Worldstates.emplace_back(0x537, 0x0); // 76 stormpike grave a_a
|
||||
packet.Worldstates.emplace_back(0x534, 0x0); // 77 frostwolf hut h_a
|
||||
packet.Worldstates.emplace_back(0x533, 0x0); // 78 frostwolf hut a_a
|
||||
packet.Worldstates.emplace_back(0x530, 0x0); // 79 stormpike first aid h_a
|
||||
packet.Worldstates.emplace_back(0x52f, 0x0); // 80 stormpike first aid h_c
|
||||
packet.Worldstates.emplace_back(0x52d, 0x1); // 81 stormpike first aid a_c
|
||||
}
|
||||
break;
|
||||
case 3277: // Warsong Gulch
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_WS)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0x62d) << uint32(0x0); // 7 1581 alliance flag captures
|
||||
data << uint32(0x62e) << uint32(0x0); // 8 1582 horde flag captures
|
||||
data << uint32(0x609) << uint32(0x0); // 9 1545 unk, set to 1 on alliance flag pickup...
|
||||
data << uint32(0x60a) << uint32(0x0); // 10 1546 unk, set to 1 on horde flag pickup, after drop it's -1
|
||||
data << uint32(0x60b) << uint32(0x2); // 11 1547 unk
|
||||
data << uint32(0x641) << uint32(0x3); // 12 1601 unk (max flag captures?)
|
||||
data << uint32(0x922) << uint32(0x1); // 13 2338 horde (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
data << uint32(0x923) << uint32(0x1); // 14 2339 alliance (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
packet.Worldstates.emplace_back(0x62d, 0x0); // 7 1581 alliance flag captures
|
||||
packet.Worldstates.emplace_back(0x62e, 0x0); // 8 1582 horde flag captures
|
||||
packet.Worldstates.emplace_back(0x609, 0x0); // 9 1545 unk, set to 1 on alliance flag pickup...
|
||||
packet.Worldstates.emplace_back(0x60a, 0x0); // 10 1546 unk, set to 1 on horde flag pickup, after drop it's -1
|
||||
packet.Worldstates.emplace_back(0x60b, 0x2); // 11 1547 unk
|
||||
packet.Worldstates.emplace_back(0x641, 0x3); // 12 1601 unk (max flag captures?)
|
||||
packet.Worldstates.emplace_back(0x922, 0x1); // 13 2338 horde (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
packet.Worldstates.emplace_back(0x923, 0x1); // 14 2339 alliance (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
}
|
||||
break;
|
||||
case 3358: // Arathi Basin
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_AB)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0x6e7) << uint32(0x0); // 7 1767 stables alliance
|
||||
data << uint32(0x6e8) << uint32(0x0); // 8 1768 stables horde
|
||||
data << uint32(0x6e9) << uint32(0x0); // 9 1769 unk, ST?
|
||||
data << uint32(0x6ea) << uint32(0x0); // 10 1770 stables (show/hide)
|
||||
data << uint32(0x6ec) << uint32(0x0); // 11 1772 farm (0 - horde controlled, 1 - alliance controlled)
|
||||
data << uint32(0x6ed) << uint32(0x0); // 12 1773 farm (show/hide)
|
||||
data << uint32(0x6ee) << uint32(0x0); // 13 1774 farm color
|
||||
data << uint32(0x6ef) << uint32(0x0); // 14 1775 gold mine color, may be FM?
|
||||
data << uint32(0x6f0) << uint32(0x0); // 15 1776 alliance resources
|
||||
data << uint32(0x6f1) << uint32(0x0); // 16 1777 horde resources
|
||||
data << uint32(0x6f2) << uint32(0x0); // 17 1778 horde bases
|
||||
data << uint32(0x6f3) << uint32(0x0); // 18 1779 alliance bases
|
||||
data << uint32(0x6f4) << uint32(0x7d0); // 19 1780 max resources (2000)
|
||||
data << uint32(0x6f6) << uint32(0x0); // 20 1782 blacksmith color
|
||||
data << uint32(0x6f7) << uint32(0x0); // 21 1783 blacksmith (show/hide)
|
||||
data << uint32(0x6f8) << uint32(0x0); // 22 1784 unk, bs?
|
||||
data << uint32(0x6f9) << uint32(0x0); // 23 1785 unk, bs?
|
||||
data << uint32(0x6fb) << uint32(0x0); // 24 1787 gold mine (0 - horde contr, 1 - alliance contr)
|
||||
data << uint32(0x6fc) << uint32(0x0); // 25 1788 gold mine (0 - conflict, 1 - horde)
|
||||
data << uint32(0x6fd) << uint32(0x0); // 26 1789 gold mine (1 - show/0 - hide)
|
||||
data << uint32(0x6fe) << uint32(0x0); // 27 1790 gold mine color
|
||||
data << uint32(0x700) << uint32(0x0); // 28 1792 gold mine color, wtf?, may be LM?
|
||||
data << uint32(0x701) << uint32(0x0); // 29 1793 lumber mill color (0 - conflict, 1 - horde contr)
|
||||
data << uint32(0x702) << uint32(0x0); // 30 1794 lumber mill (show/hide)
|
||||
data << uint32(0x703) << uint32(0x0); // 31 1795 lumber mill color color
|
||||
data << uint32(0x732) << uint32(0x1); // 32 1842 stables (1 - uncontrolled)
|
||||
data << uint32(0x733) << uint32(0x1); // 33 1843 gold mine (1 - uncontrolled)
|
||||
data << uint32(0x734) << uint32(0x1); // 34 1844 lumber mill (1 - uncontrolled)
|
||||
data << uint32(0x735) << uint32(0x1); // 35 1845 farm (1 - uncontrolled)
|
||||
data << uint32(0x736) << uint32(0x1); // 36 1846 blacksmith (1 - uncontrolled)
|
||||
data << uint32(0x745) << uint32(0x2); // 37 1861 unk
|
||||
data << uint32(0x7a3) << uint32(0x708); // 38 1955 warning limit (1800)
|
||||
packet.Worldstates.emplace_back(0x6e7, 0x0); // 7 1767 stables alliance
|
||||
packet.Worldstates.emplace_back(0x6e8, 0x0); // 8 1768 stables horde
|
||||
packet.Worldstates.emplace_back(0x6e9, 0x0); // 9 1769 unk, ST?
|
||||
packet.Worldstates.emplace_back(0x6ea, 0x0); // 10 1770 stables (show/hide)
|
||||
packet.Worldstates.emplace_back(0x6ec, 0x0); // 11 1772 farm (0 - horde controlled, 1 - alliance controlled)
|
||||
packet.Worldstates.emplace_back(0x6ed, 0x0); // 12 1773 farm (show/hide)
|
||||
packet.Worldstates.emplace_back(0x6ee, 0x0); // 13 1774 farm color
|
||||
packet.Worldstates.emplace_back(0x6ef, 0x0); // 14 1775 gold mine color, may be FM?
|
||||
packet.Worldstates.emplace_back(0x6f0, 0x0); // 15 1776 alliance resources
|
||||
packet.Worldstates.emplace_back(0x6f1, 0x0); // 16 1777 horde resources
|
||||
packet.Worldstates.emplace_back(0x6f2, 0x0); // 17 1778 horde bases
|
||||
packet.Worldstates.emplace_back(0x6f3, 0x0); // 18 1779 alliance bases
|
||||
packet.Worldstates.emplace_back(0x6f4, 0x7d0); // 19 1780 max resources (2000)
|
||||
packet.Worldstates.emplace_back(0x6f6, 0x0); // 20 1782 blacksmith color
|
||||
packet.Worldstates.emplace_back(0x6f7, 0x0); // 21 1783 blacksmith (show/hide)
|
||||
packet.Worldstates.emplace_back(0x6f8, 0x0); // 22 1784 unk, bs?
|
||||
packet.Worldstates.emplace_back(0x6f9, 0x0); // 23 1785 unk, bs?
|
||||
packet.Worldstates.emplace_back(0x6fb, 0x0); // 24 1787 gold mine (0 - horde contr, 1 - alliance contr)
|
||||
packet.Worldstates.emplace_back(0x6fc, 0x0); // 25 1788 gold mine (0 - conflict, 1 - horde)
|
||||
packet.Worldstates.emplace_back(0x6fd, 0x0); // 26 1789 gold mine (1 - show/0 - hide)
|
||||
packet.Worldstates.emplace_back(0x6fe, 0x0); // 27 1790 gold mine color
|
||||
packet.Worldstates.emplace_back(0x700, 0x0); // 28 1792 gold mine color, wtf?, may be LM?
|
||||
packet.Worldstates.emplace_back(0x701, 0x0); // 29 1793 lumber mill color (0 - conflict, 1 - horde contr)
|
||||
packet.Worldstates.emplace_back(0x702, 0x0); // 30 1794 lumber mill (show/hide)
|
||||
packet.Worldstates.emplace_back(0x703, 0x0); // 31 1795 lumber mill color color
|
||||
packet.Worldstates.emplace_back(0x732, 0x1); // 32 1842 stables (1 - uncontrolled)
|
||||
packet.Worldstates.emplace_back(0x733, 0x1); // 33 1843 gold mine (1 - uncontrolled)
|
||||
packet.Worldstates.emplace_back(0x734, 0x1); // 34 1844 lumber mill (1 - uncontrolled)
|
||||
packet.Worldstates.emplace_back(0x735, 0x1); // 35 1845 farm (1 - uncontrolled)
|
||||
packet.Worldstates.emplace_back(0x736, 0x1); // 36 1846 blacksmith (1 - uncontrolled)
|
||||
packet.Worldstates.emplace_back(0x745, 0x2); // 37 1861 unk
|
||||
packet.Worldstates.emplace_back(0x7a3, 0x708); // 38 1955 warning limit (1800)
|
||||
}
|
||||
break;
|
||||
case 3820: // Eye of the Storm
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_EY)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0xac1) << uint32(0x0); // 7 2753 Horde Bases
|
||||
data << uint32(0xac0) << uint32(0x0); // 8 2752 Alliance Bases
|
||||
data << uint32(0xab6) << uint32(0x0); // 9 2742 Mage Tower - Horde conflict
|
||||
data << uint32(0xab5) << uint32(0x0); // 10 2741 Mage Tower - Alliance conflict
|
||||
data << uint32(0xab4) << uint32(0x0); // 11 2740 Fel Reaver - Horde conflict
|
||||
data << uint32(0xab3) << uint32(0x0); // 12 2739 Fel Reaver - Alliance conflict
|
||||
data << uint32(0xab2) << uint32(0x0); // 13 2738 Draenei - Alliance conflict
|
||||
data << uint32(0xab1) << uint32(0x0); // 14 2737 Draenei - Horde conflict
|
||||
data << uint32(0xab0) << uint32(0x0); // 15 2736 unk // 0 at start
|
||||
data << uint32(0xaaf) << uint32(0x0); // 16 2735 unk // 0 at start
|
||||
data << uint32(0xaad) << uint32(0x0); // 17 2733 Draenei - Horde control
|
||||
data << uint32(0xaac) << uint32(0x0); // 18 2732 Draenei - Alliance control
|
||||
data << uint32(0xaab) << uint32(0x1); // 19 2731 Draenei uncontrolled (1 - yes, 0 - no)
|
||||
data << uint32(0xaaa) << uint32(0x0); // 20 2730 Mage Tower - Alliance control
|
||||
data << uint32(0xaa9) << uint32(0x0); // 21 2729 Mage Tower - Horde control
|
||||
data << uint32(0xaa8) << uint32(0x1); // 22 2728 Mage Tower uncontrolled (1 - yes, 0 - no)
|
||||
data << uint32(0xaa7) << uint32(0x0); // 23 2727 Fel Reaver - Horde control
|
||||
data << uint32(0xaa6) << uint32(0x0); // 24 2726 Fel Reaver - Alliance control
|
||||
data << uint32(0xaa5) << uint32(0x1); // 25 2725 Fel Reaver uncontrolled (1 - yes, 0 - no)
|
||||
data << uint32(0xaa4) << uint32(0x0); // 26 2724 Boold Elf - Horde control
|
||||
data << uint32(0xaa3) << uint32(0x0); // 27 2723 Boold Elf - Alliance control
|
||||
data << uint32(0xaa2) << uint32(0x1); // 28 2722 Boold Elf uncontrolled (1 - yes, 0 - no)
|
||||
data << uint32(0xac5) << uint32(0x1); // 29 2757 Flag (1 - show, 0 - hide) - doesn't work exactly this way!
|
||||
data << uint32(0xad2) << uint32(0x1); // 30 2770 Horde top-stats (1 - show, 0 - hide) // 02 -> horde picked up the flag
|
||||
data << uint32(0xad1) << uint32(0x1); // 31 2769 Alliance top-stats (1 - show, 0 - hide) // 02 -> alliance picked up the flag
|
||||
data << uint32(0xabe) << uint32(0x0); // 32 2750 Horde resources
|
||||
data << uint32(0xabd) << uint32(0x0); // 33 2749 Alliance resources
|
||||
data << uint32(0xa05) << uint32(0x8e); // 34 2565 unk, constant?
|
||||
data << uint32(0xaa0) << uint32(0x0); // 35 2720 Capturing progress-bar (100 -> empty (only grey), 0 -> blue|red (no grey), default 0)
|
||||
data << uint32(0xa9f) << uint32(0x0); // 36 2719 Capturing progress-bar (0 - left, 100 - right)
|
||||
data << uint32(0xa9e) << uint32(0x0); // 37 2718 Capturing progress-bar (1 - show, 0 - hide)
|
||||
data << uint32(0xc0d) << uint32(0x17b); // 38 3085 unk
|
||||
packet.Worldstates.emplace_back(0xac1, 0x0); // 7 2753 Horde Bases
|
||||
packet.Worldstates.emplace_back(0xac0, 0x0); // 8 2752 Alliance Bases
|
||||
packet.Worldstates.emplace_back(0xab6, 0x0); // 9 2742 Mage Tower - Horde conflict
|
||||
packet.Worldstates.emplace_back(0xab5, 0x0); // 10 2741 Mage Tower - Alliance conflict
|
||||
packet.Worldstates.emplace_back(0xab4, 0x0); // 11 2740 Fel Reaver - Horde conflict
|
||||
packet.Worldstates.emplace_back(0xab3, 0x0); // 12 2739 Fel Reaver - Alliance conflict
|
||||
packet.Worldstates.emplace_back(0xab2, 0x0); // 13 2738 Draenei - Alliance conflict
|
||||
packet.Worldstates.emplace_back(0xab1, 0x0); // 14 2737 Draenei - Horde conflict
|
||||
packet.Worldstates.emplace_back(0xab0, 0x0); // 15 2736 unk // 0 at start
|
||||
packet.Worldstates.emplace_back(0xaaf, 0x0); // 16 2735 unk // 0 at start
|
||||
packet.Worldstates.emplace_back(0xaad, 0x0); // 17 2733 Draenei - Horde control
|
||||
packet.Worldstates.emplace_back(0xaac, 0x0); // 18 2732 Draenei - Alliance control
|
||||
packet.Worldstates.emplace_back(0xaab, 0x1); // 19 2731 Draenei uncontrolled (1 - yes, 0 - no)
|
||||
packet.Worldstates.emplace_back(0xaaa, 0x0); // 20 2730 Mage Tower - Alliance control
|
||||
packet.Worldstates.emplace_back(0xaa9, 0x0); // 21 2729 Mage Tower - Horde control
|
||||
packet.Worldstates.emplace_back(0xaa8, 0x1); // 22 2728 Mage Tower uncontrolled (1 - yes, 0 - no)
|
||||
packet.Worldstates.emplace_back(0xaa7, 0x0); // 23 2727 Fel Reaver - Horde control
|
||||
packet.Worldstates.emplace_back(0xaa6, 0x0); // 24 2726 Fel Reaver - Alliance control
|
||||
packet.Worldstates.emplace_back(0xaa5, 0x1); // 25 2725 Fel Reaver uncontrolled (1 - yes, 0 - no)
|
||||
packet.Worldstates.emplace_back(0xaa4, 0x0); // 26 2724 Boold Elf - Horde control
|
||||
packet.Worldstates.emplace_back(0xaa3, 0x0); // 27 2723 Boold Elf - Alliance control
|
||||
packet.Worldstates.emplace_back(0xaa2, 0x1); // 28 2722 Boold Elf uncontrolled (1 - yes, 0 - no)
|
||||
packet.Worldstates.emplace_back(0xac5, 0x1); // 29 2757 Flag (1 - show, 0 - hide) - doesn't work exactly this way!
|
||||
packet.Worldstates.emplace_back(0xad2, 0x1); // 30 2770 Horde top-stats (1 - show, 0 - hide) // 02 -> horde picked up the flag
|
||||
packet.Worldstates.emplace_back(0xad1, 0x1); // 31 2769 Alliance top-stats (1 - show, 0 - hide) // 02 -> alliance picked up the flag
|
||||
packet.Worldstates.emplace_back(0xabe, 0x0); // 32 2750 Horde resources
|
||||
packet.Worldstates.emplace_back(0xabd, 0x0); // 33 2749 Alliance resources
|
||||
packet.Worldstates.emplace_back(0xa05, 0x8e); // 34 2565 unk, constant?
|
||||
packet.Worldstates.emplace_back(0xaa0, 0x0); // 35 2720 Capturing progress-bar (100 -> empty (only grey), 0 -> blue|red (no grey), default 0)
|
||||
packet.Worldstates.emplace_back(0xa9f, 0x0); // 36 2719 Capturing progress-bar (0 - left, 100 - right)
|
||||
packet.Worldstates.emplace_back(0xa9e, 0x0); // 37 2718 Capturing progress-bar (1 - show, 0 - hide)
|
||||
packet.Worldstates.emplace_back(0xc0d, 0x17b); // 38 3085 unk
|
||||
// and some more ... unknown
|
||||
}
|
||||
break;
|
||||
@@ -9031,361 +9027,358 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
|
||||
// ON EVERY ZONE LEAVE, RESET THE OLD ZONE'S WORLD STATE, BUT AT LEAST THE UI STUFF!
|
||||
case 3483: // Hellfire Peninsula
|
||||
if (pvp && pvp->GetTypeId() == OUTDOOR_PVP_HP)
|
||||
pvp->FillInitialWorldStates(data);
|
||||
pvp->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0x9ba) << uint32(0x1); // 10 // add ally tower main gui icon // maybe should be sent only on login?
|
||||
data << uint32(0x9b9) << uint32(0x1); // 11 // add horde tower main gui icon // maybe should be sent only on login?
|
||||
data << uint32(0x9b5) << uint32(0x0); // 12 // show neutral broken hill icon // 2485
|
||||
data << uint32(0x9b4) << uint32(0x1); // 13 // show icon above broken hill // 2484
|
||||
data << uint32(0x9b3) << uint32(0x0); // 14 // show ally broken hill icon // 2483
|
||||
data << uint32(0x9b2) << uint32(0x0); // 15 // show neutral overlook icon // 2482
|
||||
data << uint32(0x9b1) << uint32(0x1); // 16 // show the overlook arrow // 2481
|
||||
data << uint32(0x9b0) << uint32(0x0); // 17 // show ally overlook icon // 2480
|
||||
data << uint32(0x9ae) << uint32(0x0); // 18 // horde pvp objectives captured // 2478
|
||||
data << uint32(0x9ac) << uint32(0x0); // 19 // ally pvp objectives captured // 2476
|
||||
data << uint32(2475) << uint32(100); //: ally / horde slider grey area // show only in direct vicinity!
|
||||
data << uint32(2474) << uint32(50); //: ally / horde slider percentage, 100 for ally, 0 for horde // show only in direct vicinity!
|
||||
data << uint32(2473) << uint32(0); //: ally / horde slider display // show only in direct vicinity!
|
||||
data << uint32(0x9a8) << uint32(0x0); // 20 // show the neutral stadium icon // 2472
|
||||
data << uint32(0x9a7) << uint32(0x0); // 21 // show the ally stadium icon // 2471
|
||||
data << uint32(0x9a6) << uint32(0x1); // 22 // show the horde stadium icon // 2470
|
||||
packet.Worldstates.emplace_back(0x9ba, 0x1); // 10 // add ally tower main gui icon // maybe should be sent only on login?
|
||||
packet.Worldstates.emplace_back(0x9b9, 0x1); // 11 // add horde tower main gui icon // maybe should be sent only on login?
|
||||
packet.Worldstates.emplace_back(0x9b5, 0x0); // 12 // show neutral broken hill icon // 2485
|
||||
packet.Worldstates.emplace_back(0x9b4, 0x1); // 13 // show icon above broken hill // 2484
|
||||
packet.Worldstates.emplace_back(0x9b3, 0x0); // 14 // show ally broken hill icon // 2483
|
||||
packet.Worldstates.emplace_back(0x9b2, 0x0); // 15 // show neutral overlook icon // 2482
|
||||
packet.Worldstates.emplace_back(0x9b1, 0x1); // 16 // show the overlook arrow // 2481
|
||||
packet.Worldstates.emplace_back(0x9b0, 0x0); // 17 // show ally overlook icon // 2480
|
||||
packet.Worldstates.emplace_back(0x9ae, 0x0); // 18 // horde pvp objectives captured // 2478
|
||||
packet.Worldstates.emplace_back(0x9ac, 0x0); // 19 // ally pvp objectives captured // 2476
|
||||
packet.Worldstates.emplace_back(2475, 100); //: ally / horde slider grey area // show only in direct vicinity!
|
||||
packet.Worldstates.emplace_back(2474, 50); //: ally / horde slider percentage, 100 for ally, 0 for horde // show only in direct vicinity!
|
||||
packet.Worldstates.emplace_back(2473, 0); //: ally / horde slider display // show only in direct vicinity!
|
||||
packet.Worldstates.emplace_back(0x9a8, 0x0); // 20 // show the neutral stadium icon // 2472
|
||||
packet.Worldstates.emplace_back(0x9a7, 0x0); // 21 // show the ally stadium icon // 2471
|
||||
packet.Worldstates.emplace_back(0x9a6, 0x1); // 22 // show the horde stadium icon // 2470
|
||||
}
|
||||
break;
|
||||
case 3518: // Nagrand
|
||||
if (pvp && pvp->GetTypeId() == OUTDOOR_PVP_NA)
|
||||
pvp->FillInitialWorldStates(data);
|
||||
pvp->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(2503) << uint32(0x0); // 10
|
||||
data << uint32(2502) << uint32(0x0); // 11
|
||||
data << uint32(2493) << uint32(0x0); // 12
|
||||
data << uint32(2491) << uint32(0x0); // 13
|
||||
packet.Worldstates.emplace_back(2503, 0x0); // 10
|
||||
packet.Worldstates.emplace_back(2502, 0x0); // 11
|
||||
packet.Worldstates.emplace_back(2493, 0x0); // 12
|
||||
packet.Worldstates.emplace_back(2491, 0x0); // 13
|
||||
|
||||
data << uint32(2495) << uint32(0x0); // 14
|
||||
data << uint32(2494) << uint32(0x0); // 15
|
||||
data << uint32(2497) << uint32(0x0); // 16
|
||||
packet.Worldstates.emplace_back(2495, 0x0); // 14
|
||||
packet.Worldstates.emplace_back(2494, 0x0); // 15
|
||||
packet.Worldstates.emplace_back(2497, 0x0); // 16
|
||||
|
||||
data << uint32(2762) << uint32(0x0); // 17
|
||||
data << uint32(2662) << uint32(0x0); // 18
|
||||
data << uint32(2663) << uint32(0x0); // 19
|
||||
data << uint32(2664) << uint32(0x0); // 20
|
||||
packet.Worldstates.emplace_back(2762, 0x0); // 17
|
||||
packet.Worldstates.emplace_back(2662, 0x0); // 18
|
||||
packet.Worldstates.emplace_back(2663, 0x0); // 19
|
||||
packet.Worldstates.emplace_back(2664, 0x0); // 20
|
||||
|
||||
data << uint32(2760) << uint32(0x0); // 21
|
||||
data << uint32(2670) << uint32(0x0); // 22
|
||||
data << uint32(2668) << uint32(0x0); // 23
|
||||
data << uint32(2669) << uint32(0x0); // 24
|
||||
packet.Worldstates.emplace_back(2760, 0x0); // 21
|
||||
packet.Worldstates.emplace_back(2670, 0x0); // 22
|
||||
packet.Worldstates.emplace_back(2668, 0x0); // 23
|
||||
packet.Worldstates.emplace_back(2669, 0x0); // 24
|
||||
|
||||
data << uint32(2761) << uint32(0x0); // 25
|
||||
data << uint32(2667) << uint32(0x0); // 26
|
||||
data << uint32(2665) << uint32(0x0); // 27
|
||||
data << uint32(2666) << uint32(0x0); // 28
|
||||
packet.Worldstates.emplace_back(2761, 0x0); // 25
|
||||
packet.Worldstates.emplace_back(2667, 0x0); // 26
|
||||
packet.Worldstates.emplace_back(2665, 0x0); // 27
|
||||
packet.Worldstates.emplace_back(2666, 0x0); // 28
|
||||
|
||||
data << uint32(2763) << uint32(0x0); // 29
|
||||
data << uint32(2659) << uint32(0x0); // 30
|
||||
data << uint32(2660) << uint32(0x0); // 31
|
||||
data << uint32(2661) << uint32(0x0); // 32
|
||||
packet.Worldstates.emplace_back(2763, 0x0); // 29
|
||||
packet.Worldstates.emplace_back(2659, 0x0); // 30
|
||||
packet.Worldstates.emplace_back(2660, 0x0); // 31
|
||||
packet.Worldstates.emplace_back(2661, 0x0); // 32
|
||||
|
||||
data << uint32(2671) << uint32(0x0); // 33
|
||||
data << uint32(2676) << uint32(0x0); // 34
|
||||
data << uint32(2677) << uint32(0x0); // 35
|
||||
data << uint32(2672) << uint32(0x0); // 36
|
||||
data << uint32(2673) << uint32(0x0); // 37
|
||||
packet.Worldstates.emplace_back(2671, 0x0); // 33
|
||||
packet.Worldstates.emplace_back(2676, 0x0); // 34
|
||||
packet.Worldstates.emplace_back(2677, 0x0); // 35
|
||||
packet.Worldstates.emplace_back(2672, 0x0); // 36
|
||||
packet.Worldstates.emplace_back(2673, 0x0); // 37
|
||||
}
|
||||
break;
|
||||
case 3519: // Terokkar Forest
|
||||
if (pvp && pvp->GetTypeId() == OUTDOOR_PVP_TF)
|
||||
pvp->FillInitialWorldStates(data);
|
||||
pvp->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0xa41) << uint32(0x0); // 10 // 2625 capture bar pos
|
||||
data << uint32(0xa40) << uint32(0x14); // 11 // 2624 capture bar neutral
|
||||
data << uint32(0xa3f) << uint32(0x0); // 12 // 2623 show capture bar
|
||||
data << uint32(0xa3e) << uint32(0x0); // 13 // 2622 horde towers controlled
|
||||
data << uint32(0xa3d) << uint32(0x5); // 14 // 2621 ally towers controlled
|
||||
data << uint32(0xa3c) << uint32(0x0); // 15 // 2620 show towers controlled
|
||||
data << uint32(0xa88) << uint32(0x0); // 16 // 2696 SE Neu
|
||||
data << uint32(0xa87) << uint32(0x0); // 17 // SE Horde
|
||||
data << uint32(0xa86) << uint32(0x0); // 18 // SE Ally
|
||||
data << uint32(0xa85) << uint32(0x0); // 19 //S Neu
|
||||
data << uint32(0xa84) << uint32(0x0); // 20 S Horde
|
||||
data << uint32(0xa83) << uint32(0x0); // 21 S Ally
|
||||
data << uint32(0xa82) << uint32(0x0); // 22 NE Neu
|
||||
data << uint32(0xa81) << uint32(0x0); // 23 NE Horde
|
||||
data << uint32(0xa80) << uint32(0x0); // 24 NE Ally
|
||||
data << uint32(0xa7e) << uint32(0x0); // 25 // 2686 N Neu
|
||||
data << uint32(0xa7d) << uint32(0x0); // 26 N Horde
|
||||
data << uint32(0xa7c) << uint32(0x0); // 27 N Ally
|
||||
data << uint32(0xa7b) << uint32(0x0); // 28 NW Ally
|
||||
data << uint32(0xa7a) << uint32(0x0); // 29 NW Horde
|
||||
data << uint32(0xa79) << uint32(0x0); // 30 NW Neutral
|
||||
data << uint32(0x9d0) << uint32(0x5); // 31 // 2512 locked time remaining seconds first digit
|
||||
data << uint32(0x9ce) << uint32(0x0); // 32 // 2510 locked time remaining seconds second digit
|
||||
data << uint32(0x9cd) << uint32(0x0); // 33 // 2509 locked time remaining minutes
|
||||
data << uint32(0x9cc) << uint32(0x0); // 34 // 2508 neutral locked time show
|
||||
data << uint32(0xad0) << uint32(0x0); // 35 // 2768 horde locked time show
|
||||
data << uint32(0xacf) << uint32(0x1); // 36 // 2767 ally locked time show
|
||||
packet.Worldstates.emplace_back(0xa41, 0x0); // 10 // 2625 capture bar pos
|
||||
packet.Worldstates.emplace_back(0xa40, 0x14); // 11 // 2624 capture bar neutral
|
||||
packet.Worldstates.emplace_back(0xa3f, 0x0); // 12 // 2623 show capture bar
|
||||
packet.Worldstates.emplace_back(0xa3e, 0x0); // 13 // 2622 horde towers controlled
|
||||
packet.Worldstates.emplace_back(0xa3d, 0x5); // 14 // 2621 ally towers controlled
|
||||
packet.Worldstates.emplace_back(0xa3c, 0x0); // 15 // 2620 show towers controlled
|
||||
packet.Worldstates.emplace_back(0xa88, 0x0); // 16 // 2696 SE Neu
|
||||
packet.Worldstates.emplace_back(0xa87, 0x0); // 17 // SE Horde
|
||||
packet.Worldstates.emplace_back(0xa86, 0x0); // 18 // SE Ally
|
||||
packet.Worldstates.emplace_back(0xa85, 0x0); // 19 //S Neu
|
||||
packet.Worldstates.emplace_back(0xa84, 0x0); // 20 S Horde
|
||||
packet.Worldstates.emplace_back(0xa83, 0x0); // 21 S Ally
|
||||
packet.Worldstates.emplace_back(0xa82, 0x0); // 22 NE Neu
|
||||
packet.Worldstates.emplace_back(0xa81, 0x0); // 23 NE Horde
|
||||
packet.Worldstates.emplace_back(0xa80, 0x0); // 24 NE Ally
|
||||
packet.Worldstates.emplace_back(0xa7e, 0x0); // 25 // 2686 N Neu
|
||||
packet.Worldstates.emplace_back(0xa7d, 0x0); // 26 N Horde
|
||||
packet.Worldstates.emplace_back(0xa7c, 0x0); // 27 N Ally
|
||||
packet.Worldstates.emplace_back(0xa7b, 0x0); // 28 NW Ally
|
||||
packet.Worldstates.emplace_back(0xa7a, 0x0); // 29 NW Horde
|
||||
packet.Worldstates.emplace_back(0xa79, 0x0); // 30 NW Neutral
|
||||
packet.Worldstates.emplace_back(0x9d0, 0x5); // 31 // 2512 locked time remaining seconds first digit
|
||||
packet.Worldstates.emplace_back(0x9ce, 0x0); // 32 // 2510 locked time remaining seconds second digit
|
||||
packet.Worldstates.emplace_back(0x9cd, 0x0); // 33 // 2509 locked time remaining minutes
|
||||
packet.Worldstates.emplace_back(0x9cc, 0x0); // 34 // 2508 neutral locked time show
|
||||
packet.Worldstates.emplace_back(0xad0, 0x0); // 35 // 2768 horde locked time show
|
||||
packet.Worldstates.emplace_back(0xacf, 0x1); // 36 // 2767 ally locked time show
|
||||
}
|
||||
break;
|
||||
case 3521: // Zangarmarsh
|
||||
if (pvp && pvp->GetTypeId() == OUTDOOR_PVP_ZM)
|
||||
pvp->FillInitialWorldStates(data);
|
||||
pvp->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0x9e1) << uint32(0x0); // 10 //2529
|
||||
data << uint32(0x9e0) << uint32(0x0); // 11
|
||||
data << uint32(0x9df) << uint32(0x0); // 12
|
||||
data << uint32(0xa5d) << uint32(0x1); // 13 //2653
|
||||
data << uint32(0xa5c) << uint32(0x0); // 14 //2652 east beacon neutral
|
||||
data << uint32(0xa5b) << uint32(0x1); // 15 horde
|
||||
data << uint32(0xa5a) << uint32(0x0); // 16 ally
|
||||
data << uint32(0xa59) << uint32(0x1); // 17 // 2649 Twin spire graveyard horde 12???
|
||||
data << uint32(0xa58) << uint32(0x0); // 18 ally 14 ???
|
||||
data << uint32(0xa57) << uint32(0x0); // 19 neutral 7???
|
||||
data << uint32(0xa56) << uint32(0x0); // 20 // 2646 west beacon neutral
|
||||
data << uint32(0xa55) << uint32(0x1); // 21 horde
|
||||
data << uint32(0xa54) << uint32(0x0); // 22 ally
|
||||
data << uint32(0x9e7) << uint32(0x0); // 23 // 2535
|
||||
data << uint32(0x9e6) << uint32(0x0); // 24
|
||||
data << uint32(0x9e5) << uint32(0x0); // 25
|
||||
data << uint32(0xa00) << uint32(0x0); // 26 // 2560
|
||||
data << uint32(0x9ff) << uint32(0x1); // 27
|
||||
data << uint32(0x9fe) << uint32(0x0); // 28
|
||||
data << uint32(0x9fd) << uint32(0x0); // 29
|
||||
data << uint32(0x9fc) << uint32(0x1); // 30
|
||||
data << uint32(0x9fb) << uint32(0x0); // 31
|
||||
data << uint32(0xa62) << uint32(0x0); // 32 // 2658
|
||||
data << uint32(0xa61) << uint32(0x1); // 33
|
||||
data << uint32(0xa60) << uint32(0x1); // 34
|
||||
data << uint32(0xa5f) << uint32(0x0); // 35
|
||||
packet.Worldstates.emplace_back(0x9e1, 0x0); // 10 //2529
|
||||
packet.Worldstates.emplace_back(0x9e0, 0x0); // 11
|
||||
packet.Worldstates.emplace_back(0x9df, 0x0); // 12
|
||||
packet.Worldstates.emplace_back(0xa5d, 0x1); // 13 //2653
|
||||
packet.Worldstates.emplace_back(0xa5c, 0x0); // 14 //2652 east beacon neutral
|
||||
packet.Worldstates.emplace_back(0xa5b, 0x1); // 15 horde
|
||||
packet.Worldstates.emplace_back(0xa5a, 0x0); // 16 ally
|
||||
packet.Worldstates.emplace_back(0xa59, 0x1); // 17 // 2649 Twin spire graveyard horde 12???
|
||||
packet.Worldstates.emplace_back(0xa58, 0x0); // 18 ally 14 ???
|
||||
packet.Worldstates.emplace_back(0xa57, 0x0); // 19 neutral 7???
|
||||
packet.Worldstates.emplace_back(0xa56, 0x0); // 20 // 2646 west beacon neutral
|
||||
packet.Worldstates.emplace_back(0xa55, 0x1); // 21 horde
|
||||
packet.Worldstates.emplace_back(0xa54, 0x0); // 22 ally
|
||||
packet.Worldstates.emplace_back(0x9e7, 0x0); // 23 // 2535
|
||||
packet.Worldstates.emplace_back(0x9e6, 0x0); // 24
|
||||
packet.Worldstates.emplace_back(0x9e5, 0x0); // 25
|
||||
packet.Worldstates.emplace_back(0xa00, 0x0); // 26 // 2560
|
||||
packet.Worldstates.emplace_back(0x9ff, 0x1); // 27
|
||||
packet.Worldstates.emplace_back(0x9fe, 0x0); // 28
|
||||
packet.Worldstates.emplace_back(0x9fd, 0x0); // 29
|
||||
packet.Worldstates.emplace_back(0x9fc, 0x1); // 30
|
||||
packet.Worldstates.emplace_back(0x9fb, 0x0); // 31
|
||||
packet.Worldstates.emplace_back(0xa62, 0x0); // 32 // 2658
|
||||
packet.Worldstates.emplace_back(0xa61, 0x1); // 33
|
||||
packet.Worldstates.emplace_back(0xa60, 0x1); // 34
|
||||
packet.Worldstates.emplace_back(0xa5f, 0x0); // 35
|
||||
}
|
||||
break;
|
||||
case 3698: // Nagrand Arena
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_NA)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0xa0f) << uint32(0x0); // 7
|
||||
data << uint32(0xa10) << uint32(0x0); // 8
|
||||
data << uint32(0xa11) << uint32(0x0); // 9 show
|
||||
packet.Worldstates.emplace_back(0xa0f, 0x0); // 7
|
||||
packet.Worldstates.emplace_back(0xa10, 0x0); // 8
|
||||
packet.Worldstates.emplace_back(0xa11, 0x0); // 9 show
|
||||
}
|
||||
break;
|
||||
case 3702: // Blade's Edge Arena
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_BE)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0x9f0) << uint32(0x0); // 7 gold
|
||||
data << uint32(0x9f1) << uint32(0x0); // 8 green
|
||||
data << uint32(0x9f3) << uint32(0x0); // 9 show
|
||||
packet.Worldstates.emplace_back(0x9f0, 0x0); // 7 gold
|
||||
packet.Worldstates.emplace_back(0x9f1, 0x0); // 8 green
|
||||
packet.Worldstates.emplace_back(0x9f3, 0x0); // 9 show
|
||||
}
|
||||
break;
|
||||
case 3968: // Ruins of Lordaeron
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_RL)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0xbb8) << uint32(0x0); // 7 gold
|
||||
data << uint32(0xbb9) << uint32(0x0); // 8 green
|
||||
data << uint32(0xbba) << uint32(0x0); // 9 show
|
||||
packet.Worldstates.emplace_back(0xbb8, 0x0); // 7 gold
|
||||
packet.Worldstates.emplace_back(0xbb9, 0x0); // 8 green
|
||||
packet.Worldstates.emplace_back(0xbba, 0x0); // 9 show
|
||||
}
|
||||
break;
|
||||
case 4378: // Dalaran Sewers
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_DS)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(3601) << uint32(0x0); // 7 gold
|
||||
data << uint32(3600) << uint32(0x0); // 8 green
|
||||
data << uint32(3610) << uint32(0x0); // 9 show
|
||||
packet.Worldstates.emplace_back(3601, 0x0); // 7 gold
|
||||
packet.Worldstates.emplace_back(3600, 0x0); // 8 green
|
||||
packet.Worldstates.emplace_back(3610, 0x0); // 9 show
|
||||
}
|
||||
break;
|
||||
case 4384: // Strand of the Ancients
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_SA)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
// 1-3 A defend, 4-6 H defend, 7-9 unk defend, 1 - ok, 2 - half destroyed, 3 - destroyed
|
||||
data << uint32(0xf09) << uint32(0x0); // 7 3849 Gate of Temple
|
||||
data << uint32(0xe36) << uint32(0x0); // 8 3638 Gate of Yellow Moon
|
||||
data << uint32(0xe27) << uint32(0x0); // 9 3623 Gate of Green Emerald
|
||||
data << uint32(0xe24) << uint32(0x0); // 10 3620 Gate of Blue Sapphire
|
||||
data << uint32(0xe21) << uint32(0x0); // 11 3617 Gate of Red Sun
|
||||
data << uint32(0xe1e) << uint32(0x0); // 12 3614 Gate of Purple Ametyst
|
||||
packet.Worldstates.emplace_back(0xf09, 0x0); // 7 3849 Gate of Temple
|
||||
packet.Worldstates.emplace_back(0xe36, 0x0); // 8 3638 Gate of Yellow Moon
|
||||
packet.Worldstates.emplace_back(0xe27, 0x0); // 9 3623 Gate of Green Emerald
|
||||
packet.Worldstates.emplace_back(0xe24, 0x0); // 10 3620 Gate of Blue Sapphire
|
||||
packet.Worldstates.emplace_back(0xe21, 0x0); // 11 3617 Gate of Red Sun
|
||||
packet.Worldstates.emplace_back(0xe1e, 0x0); // 12 3614 Gate of Purple Ametyst
|
||||
|
||||
data << uint32(0xdf3) << uint32(0x0); // 13 3571 bonus timer (1 - on, 0 - off)
|
||||
data << uint32(0xded) << uint32(0x0); // 14 3565 Horde Attacker
|
||||
data << uint32(0xdec) << uint32(0x0); // 15 3564 Alliance Attacker
|
||||
packet.Worldstates.emplace_back(0xdf3, 0x0); // 13 3571 bonus timer (1 - on, 0 - off)
|
||||
packet.Worldstates.emplace_back(0xded, 0x0); // 14 3565 Horde Attacker
|
||||
packet.Worldstates.emplace_back(0xdec, 0x0); // 15 3564 Alliance Attacker
|
||||
// End Round (timer), better explain this by example, eg. ends in 19:59 -> A:BC
|
||||
data << uint32(0xde9) << uint32(0x0); // 16 3561 C
|
||||
data << uint32(0xde8) << uint32(0x0); // 17 3560 B
|
||||
data << uint32(0xde7) << uint32(0x0); // 18 3559 A
|
||||
data << uint32(0xe35) << uint32(0x0); // 19 3637 East g - Horde control
|
||||
data << uint32(0xe34) << uint32(0x0); // 20 3636 West g - Horde control
|
||||
data << uint32(0xe33) << uint32(0x0); // 21 3635 South g - Horde control
|
||||
data << uint32(0xe32) << uint32(0x0); // 22 3634 East g - Alliance control
|
||||
data << uint32(0xe31) << uint32(0x0); // 23 3633 West g - Alliance control
|
||||
data << uint32(0xe30) << uint32(0x0); // 24 3632 South g - Alliance control
|
||||
data << uint32(0xe2f) << uint32(0x0); // 25 3631 Chamber of Ancients - Horde control
|
||||
data << uint32(0xe2e) << uint32(0x0); // 26 3630 Chamber of Ancients - Alliance control
|
||||
data << uint32(0xe2d) << uint32(0x0); // 27 3629 Beach1 - Horde control
|
||||
data << uint32(0xe2c) << uint32(0x0); // 28 3628 Beach2 - Horde control
|
||||
data << uint32(0xe2b) << uint32(0x0); // 29 3627 Beach1 - Alliance control
|
||||
data << uint32(0xe2a) << uint32(0x0); // 30 3626 Beach2 - Alliance control
|
||||
packet.Worldstates.emplace_back(0xde9, 0x0); // 16 3561 C
|
||||
packet.Worldstates.emplace_back(0xde8, 0x0); // 17 3560 B
|
||||
packet.Worldstates.emplace_back(0xde7, 0x0); // 18 3559 A
|
||||
packet.Worldstates.emplace_back(0xe35, 0x0); // 19 3637 East g - Horde control
|
||||
packet.Worldstates.emplace_back(0xe34, 0x0); // 20 3636 West g - Horde control
|
||||
packet.Worldstates.emplace_back(0xe33, 0x0); // 21 3635 South g - Horde control
|
||||
packet.Worldstates.emplace_back(0xe32, 0x0); // 22 3634 East g - Alliance control
|
||||
packet.Worldstates.emplace_back(0xe31, 0x0); // 23 3633 West g - Alliance control
|
||||
packet.Worldstates.emplace_back(0xe30, 0x0); // 24 3632 South g - Alliance control
|
||||
packet.Worldstates.emplace_back(0xe2f, 0x0); // 25 3631 Chamber of Ancients - Horde control
|
||||
packet.Worldstates.emplace_back(0xe2e, 0x0); // 26 3630 Chamber of Ancients - Alliance control
|
||||
packet.Worldstates.emplace_back(0xe2d, 0x0); // 27 3629 Beach1 - Horde control
|
||||
packet.Worldstates.emplace_back(0xe2c, 0x0); // 28 3628 Beach2 - Horde control
|
||||
packet.Worldstates.emplace_back(0xe2b, 0x0); // 29 3627 Beach1 - Alliance control
|
||||
packet.Worldstates.emplace_back(0xe2a, 0x0); // 30 3626 Beach2 - Alliance control
|
||||
// and many unks...
|
||||
}
|
||||
break;
|
||||
case 4406: // Ring of Valor
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_RV)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0xe10) << uint32(0x0); // 7 gold
|
||||
data << uint32(0xe11) << uint32(0x0); // 8 green
|
||||
data << uint32(0xe1a) << uint32(0x0); // 9 show
|
||||
packet.Worldstates.emplace_back(0xe10, 0x0); // 7 gold
|
||||
packet.Worldstates.emplace_back(0xe11, 0x0); // 8 green
|
||||
packet.Worldstates.emplace_back(0xe1a, 0x0); // 9 show
|
||||
}
|
||||
break;
|
||||
case 4710:
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_IC)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(4221) << uint32(1); // 7 BG_IC_ALLIANCE_RENFORT_SET
|
||||
data << uint32(4222) << uint32(1); // 8 BG_IC_HORDE_RENFORT_SET
|
||||
data << uint32(4226) << uint32(300); // 9 BG_IC_ALLIANCE_RENFORT
|
||||
data << uint32(4227) << uint32(300); // 10 BG_IC_HORDE_RENFORT
|
||||
data << uint32(4322) << uint32(1); // 11 BG_IC_GATE_FRONT_H_WS_OPEN
|
||||
data << uint32(4321) << uint32(1); // 12 BG_IC_GATE_WEST_H_WS_OPEN
|
||||
data << uint32(4320) << uint32(1); // 13 BG_IC_GATE_EAST_H_WS_OPEN
|
||||
data << uint32(4323) << uint32(1); // 14 BG_IC_GATE_FRONT_A_WS_OPEN
|
||||
data << uint32(4324) << uint32(1); // 15 BG_IC_GATE_WEST_A_WS_OPEN
|
||||
data << uint32(4325) << uint32(1); // 16 BG_IC_GATE_EAST_A_WS_OPEN
|
||||
data << uint32(4317) << uint32(1); // 17 unknown
|
||||
packet.Worldstates.emplace_back(4221, 1); // 7 BG_IC_ALLIANCE_RENFORT_SET
|
||||
packet.Worldstates.emplace_back(4222, 1); // 8 BG_IC_HORDE_RENFORT_SET
|
||||
packet.Worldstates.emplace_back(4226, 300); // 9 BG_IC_ALLIANCE_RENFORT
|
||||
packet.Worldstates.emplace_back(4227, 300); // 10 BG_IC_HORDE_RENFORT
|
||||
packet.Worldstates.emplace_back(4322, 1); // 11 BG_IC_GATE_FRONT_H_WS_OPEN
|
||||
packet.Worldstates.emplace_back(4321, 1); // 12 BG_IC_GATE_WEST_H_WS_OPEN
|
||||
packet.Worldstates.emplace_back(4320, 1); // 13 BG_IC_GATE_EAST_H_WS_OPEN
|
||||
packet.Worldstates.emplace_back(4323, 1); // 14 BG_IC_GATE_FRONT_A_WS_OPEN
|
||||
packet.Worldstates.emplace_back(4324, 1); // 15 BG_IC_GATE_WEST_A_WS_OPEN
|
||||
packet.Worldstates.emplace_back(4325, 1); // 16 BG_IC_GATE_EAST_A_WS_OPEN
|
||||
packet.Worldstates.emplace_back(4317, 1); // 17 unknown
|
||||
|
||||
data << uint32(4301) << uint32(1); // 18 BG_IC_DOCKS_UNCONTROLLED
|
||||
data << uint32(4296) << uint32(1); // 19 BG_IC_HANGAR_UNCONTROLLED
|
||||
data << uint32(4306) << uint32(1); // 20 BG_IC_QUARRY_UNCONTROLLED
|
||||
data << uint32(4311) << uint32(1); // 21 BG_IC_REFINERY_UNCONTROLLED
|
||||
data << uint32(4294) << uint32(1); // 22 BG_IC_WORKSHOP_UNCONTROLLED
|
||||
data << uint32(4243) << uint32(1); // 23 unknown
|
||||
data << uint32(4345) << uint32(1); // 24 unknown
|
||||
packet.Worldstates.emplace_back(4301, 1); // 18 BG_IC_DOCKS_UNCONTROLLED
|
||||
packet.Worldstates.emplace_back(4296, 1); // 19 BG_IC_HANGAR_UNCONTROLLED
|
||||
packet.Worldstates.emplace_back(4306, 1); // 20 BG_IC_QUARRY_UNCONTROLLED
|
||||
packet.Worldstates.emplace_back(4311, 1); // 21 BG_IC_REFINERY_UNCONTROLLED
|
||||
packet.Worldstates.emplace_back(4294, 1); // 22 BG_IC_WORKSHOP_UNCONTROLLED
|
||||
packet.Worldstates.emplace_back(4243, 1); // 23 unknown
|
||||
packet.Worldstates.emplace_back(4345, 1); // 24 unknown
|
||||
}
|
||||
break;
|
||||
// The Ruby Sanctum
|
||||
case 4987:
|
||||
if (instance && mapid == 724)
|
||||
instance->FillInitialWorldStates(data);
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(5049) << uint32(50); // 9 WORLDSTATE_CORPOREALITY_MATERIAL
|
||||
data << uint32(5050) << uint32(50); // 10 WORLDSTATE_CORPOREALITY_TWILIGHT
|
||||
data << uint32(5051) << uint32(0); // 11 WORLDSTATE_CORPOREALITY_TOGGLE
|
||||
packet.Worldstates.emplace_back(5049, 50); // 9 WORLDSTATE_CORPOREALITY_MATERIAL
|
||||
packet.Worldstates.emplace_back(5050, 50); // 10 WORLDSTATE_CORPOREALITY_TWILIGHT
|
||||
packet.Worldstates.emplace_back(5051, 0); // 11 WORLDSTATE_CORPOREALITY_TOGGLE
|
||||
}
|
||||
break;
|
||||
// Icecrown Citadel
|
||||
case 4812:
|
||||
if (instance && mapid == 631)
|
||||
instance->FillInitialWorldStates(data);
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(4903) << uint32(0); // 9 WORLDSTATE_SHOW_TIMER (Blood Quickening weekly)
|
||||
data << uint32(4904) << uint32(30); // 10 WORLDSTATE_EXECUTION_TIME
|
||||
data << uint32(4940) << uint32(0); // 11 WORLDSTATE_SHOW_ATTEMPTS
|
||||
data << uint32(4941) << uint32(50); // 12 WORLDSTATE_ATTEMPTS_REMAINING
|
||||
data << uint32(4942) << uint32(50); // 13 WORLDSTATE_ATTEMPTS_MAX
|
||||
packet.Worldstates.emplace_back(4903, 0); // 9 WORLDSTATE_SHOW_TIMER (Blood Quickening weekly)
|
||||
packet.Worldstates.emplace_back(4904, 30); // 10 WORLDSTATE_EXECUTION_TIME
|
||||
packet.Worldstates.emplace_back(4940, 0); // 11 WORLDSTATE_SHOW_ATTEMPTS
|
||||
packet.Worldstates.emplace_back(4941, 50); // 12 WORLDSTATE_ATTEMPTS_REMAINING
|
||||
packet.Worldstates.emplace_back(4942, 50); // 13 WORLDSTATE_ATTEMPTS_MAX
|
||||
}
|
||||
break;
|
||||
// The Culling of Stratholme
|
||||
case 4100:
|
||||
if (instance && mapid == 595)
|
||||
instance->FillInitialWorldStates(data);
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(3479) << uint32(0); // 9 WORLDSTATE_SHOW_CRATES
|
||||
data << uint32(3480) << uint32(0); // 10 WORLDSTATE_CRATES_REVEALED
|
||||
data << uint32(3504) << uint32(0); // 11 WORLDSTATE_WAVE_COUNT
|
||||
data << uint32(3931) << uint32(25); // 12 WORLDSTATE_TIME_GUARDIAN
|
||||
data << uint32(3932) << uint32(0); // 13 WORLDSTATE_TIME_GUARDIAN_SHOW
|
||||
packet.Worldstates.emplace_back(3479, 0); // 9 WORLDSTATE_SHOW_CRATES
|
||||
packet.Worldstates.emplace_back(3480, 0); // 10 WORLDSTATE_CRATES_REVEALED
|
||||
packet.Worldstates.emplace_back(3504, 0); // 11 WORLDSTATE_WAVE_COUNT
|
||||
packet.Worldstates.emplace_back(3931, 25); // 12 WORLDSTATE_TIME_GUARDIAN
|
||||
packet.Worldstates.emplace_back(3932, 0); // 13 WORLDSTATE_TIME_GUARDIAN_SHOW
|
||||
}
|
||||
break;
|
||||
// The Oculus
|
||||
case 4228:
|
||||
if (instance && mapid == 578)
|
||||
instance->FillInitialWorldStates(data);
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(3524) << uint32(0); // 9 WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW
|
||||
data << uint32(3486) << uint32(0); // 10 WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT
|
||||
packet.Worldstates.emplace_back(3524, 0); // 9 WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW
|
||||
packet.Worldstates.emplace_back(3486, 0); // 10 WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT
|
||||
}
|
||||
break;
|
||||
// Ulduar
|
||||
case 4273:
|
||||
if (instance && mapid == 603)
|
||||
instance->FillInitialWorldStates(data);
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(4132) << uint32(0); // 9 WORLDSTATE_ALGALON_TIMER_ENABLED
|
||||
data << uint32(4131) << uint32(0); // 10 WORLDSTATE_ALGALON_DESPAWN_TIMER
|
||||
packet.Worldstates.emplace_back(4132, 0); // 9 WORLDSTATE_ALGALON_TIMER_ENABLED
|
||||
packet.Worldstates.emplace_back(4131, 0); // 10 WORLDSTATE_ALGALON_DESPAWN_TIMER
|
||||
}
|
||||
break;
|
||||
// Halls of Refection
|
||||
case 4820:
|
||||
if (instance && mapid == 668)
|
||||
instance->FillInitialWorldStates(data);
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(4884) << uint32(0); // 9 WORLD_STATE_HOR_WAVES_ENABLED
|
||||
data << uint32(4882) << uint32(0); // 10 WORLD_STATE_HOR_WAVE_COUNT
|
||||
packet.Worldstates.emplace_back(4884, 0); // 9 WORLD_STATE_HOR_WAVES_ENABLED
|
||||
packet.Worldstates.emplace_back(4882, 0); // 10 WORLD_STATE_HOR_WAVE_COUNT
|
||||
}
|
||||
break;
|
||||
// Zul Aman
|
||||
case 3805:
|
||||
if (instance && mapid == 568)
|
||||
instance->FillInitialWorldStates(data);
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(3104) << uint32(0); // 9 WORLD_STATE_ZULAMAN_TIMER_ENABLED
|
||||
data << uint32(3106) << uint32(0); // 10 WORLD_STATE_ZULAMAN_TIMER
|
||||
packet.Worldstates.emplace_back(3104, 0); // 9 WORLD_STATE_ZULAMAN_TIMER_ENABLED
|
||||
packet.Worldstates.emplace_back(3106, 0); // 10 WORLD_STATE_ZULAMAN_TIMER
|
||||
}
|
||||
break;
|
||||
// Twin Peaks
|
||||
case 5031:
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_TP)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
data << uint32(0x62d) << uint32(0x0); // 7 1581 alliance flag captures
|
||||
data << uint32(0x62e) << uint32(0x0); // 8 1582 horde flag captures
|
||||
data << uint32(0x609) << uint32(0x0); // 9 1545 unk
|
||||
data << uint32(0x60a) << uint32(0x0); // 10 1546 unk
|
||||
data << uint32(0x60b) << uint32(0x2); // 11 1547 unk
|
||||
data << uint32(0x641) << uint32(0x3); // 12 1601 unk
|
||||
data << uint32(0x922) << uint32(0x1); // 13 2338 horde (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
data << uint32(0x923) << uint32(0x1); // 14 2339 alliance (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
packet.Worldstates.emplace_back(0x62d, 0x0); // 7 1581 alliance flag captures
|
||||
packet.Worldstates.emplace_back(0x62e, 0x0); // 8 1582 horde flag captures
|
||||
packet.Worldstates.emplace_back(0x609, 0x0); // 9 1545 unk
|
||||
packet.Worldstates.emplace_back(0x60a, 0x0); // 10 1546 unk
|
||||
packet.Worldstates.emplace_back(0x60b, 0x2); // 11 1547 unk
|
||||
packet.Worldstates.emplace_back(0x641, 0x3); // 12 1601 unk
|
||||
packet.Worldstates.emplace_back(0x922, 0x1); // 13 2338 horde (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
packet.Worldstates.emplace_back(0x923, 0x1); // 14 2339 alliance (0 - hide, 1 - flag ok, 2 - flag picked up (flashing), 3 - flag picked up (not flashing)
|
||||
}
|
||||
break;
|
||||
// Battle for Gilneas
|
||||
case 5449:
|
||||
if (bg && bg->GetTypeID(true) == BATTLEGROUND_BFG)
|
||||
bg->FillInitialWorldStates(data);
|
||||
bg->FillInitialWorldStates(packet);
|
||||
break;
|
||||
// Wintergrasp
|
||||
case 4197:
|
||||
if (bf && bf->GetTypeId() == BATTLEFIELD_WG)
|
||||
bf->FillInitialWorldStates(data);
|
||||
bf->FillInitialWorldStates(packet);
|
||||
// No break here, intended.
|
||||
default:
|
||||
data << uint32(0x914) << uint32(0x0); // 7
|
||||
data << uint32(0x913) << uint32(0x0); // 8
|
||||
data << uint32(0x912) << uint32(0x0); // 9
|
||||
data << uint32(0x915) << uint32(0x0); // 10
|
||||
packet.Worldstates.emplace_back(0x914, 0x0); // 7
|
||||
packet.Worldstates.emplace_back(0x913, 0x0); // 8
|
||||
packet.Worldstates.emplace_back(0x912, 0x0); // 9
|
||||
packet.Worldstates.emplace_back(0x915, 0x0); // 10
|
||||
break;
|
||||
}
|
||||
|
||||
uint16 length = (data.wpos() - countPos) / 8;
|
||||
data.put<uint16>(countPos, length);
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
GetSession()->SendPacket(packet.Write());
|
||||
SendBGWeekendWorldStates();
|
||||
SendBattlefieldWorldStates();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "ZoneScript.h"
|
||||
#include "World.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Packets/WorldStatePackets.h"
|
||||
|
||||
#define OUT_SAVE_INST_DATA TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_SAVE_INST_DATA_COMPLETE TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
@@ -242,7 +243,7 @@ class InstanceScript : public ZoneScript
|
||||
|
||||
void SendEncounterUnit(uint32 type, Unit* unit = NULL, uint8 param1 = 0, uint8 param2 = 0);
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
|
||||
// ReCheck PhaseTemplate related conditions
|
||||
void UpdatePhasing();
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Util.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "ZoneScript.h"
|
||||
#include "Packets/WorldStatePackets.h"
|
||||
|
||||
class GameObject;
|
||||
|
||||
@@ -91,7 +92,7 @@ class OPvPCapturePoint
|
||||
|
||||
virtual ~OPvPCapturePoint() { }
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) { }
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
|
||||
// send world state update to all players present
|
||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||
@@ -201,7 +202,7 @@ class OutdoorPvP : public ZoneScript
|
||||
|
||||
typedef std::map<ObjectGuid/*guid*/, OPvPCapturePoint*> OPvPCapturePointMap;
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPacket & /*data*/) { }
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates & /*packet*/) { }
|
||||
|
||||
// called when a player triggers an areatrigger
|
||||
virtual bool HandleAreaTrigger(Player* /*player*/, uint32 /*trigger*/) { return false; }
|
||||
|
||||
@@ -24,9 +24,9 @@ WorldPacket const* WorldPackets::WorldState::InitWorldStates::Write()
|
||||
{
|
||||
_worldPacket.reserve(16 + Worldstates.size() * 8);
|
||||
|
||||
_worldPacket << uint32(MapID);
|
||||
_worldPacket << uint32(AreaID);
|
||||
_worldPacket << uint32(SubareaID);
|
||||
_worldPacket << uint32(MapID);
|
||||
|
||||
_worldPacket << uint32(Worldstates.size());
|
||||
for (WorldStateInfo const& wsi : Worldstates)
|
||||
|
||||
@@ -1350,7 +1350,7 @@ void OpcodeTable::Initialize()
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INITIALIZE_FACTIONS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INITIAL_SETUP, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INITIAL_SPELLS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INIT_WORLD_STATES, STATUS_UNHANDLED, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INIT_WORLD_STATES, STATUS_NEVER, CONNECTION_TYPE_REALM);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INSPECT_HONOR_STATS, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INSPECT_PVP, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
|
||||
DEFINE_SERVER_OPCODE_HANDLER(SMSG_INSPECT_RESULT, STATUS_NEVER, CONNECTION_TYPE_INSTANCE);
|
||||
|
||||
@@ -37,10 +37,10 @@ class instance_zulaman : public InstanceMapScript
|
||||
ZulAmanBossCount = 0;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& packet) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
packet << uint32(WORLD_STATE_ZULAMAN_TIMER_ENABLED) << uint32(ZulAmanState ? 1 : 0);
|
||||
packet << uint32(WORLD_STATE_ZULAMAN_TIMER) << uint32(SpeedRunTimer);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_ZULAMAN_TIMER_ENABLED), int32(ZulAmanState ? 1 : 0));
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_ZULAMAN_TIMER), int32(SpeedRunTimer));
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
|
||||
+6
-6
@@ -66,13 +66,13 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
_infiniteCouterState = NOT_STARTED;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
data << uint32(WORLDSTATE_SHOW_CRATES) << uint32(1);
|
||||
data << uint32(WORLDSTATE_CRATES_REVEALED) << uint32(_crateCount);
|
||||
data << uint32(WORLDSTATE_WAVE_COUNT) << uint32(0);
|
||||
data << uint32(WORLDSTATE_TIME_GUARDIAN) << uint32(25);
|
||||
data << uint32(WORLDSTATE_TIME_GUARDIAN_SHOW) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_SHOW_CRATES), 1);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_CRATES_REVEALED), int32(_crateCount));
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_WAVE_COUNT), 0);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_TIME_GUARDIAN), 25);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_TIME_GUARDIAN_SHOW), 0);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
|
||||
@@ -281,11 +281,11 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
return BaltharusSharedHealth;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
data << uint32(WORLDSTATE_CORPOREALITY_MATERIAL) << uint32(50);
|
||||
data << uint32(WORLDSTATE_CORPOREALITY_TWILIGHT) << uint32(50);
|
||||
data << uint32(WORLDSTATE_CORPOREALITY_TOGGLE) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_CORPOREALITY_MATERIAL), 50);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_CORPOREALITY_TWILIGHT), 50);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_CORPOREALITY_TOGGLE), 0);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
+3
-3
@@ -288,10 +288,10 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
data << uint32(WORLD_STATE_HOR_WAVES_ENABLED) << uint32(_introState == DONE && GetBossState(DATA_MARWYN) != DONE);
|
||||
data << uint32(WORLD_STATE_HOR_WAVE_COUNT) << uint32(_waveCount);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_HOR_WAVES_ENABLED), int32(_introState == DONE && GetBossState(DATA_MARWYN) != DONE));
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_HOR_WAVE_COUNT), int32(_waveCount));
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
|
||||
@@ -145,13 +145,13 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
data << uint32(WORLDSTATE_SHOW_TIMER) << uint32(BloodQuickeningState == IN_PROGRESS);
|
||||
data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(BloodQuickeningMinutes);
|
||||
data << uint32(WORLDSTATE_SHOW_ATTEMPTS) << uint32(instance->IsHeroic());
|
||||
data << uint32(WORLDSTATE_ATTEMPTS_REMAINING) << uint32(HeroicAttempts);
|
||||
data << uint32(WORLDSTATE_ATTEMPTS_MAX) << uint32(MaxHeroicAttempts);
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_SHOW_TIMER), int32(BloodQuickeningState == IN_PROGRESS));
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_EXECUTION_TIME), int32(BloodQuickeningMinutes));
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_SHOW_ATTEMPTS), int32(instance->IsHeroic()));
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_ATTEMPTS_REMAINING), int32(HeroicAttempts));
|
||||
packet.Worldstates.emplace_back(uint32(WORLDSTATE_ATTEMPTS_MAX), int32(MaxHeroicAttempts));
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
|
||||
@@ -153,17 +153,17 @@ class instance_oculus : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
if (GetBossState(DATA_DRAKOS) == DONE && GetBossState(DATA_VAROS) != DONE)
|
||||
{
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW) << uint32(1);
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT) << uint32(CentrifugueConstructCounter);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW), 1);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT), int32(CentrifugueConstructCounter));
|
||||
}
|
||||
else
|
||||
{
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW) << uint32(0);
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW), 0);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,10 +148,10 @@ class instance_ulduar : public InstanceMapScript
|
||||
bool Unbroken;
|
||||
bool IsDriveMeCrazyEligible;
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& packet) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
packet << uint32(WORLD_STATE_ALGALON_TIMER_ENABLED) << uint32(_algalonTimer && _algalonTimer <= 60);
|
||||
packet << uint32(WORLD_STATE_ALGALON_DESPAWN_TIMER) << uint32(std::min<uint32>(_algalonTimer, 60));
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_ALGALON_TIMER_ENABLED), int32(_algalonTimer && _algalonTimer <= 60));
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_ALGALON_DESPAWN_TIMER), int32(std::min<uint32>(_algalonTimer, 60)));
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
|
||||
@@ -142,15 +142,15 @@ void OutdoorPvPHP::SendRemoveWorldStates(Player* player)
|
||||
}
|
||||
}
|
||||
|
||||
void OutdoorPvPHP::FillInitialWorldStates(WorldPacket &data)
|
||||
void OutdoorPvPHP::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(HP_UI_TOWER_DISPLAY_A) << uint32(1);
|
||||
data << uint32(HP_UI_TOWER_DISPLAY_H) << uint32(1);
|
||||
data << uint32(HP_UI_TOWER_COUNT_A) << uint32(m_AllianceTowersControlled);
|
||||
data << uint32(HP_UI_TOWER_COUNT_H) << uint32(m_HordeTowersControlled);
|
||||
packet.Worldstates.emplace_back(uint32(HP_UI_TOWER_DISPLAY_A), 1);
|
||||
packet.Worldstates.emplace_back(uint32(HP_UI_TOWER_DISPLAY_H), 1);
|
||||
packet.Worldstates.emplace_back(uint32(HP_UI_TOWER_COUNT_A), int32(m_AllianceTowersControlled));
|
||||
packet.Worldstates.emplace_back(uint32(HP_UI_TOWER_COUNT_H), int32(m_HordeTowersControlled));
|
||||
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
itr->second->FillInitialWorldStates(data);
|
||||
itr->second->FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
void OPvPCapturePointHP::ChangeState()
|
||||
@@ -258,29 +258,29 @@ void OPvPCapturePointHP::ChangeState()
|
||||
SendObjectiveComplete(HP_CREDITMARKER[m_TowerType], ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void OPvPCapturePointHP::FillInitialWorldStates(WorldPacket &data)
|
||||
void OPvPCapturePointHP::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
switch (m_State)
|
||||
{
|
||||
case OBJECTIVESTATE_ALLIANCE:
|
||||
case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
|
||||
data << uint32(HP_MAP_N[m_TowerType]) << uint32(0);
|
||||
data << uint32(HP_MAP_A[m_TowerType]) << uint32(1);
|
||||
data << uint32(HP_MAP_H[m_TowerType]) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_N[m_TowerType]), 0);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_A[m_TowerType]), 1);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_H[m_TowerType]), 0);
|
||||
break;
|
||||
case OBJECTIVESTATE_HORDE:
|
||||
case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
|
||||
data << uint32(HP_MAP_N[m_TowerType]) << uint32(0);
|
||||
data << uint32(HP_MAP_A[m_TowerType]) << uint32(0);
|
||||
data << uint32(HP_MAP_H[m_TowerType]) << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_N[m_TowerType]), 0);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_A[m_TowerType]), 0);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_H[m_TowerType]), 1);
|
||||
break;
|
||||
case OBJECTIVESTATE_NEUTRAL:
|
||||
case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
|
||||
case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
|
||||
default:
|
||||
data << uint32(HP_MAP_N[m_TowerType]) << uint32(1);
|
||||
data << uint32(HP_MAP_A[m_TowerType]) << uint32(0);
|
||||
data << uint32(HP_MAP_H[m_TowerType]) << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_N[m_TowerType]), 1);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_A[m_TowerType]), 0);
|
||||
packet.Worldstates.emplace_back(uint32(HP_MAP_H[m_TowerType]), 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class OPvPCapturePointHP : public OPvPCapturePoint
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
private:
|
||||
OutdoorPvPHPTowerType m_TowerType;
|
||||
@@ -116,7 +116,7 @@ class OutdoorPvPHP : public OutdoorPvP
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void SendRemoveWorldStates(Player* player);
|
||||
|
||||
|
||||
@@ -210,57 +210,57 @@ void OutdoorPvPNA::HandlePlayerLeaveZone(Player* player, uint32 zone)
|
||||
OutdoorPvP::HandlePlayerLeaveZone(player, zone);
|
||||
}
|
||||
|
||||
void OutdoorPvPNA::FillInitialWorldStates(WorldPacket &data)
|
||||
void OutdoorPvPNA::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
m_obj->FillInitialWorldStates(data);
|
||||
m_obj->FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
void OPvPCapturePointNA::FillInitialWorldStates(WorldPacket &data)
|
||||
void OPvPCapturePointNA::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
if (m_ControllingFaction == ALLIANCE)
|
||||
{
|
||||
data << NA_UI_HORDE_GUARDS_SHOW << uint32(0);
|
||||
data << NA_UI_ALLIANCE_GUARDS_SHOW << uint32(1);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_HORDE_GUARDS_SHOW), 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_ALLIANCE_GUARDS_SHOW), 1);
|
||||
}
|
||||
else if (m_ControllingFaction == HORDE)
|
||||
{
|
||||
data << NA_UI_HORDE_GUARDS_SHOW << uint32(1);
|
||||
data << NA_UI_ALLIANCE_GUARDS_SHOW << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_HORDE_GUARDS_SHOW), 1);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_ALLIANCE_GUARDS_SHOW), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
data << NA_UI_HORDE_GUARDS_SHOW << uint32(0);
|
||||
data << NA_UI_ALLIANCE_GUARDS_SHOW << uint32(0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_HORDE_GUARDS_SHOW), 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_ALLIANCE_GUARDS_SHOW), 0);
|
||||
}
|
||||
|
||||
data << NA_UI_GUARDS_MAX << NA_GUARDS_MAX;
|
||||
data << NA_UI_GUARDS_LEFT << uint32(m_GuardsAlive);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_GUARDS_MAX), int32(NA_GUARDS_MAX));
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_GUARDS_LEFT), int32(m_GuardsAlive));
|
||||
|
||||
data << NA_MAP_WYVERN_NORTH_NEU_H << uint32((m_WyvernStateNorth & WYVERN_NEU_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_NORTH_NEU_A << uint32((m_WyvernStateNorth & WYVERN_NEU_ALLIANCE) != 0);
|
||||
data << NA_MAP_WYVERN_NORTH_H << uint32((m_WyvernStateNorth & WYVERN_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_NORTH_A << uint32((m_WyvernStateNorth & WYVERN_ALLIANCE) != 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_NORTH_NEU_A), int32((m_WyvernStateNorth & WYVERN_NEU_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_NORTH_NEU_A), int32((m_WyvernStateNorth & WYVERN_NEU_ALLIANCE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_NORTH_H), int32((m_WyvernStateNorth & WYVERN_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_NORTH_A), int32((m_WyvernStateNorth & WYVERN_ALLIANCE) != 0));
|
||||
|
||||
data << NA_MAP_WYVERN_SOUTH_NEU_H << uint32((m_WyvernStateSouth & WYVERN_NEU_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_SOUTH_NEU_A << uint32((m_WyvernStateSouth & WYVERN_NEU_ALLIANCE) != 0);
|
||||
data << NA_MAP_WYVERN_SOUTH_H << uint32((m_WyvernStateSouth & WYVERN_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_SOUTH_A << uint32((m_WyvernStateSouth & WYVERN_ALLIANCE) != 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_SOUTH_NEU_H), int32((m_WyvernStateSouth & WYVERN_NEU_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_SOUTH_NEU_A), int32((m_WyvernStateSouth & WYVERN_NEU_ALLIANCE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_SOUTH_H), int32((m_WyvernStateSouth & WYVERN_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_SOUTH_A), int32((m_WyvernStateSouth & WYVERN_ALLIANCE) != 0));
|
||||
|
||||
data << NA_MAP_WYVERN_WEST_NEU_H << uint32((m_WyvernStateWest & WYVERN_NEU_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_WEST_NEU_A << uint32((m_WyvernStateWest & WYVERN_NEU_ALLIANCE) != 0);
|
||||
data << NA_MAP_WYVERN_WEST_H << uint32((m_WyvernStateWest & WYVERN_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_WEST_A << uint32((m_WyvernStateWest & WYVERN_ALLIANCE) != 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_WEST_NEU_H), int32((m_WyvernStateWest & WYVERN_NEU_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_WEST_NEU_A), int32((m_WyvernStateWest & WYVERN_NEU_ALLIANCE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_WEST_H), int32((m_WyvernStateWest & WYVERN_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_WEST_A), int32((m_WyvernStateWest & WYVERN_ALLIANCE) != 0));
|
||||
|
||||
data << NA_MAP_WYVERN_EAST_NEU_H << uint32((m_WyvernStateEast & WYVERN_NEU_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_EAST_NEU_A << uint32((m_WyvernStateEast & WYVERN_NEU_ALLIANCE) != 0);
|
||||
data << NA_MAP_WYVERN_EAST_H << uint32((m_WyvernStateEast & WYVERN_HORDE) != 0);
|
||||
data << NA_MAP_WYVERN_EAST_A << uint32((m_WyvernStateEast & WYVERN_ALLIANCE) != 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_EAST_NEU_H), int32((m_WyvernStateEast & WYVERN_NEU_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_EAST_NEU_A), int32((m_WyvernStateEast & WYVERN_NEU_ALLIANCE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_EAST_H), int32((m_WyvernStateEast & WYVERN_HORDE) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_WYVERN_EAST_A), int32((m_WyvernStateEast & WYVERN_ALLIANCE) != 0));
|
||||
|
||||
data << NA_MAP_HALAA_NEUTRAL << uint32((m_HalaaState & HALAA_N) != 0);
|
||||
data << NA_MAP_HALAA_NEU_A << uint32((m_HalaaState & HALAA_N_A) != 0);
|
||||
data << NA_MAP_HALAA_NEU_H << uint32((m_HalaaState & HALAA_N_H) != 0);
|
||||
data << NA_MAP_HALAA_HORDE << uint32((m_HalaaState & HALAA_H) != 0);
|
||||
data << NA_MAP_HALAA_ALLIANCE << uint32((m_HalaaState & HALAA_A) != 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_HALAA_NEUTRAL), int32((m_HalaaState & HALAA_N) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_HALAA_NEU_A), int32((m_HalaaState & HALAA_N_A) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_HALAA_NEU_H), int32((m_HalaaState & HALAA_N_H) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_HALAA_HORDE), int32((m_HalaaState & HALAA_H) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(NA_MAP_HALAA_ALLIANCE), int32((m_HalaaState & HALAA_A) != 0));
|
||||
}
|
||||
|
||||
void OutdoorPvPNA::SendRemoveWorldStates(Player* player)
|
||||
|
||||
@@ -265,7 +265,7 @@ class OPvPCapturePointNA : public OPvPCapturePoint
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
bool HandleCustomSpell(Player* player, uint32 spellId, GameObject* go);
|
||||
|
||||
@@ -318,7 +318,7 @@ class OutdoorPvPNA : public OutdoorPvP
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void SendRemoveWorldStates(Player* player);
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@ OutdoorPvPSI::OutdoorPvPSI()
|
||||
m_LastController = 0;
|
||||
}
|
||||
|
||||
void OutdoorPvPSI::FillInitialWorldStates(WorldPacket &data)
|
||||
void OutdoorPvPSI::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << SI_GATHERED_A << m_Gathered_A;
|
||||
data << SI_GATHERED_H << m_Gathered_H;
|
||||
data << SI_SILITHYST_MAX << SI_MAX_RESOURCES;
|
||||
packet.Worldstates.emplace_back(uint32(SI_GATHERED_A), int32(m_Gathered_A));
|
||||
packet.Worldstates.emplace_back(uint32(SI_GATHERED_H), int32(m_Gathered_H));
|
||||
packet.Worldstates.emplace_back(uint32(SI_SILITHYST_MAX), int32(SI_MAX_RESOURCES));
|
||||
}
|
||||
|
||||
void OutdoorPvPSI::SendRemoveWorldStates(Player* player)
|
||||
|
||||
@@ -63,7 +63,7 @@ class OutdoorPvPSI : public OutdoorPvP
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void SendRemoveWorldStates(Player* player);
|
||||
|
||||
|
||||
@@ -45,31 +45,28 @@ OPvPCapturePointTF::OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType t
|
||||
SetCapturePointData(TFCapturePoints[type].entry, TFCapturePoints[type].map, TFCapturePoints[type].x, TFCapturePoints[type].y, TFCapturePoints[type].z, TFCapturePoints[type].o, TFCapturePoints[type].rot0, TFCapturePoints[type].rot1, TFCapturePoints[type].rot2, TFCapturePoints[type].rot3);
|
||||
}
|
||||
|
||||
void OPvPCapturePointTF::FillInitialWorldStates(WorldPacket &data)
|
||||
void OPvPCapturePointTF::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(TFTowerWorldStates[m_TowerType].n) << uint32((m_TowerState & TF_TOWERSTATE_N) != 0);
|
||||
data << uint32(TFTowerWorldStates[m_TowerType].h) << uint32((m_TowerState & TF_TOWERSTATE_H) != 0);
|
||||
data << uint32(TFTowerWorldStates[m_TowerType].a) << uint32((m_TowerState & TF_TOWERSTATE_A) != 0);
|
||||
packet.Worldstates.emplace_back(uint32(TFTowerWorldStates[m_TowerType].n), int32((m_TowerState & TF_TOWERSTATE_N) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(TFTowerWorldStates[m_TowerType].h), int32((m_TowerState & TF_TOWERSTATE_H) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(TFTowerWorldStates[m_TowerType].a), int32((m_TowerState & TF_TOWERSTATE_A) != 0));
|
||||
}
|
||||
|
||||
void OutdoorPvPTF::FillInitialWorldStates(WorldPacket &data)
|
||||
void OutdoorPvPTF::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << TF_UI_TOWER_COUNT_H << m_HordeTowersControlled;
|
||||
data << TF_UI_TOWER_COUNT_A << m_AllianceTowersControlled;
|
||||
data << TF_UI_TOWERS_CONTROLLED_DISPLAY << uint32(!m_IsLocked);
|
||||
|
||||
data << TF_UI_LOCKED_TIME_MINUTES_FIRST_DIGIT << first_digit;
|
||||
data << TF_UI_LOCKED_TIME_MINUTES_SECOND_DIGIT << second_digit;
|
||||
data << TF_UI_LOCKED_TIME_HOURS << hours_left;
|
||||
|
||||
data << TF_UI_LOCKED_DISPLAY_NEUTRAL << uint32(m_IsLocked && !m_HordeTowersControlled && !m_AllianceTowersControlled);
|
||||
data << TF_UI_LOCKED_DISPLAY_HORDE << uint32(m_IsLocked && (m_HordeTowersControlled > m_AllianceTowersControlled));
|
||||
data << TF_UI_LOCKED_DISPLAY_ALLIANCE << uint32(m_IsLocked && (m_HordeTowersControlled < m_AllianceTowersControlled));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_TOWER_COUNT_H), int32(m_HordeTowersControlled));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_TOWER_COUNT_A), int32(m_AllianceTowersControlled));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_TOWERS_CONTROLLED_DISPLAY), int32(!m_IsLocked));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_LOCKED_TIME_MINUTES_FIRST_DIGIT), int32(first_digit));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_LOCKED_TIME_MINUTES_SECOND_DIGIT), int32(second_digit));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_LOCKED_TIME_HOURS), int32(hours_left));
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_LOCKED_DISPLAY_NEUTRAL), int32(m_IsLocked && !m_HordeTowersControlled && !m_AllianceTowersControlled));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_LOCKED_DISPLAY_HORDE), int32(m_IsLocked && (m_HordeTowersControlled > m_AllianceTowersControlled)));
|
||||
packet.Worldstates.emplace_back(uint32(TF_UI_LOCKED_DISPLAY_ALLIANCE), int32(m_IsLocked && (m_HordeTowersControlled < m_AllianceTowersControlled)));
|
||||
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
{
|
||||
itr->second->FillInitialWorldStates(data);
|
||||
}
|
||||
itr->second->FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
void OutdoorPvPTF::SendRemoveWorldStates(Player* player)
|
||||
|
||||
@@ -136,7 +136,7 @@ class OPvPCapturePointTF : public OPvPCapturePoint
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
@@ -158,7 +158,7 @@ class OutdoorPvPTF : public OutdoorPvP
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void SendRemoveWorldStates(Player* player);
|
||||
|
||||
|
||||
@@ -31,14 +31,14 @@ OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconT
|
||||
SetCapturePointData(ZMCapturePoints[type].entry, ZMCapturePoints[type].map, ZMCapturePoints[type].x, ZMCapturePoints[type].y, ZMCapturePoints[type].z, ZMCapturePoints[type].o, ZMCapturePoints[type].rot0, ZMCapturePoints[type].rot1, ZMCapturePoints[type].rot2, ZMCapturePoints[type].rot3);
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_Beacon::FillInitialWorldStates(WorldPacket &data)
|
||||
void OPvPCapturePointZM_Beacon::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << uint32(ZMBeaconInfo[m_TowerType].ui_tower_n) << uint32((m_TowerState & ZM_TOWERSTATE_N) != 0);
|
||||
data << uint32(ZMBeaconInfo[m_TowerType].map_tower_n) << uint32((m_TowerState & ZM_TOWERSTATE_N) != 0);
|
||||
data << uint32(ZMBeaconInfo[m_TowerType].ui_tower_a) << uint32((m_TowerState & ZM_TOWERSTATE_A) != 0);
|
||||
data << uint32(ZMBeaconInfo[m_TowerType].map_tower_a) << uint32((m_TowerState & ZM_TOWERSTATE_A) != 0);
|
||||
data << uint32(ZMBeaconInfo[m_TowerType].ui_tower_h) << uint32((m_TowerState & ZM_TOWERSTATE_H) != 0);
|
||||
data << uint32(ZMBeaconInfo[m_TowerType].map_tower_h) << uint32((m_TowerState & ZM_TOWERSTATE_H) != 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].ui_tower_n, (m_TowerState & ZM_TOWERSTATE_N) != 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].map_tower_n, (m_TowerState & ZM_TOWERSTATE_N) != 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].ui_tower_a, (m_TowerState & ZM_TOWERSTATE_A) != 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].map_tower_a, 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].ui_tower_h, (m_TowerState & ZM_TOWERSTATE_H) != 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].map_tower_h, (m_TowerState & ZM_TOWERSTATE_H) != 0);
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_Beacon::UpdateTowerState()
|
||||
@@ -238,16 +238,16 @@ void OPvPCapturePointZM_GraveYard::UpdateTowerState()
|
||||
m_PvP->SendUpdateWorldState(ZM_MAP_HORDE_FLAG_NOT_READY, uint32(m_BothControllingFaction != HORDE));
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_GraveYard::FillInitialWorldStates(WorldPacket &data)
|
||||
void OPvPCapturePointZM_GraveYard::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << ZM_MAP_GRAVEYARD_N << uint32((m_GraveYardState & ZM_GRAVEYARD_N) != 0);
|
||||
data << ZM_MAP_GRAVEYARD_H << uint32((m_GraveYardState & ZM_GRAVEYARD_H) != 0);
|
||||
data << ZM_MAP_GRAVEYARD_A << uint32((m_GraveYardState & ZM_GRAVEYARD_A) != 0);
|
||||
packet.Worldstates.emplace_back(uint32(ZM_MAP_GRAVEYARD_N), int32((m_GraveYardState & ZM_GRAVEYARD_N) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(ZM_MAP_GRAVEYARD_H), int32((m_GraveYardState & ZM_GRAVEYARD_H) != 0));
|
||||
packet.Worldstates.emplace_back(uint32(ZM_MAP_GRAVEYARD_A), int32((m_GraveYardState & ZM_GRAVEYARD_A) != 0));
|
||||
|
||||
data << ZM_MAP_ALLIANCE_FLAG_READY << uint32(m_BothControllingFaction == ALLIANCE);
|
||||
data << ZM_MAP_ALLIANCE_FLAG_NOT_READY << uint32(m_BothControllingFaction != ALLIANCE);
|
||||
data << ZM_MAP_HORDE_FLAG_READY << uint32(m_BothControllingFaction == HORDE);
|
||||
data << ZM_MAP_HORDE_FLAG_NOT_READY << uint32(m_BothControllingFaction != HORDE);
|
||||
packet.Worldstates.emplace_back(uint32(ZM_MAP_ALLIANCE_FLAG_READY), int32(m_BothControllingFaction == ALLIANCE));
|
||||
packet.Worldstates.emplace_back(uint32(ZM_MAP_ALLIANCE_FLAG_NOT_READY), int32(m_BothControllingFaction != ALLIANCE));
|
||||
packet.Worldstates.emplace_back(uint32(ZM_MAP_HORDE_FLAG_READY), int32(m_BothControllingFaction == HORDE));
|
||||
packet.Worldstates.emplace_back(uint32(ZM_MAP_HORDE_FLAG_NOT_READY), int32(m_BothControllingFaction != HORDE));
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_GraveYard::SetBeaconState(uint32 controlling_faction)
|
||||
@@ -376,12 +376,11 @@ void OutdoorPvPZM::SetHordeTowersControlled(uint32 count)
|
||||
m_HordeTowersControlled = count;
|
||||
}
|
||||
|
||||
void OutdoorPvPZM::FillInitialWorldStates(WorldPacket &data)
|
||||
void OutdoorPvPZM::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
data << ZM_WORLDSTATE_UNK_1 << uint32(1);
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(ZM_WORLDSTATE_UNK_1), 1);
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
itr->second->FillInitialWorldStates(data);
|
||||
itr->second->FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
void OutdoorPvPZM::SendRemoveWorldStates(Player* player)
|
||||
|
||||
@@ -163,7 +163,7 @@ class OPvPCapturePointZM_Beacon : public OPvPCapturePoint
|
||||
|
||||
void ChangeState();
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
@@ -188,7 +188,7 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||
|
||||
void ChangeState() { }
|
||||
|
||||
void FillInitialWorldStates(WorldPacket & data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
@@ -225,7 +225,7 @@ class OutdoorPvPZM : public OutdoorPvP
|
||||
|
||||
bool Update(uint32 diff);
|
||||
|
||||
void FillInitialWorldStates(WorldPacket &data);
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
|
||||
|
||||
void SendRemoveWorldStates(Player* player);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user