mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: PORT CURSED REFACTORS FROM e69570dd76
WHO ON EARTH THOUGHT IT WAS A GOOD IDEA TO ADD REFACTORS TO A CHERRY-PICK COMMIT???
This commit is contained in:
@@ -1150,19 +1150,24 @@ uint32 BattlefieldWG::GetData(uint32 data) const
|
||||
|
||||
void BattlefieldWG::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_ATTACKER), int32(GetAttackerTeam()));
|
||||
packet.Worldstates.emplace_back(uint32(BATTLEFIELD_WG_WORLD_STATE_DEFENDER), int32(GetDefenderTeam()));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_DEFENDED_A, GetData(BATTLEFIELD_WG_DATA_DEF_A));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_DEFENDED_H, GetData(BATTLEFIELD_WG_DATA_DEF_H));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_ATTACKED_A, GetData(BATTLEFIELD_WG_DATA_WON_A));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_ATTACKED_H, GetData(BATTLEFIELD_WG_DATA_WON_H));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_ATTACKER, GetAttackerTeam());
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_DEFENDER, 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));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_ACTIVE, IsWarTime() ? 0 : 1);
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_SHOW_WORLDSTATE, IsWarTime() ? 1 : 0);
|
||||
|
||||
for (uint32 i = 0; i < 2; ++i)
|
||||
packet.Worldstates.emplace_back(ClockWorldState[i], int32(GameTime::GetGameTime() + (m_Timer / 1000)));
|
||||
for (uint32 itr = 0; itr < 2; ++itr)
|
||||
packet.Worldstates.emplace_back(ClockWorldState[itr], int32(GameTime::GetGameTime()) + int32(m_Timer) / int32(1000));
|
||||
|
||||
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)));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_H, GetData(BATTLEFIELD_WG_DATA_VEHICLE_H));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_H, GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_H));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_VEHICLE_A, GetData(BATTLEFIELD_WG_DATA_VEHICLE_A));
|
||||
packet.Worldstates.emplace_back(BATTLEFIELD_WG_WORLD_STATE_MAX_VEHICLE_A, GetData(BATTLEFIELD_WG_DATA_MAX_VEHICLE_A));
|
||||
|
||||
for (BfWGGameObjectBuilding* building : BuildingsInZone)
|
||||
building->FillInitialWorldStates(packet);
|
||||
@@ -1174,10 +1179,9 @@ void BattlefieldWG::FillInitialWorldStates(WorldPackets::WorldState::InitWorldSt
|
||||
void BattlefieldWG::SendInitWorldStatesTo(Player* player)
|
||||
{
|
||||
WorldPackets::WorldState::InitWorldStates packet;
|
||||
packet.AreaID = m_ZoneId;
|
||||
packet.MapID = m_MapId;
|
||||
packet.SubareaID = 0;
|
||||
|
||||
packet.AreaID = m_ZoneId;
|
||||
packet.SubareaID = player->GetAreaId();
|
||||
FillInitialWorldStates(packet);
|
||||
|
||||
player->SendDirectMessage(packet.Write());
|
||||
@@ -1755,7 +1759,7 @@ void BfWGGameObjectBuilding::UpdateTurretAttack(bool disable)
|
||||
|
||||
void BfWGGameObjectBuilding::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(_worldState), int32(_state));
|
||||
packet.Worldstates.emplace_back(_worldState, _state);
|
||||
}
|
||||
|
||||
void BfWGGameObjectBuilding::Save()
|
||||
@@ -1840,7 +1844,7 @@ void WintergraspWorkshop::UpdateGraveyardAndWorkshop()
|
||||
|
||||
void WintergraspWorkshop::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(_staticInfo->WorldStateId), int32(_state));
|
||||
packet.Worldstates.emplace_back(_staticInfo->WorldStateId, _state);
|
||||
}
|
||||
|
||||
void WintergraspWorkshop::Save()
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
Arena::Arena(BattlegroundTemplate const* battlegroundTemplate) : Battleground(battlegroundTemplate)
|
||||
{
|
||||
@@ -74,8 +74,8 @@ void Arena::RemovePlayer(Player* /*player*/, ObjectGuid /*guid*/, uint32 /*team*
|
||||
|
||||
void Arena::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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)));
|
||||
packet.Worldstates.emplace_back(ARENA_WORLD_STATE_ALIVE_PLAYERS_GREEN, GetAlivePlayersCountByTeam(HORDE));
|
||||
packet.Worldstates.emplace_back(ARENA_WORLD_STATE_ALIVE_PLAYERS_GOLD, GetAlivePlayersCountByTeam(ALLIANCE));
|
||||
}
|
||||
|
||||
void Arena::UpdateArenaWorldState()
|
||||
|
||||
@@ -378,7 +378,7 @@ class TC_GAME_API Battleground
|
||||
|
||||
// Packet Transfer
|
||||
// method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*data*/) { }
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
void SendPacketToTeam(uint32 teamId, WorldPacket const* packet, Player* except = nullptr) const;
|
||||
void SendPacketToAll(WorldPacket const* packet) const;
|
||||
|
||||
|
||||
@@ -305,32 +305,32 @@ void BattlegroundAB::FillInitialWorldStates(WorldPackets::WorldState::InitWorldS
|
||||
|
||||
// Node icons
|
||||
for (uint8 node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node)
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_NODEICONS[node]), int32((m_Nodes[node] == 0) ? 1 : 0));
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_NODEICONS[node], (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)
|
||||
packet.Worldstates.emplace_back(uint32(BG_AB_OP_NODESTATES[node] + plusArray[i]), int32((m_Nodes[node] == i) ? 1 : 0));
|
||||
for (uint8 itr = 1; itr < BG_AB_DYNAMIC_NODES_COUNT; ++itr)
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_NODESTATES[node] + plusArray[itr], (m_Nodes[node] == itr) ? 1 : 0);
|
||||
|
||||
// How many bases each team owns
|
||||
uint8 ally = 0, horde = 0;
|
||||
int32 ally = 0, horde = 0;
|
||||
for (uint8 node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node)
|
||||
if (m_Nodes[node] == BG_AB_NODE_STATUS_ALLY_OCCUPIED)
|
||||
++ally;
|
||||
else if (m_Nodes[node] == BG_AB_NODE_STATUS_HORDE_OCCUPIED)
|
||||
++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));
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_OCCUPIED_BASES_ALLY, ally);
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_OCCUPIED_BASES_HORDE, horde);
|
||||
|
||||
// Team scores
|
||||
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]));
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_RESOURCES_MAX, BG_AB_MAX_TEAM_SCORE);
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_RESOURCES_WARNING, BG_AB_WARNING_NEAR_VICTORY_SCORE);
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_RESOURCES_ALLY, m_TeamScores[TEAM_ALLIANCE]);
|
||||
packet.Worldstates.emplace_back(BG_AB_OP_RESOURCES_HORDE, m_TeamScores[TEAM_HORDE]);
|
||||
|
||||
// other unknown
|
||||
packet.Worldstates.emplace_back(uint32(0x745), 0x2);
|
||||
// other unknown BG_AB_UNK_01
|
||||
packet.Worldstates.emplace_back(1861, 2);
|
||||
}
|
||||
|
||||
void BattlegroundAB::_SendNodeUpdate(uint8 node)
|
||||
|
||||
@@ -1024,30 +1024,30 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
|
||||
|
||||
void BattlegroundAV::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
for (uint8 i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
|
||||
for (uint8 itr = BG_AV_NODES_FIRSTAID_STATION; itr < BG_AV_NODES_MAX; ++itr)
|
||||
{
|
||||
uint16 owner = m_Nodes[i].Owner;
|
||||
BG_AV_States state = m_Nodes[i].State;
|
||||
uint16 owner = m_Nodes[itr].Owner;
|
||||
BG_AV_States state = m_Nodes[itr].State;
|
||||
|
||||
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));
|
||||
packet.Worldstates.emplace_back(BGAVNodeInfo[itr].WorldStateIds.AllianceAssault, (owner == ALLIANCE && state == POINT_ASSAULTED) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BGAVNodeInfo[itr].WorldStateIds.AllianceControl, (owner == ALLIANCE && state >= POINT_DESTROYED) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BGAVNodeInfo[itr].WorldStateIds.HordeAssault, (owner == HORDE && state == POINT_ASSAULTED) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BGAVNodeInfo[itr].WorldStateIds.HordeControl, (owner == HORDE && state >= POINT_DESTROYED) ? 1 : 0);
|
||||
}
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(AV_SNOWFALL_N), int32(m_Nodes[BG_AV_NODES_SNOWFALL_GRAVE].Owner == AV_NEUTRAL_TEAM));
|
||||
packet.Worldstates.emplace_back(AV_SNOWFALL_N, (m_Nodes[BG_AV_NODES_SNOWFALL_GRAVE].Owner == AV_NEUTRAL_TEAM ? 1 : 0));
|
||||
packet.Worldstates.emplace_back(AV_Alliance_Score, m_Team_Scores[0]);
|
||||
packet.Worldstates.emplace_back(AV_Horde_Score, m_Team_Scores[1]);
|
||||
|
||||
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]));
|
||||
|
||||
if (GetStatus() == STATUS_IN_PROGRESS){ //only if game started the teamscores are displayed
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_A_SCORE), 1);
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_H_SCORE), 1);
|
||||
// only if game started the teamscores are displayed
|
||||
if (GetStatus() == STATUS_IN_PROGRESS) {
|
||||
packet.Worldstates.emplace_back(AV_SHOW_A_SCORE, 1);
|
||||
packet.Worldstates.emplace_back(AV_SHOW_H_SCORE, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_A_SCORE), 0);
|
||||
packet.Worldstates.emplace_back(uint32(AV_SHOW_H_SCORE), 0);
|
||||
packet.Worldstates.emplace_back(AV_SHOW_A_SCORE, 0);
|
||||
packet.Worldstates.emplace_back(AV_SHOW_H_SCORE, 0);
|
||||
}
|
||||
|
||||
SendMineWorldStates(AV_NORTH_MINE);
|
||||
|
||||
@@ -61,7 +61,8 @@ void BattlegroundBE::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
|
||||
void BattlegroundBE::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(0x9f3, 1);
|
||||
packet.Worldstates.emplace_back(2547, 1); // BATTLEGROUND_BLADES_EDGE_ARENA_SHOW
|
||||
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,8 @@ void BattlegroundDS::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
|
||||
void BattlegroundDS::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(3610, 1);
|
||||
packet.Worldstates.emplace_back(3610, 1); // ARENA_WORLD_STATE_ALIVE_PLAYERS_SHOW
|
||||
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
|
||||
@@ -857,43 +857,41 @@ bool BattlegroundEY::UpdatePlayerScore(Player* player, uint32 type, uint32 value
|
||||
|
||||
void BattlegroundEY::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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);
|
||||
packet.Worldstates.emplace_back(EY_HORDE_BASE, m_TeamPointsCount[TEAM_HORDE]);
|
||||
packet.Worldstates.emplace_back(EY_ALLIANCE_BASE, m_TeamPointsCount[TEAM_ALLIANCE]);
|
||||
packet.Worldstates.emplace_back(2742, 0); // Mage Tower - Horde conflict
|
||||
packet.Worldstates.emplace_back(2741, 0); // Mage Tower - Alliance conflict
|
||||
packet.Worldstates.emplace_back(2740, 0); // Fel Reaver - Horde conflict
|
||||
packet.Worldstates.emplace_back(2739, 0); // Fel Reaver - Alliance conflict
|
||||
packet.Worldstates.emplace_back(2738, 0); // Draenei - Alliance conflict
|
||||
packet.Worldstates.emplace_back(2737, 0); // Draenei - Horde conflict
|
||||
packet.Worldstates.emplace_back(2736, 0); // unk (0 at start)
|
||||
packet.Worldstates.emplace_back(2735, 0); // unk (0 at start)
|
||||
|
||||
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));
|
||||
packet.Worldstates.emplace_back(DRAENEI_RUINS_HORDE_CONTROL, (m_PointOwnedByTeam[DRAENEI_RUINS] == HORDE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(DRAENEI_RUINS_ALLIANCE_CONTROL, (m_PointOwnedByTeam[DRAENEI_RUINS] == ALLIANCE && m_PointState[DRAENEI_RUINS] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(DRAENEI_RUINS_UNCONTROL, (m_PointState[DRAENEI_RUINS] != EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(MAGE_TOWER_ALLIANCE_CONTROL, (m_PointOwnedByTeam[MAGE_TOWER] == ALLIANCE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(MAGE_TOWER_HORDE_CONTROL, (m_PointOwnedByTeam[MAGE_TOWER] == HORDE && m_PointState[MAGE_TOWER] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(MAGE_TOWER_UNCONTROL, (m_PointState[MAGE_TOWER] != EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(FEL_REAVER_HORDE_CONTROL, (m_PointOwnedByTeam[FEL_REAVER] == HORDE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(FEL_REAVER_ALLIANCE_CONTROL, (m_PointOwnedByTeam[FEL_REAVER] == ALLIANCE && m_PointState[FEL_REAVER] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(FEL_REAVER_UNCONTROL, (m_PointState[FEL_REAVER] != EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BLOOD_ELF_HORDE_CONTROL, (m_PointOwnedByTeam[BLOOD_ELF] == HORDE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BLOOD_ELF_ALLIANCE_CONTROL, (m_PointOwnedByTeam[BLOOD_ELF] == ALLIANCE && m_PointState[BLOOD_ELF] == EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BLOOD_ELF_UNCONTROL, (m_PointState[BLOOD_ELF] != EY_POINT_UNDER_CONTROL) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NETHERSTORM_FLAG, (m_FlagState == BG_EY_FLAG_STATE_ON_BASE) ? 1 : 0);
|
||||
|
||||
packet.Worldstates.emplace_back(0xAD2, 0x1);
|
||||
packet.Worldstates.emplace_back(0xAD1, 0x1);
|
||||
|
||||
packet.Worldstates.emplace_back(int32(EY_HORDE_RESOURCES), int32(GetTeamScore(TEAM_HORDE)));
|
||||
packet.Worldstates.emplace_back(int32(EY_ALLIANCE_RESOURCES), int32(GetTeamScore(TEAM_ALLIANCE)));
|
||||
packet.Worldstates.emplace_back(int32(EY_MAX_RESOURCES), int32(BG_EY_MAX_TEAM_SCORE));
|
||||
|
||||
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);
|
||||
packet.Worldstates.emplace_back(NETHERSTORM_FLAG_STATE_HORDE, 1); // Horde top-stats (1 - show, 0 - hide) // 02 -> horde picked up the flag
|
||||
packet.Worldstates.emplace_back(NETHERSTORM_FLAG_STATE_ALLIANCE, 1); // Alliance top-stats (1 - show, 0 - hide) // 02 -> alliance picked up the flag
|
||||
packet.Worldstates.emplace_back(EY_HORDE_RESOURCES, GetTeamScore(TEAM_HORDE)); // Horde resources
|
||||
packet.Worldstates.emplace_back(EY_ALLIANCE_RESOURCES, GetTeamScore(TEAM_ALLIANCE)); // Alliance resources
|
||||
packet.Worldstates.emplace_back(EY_MAX_RESOURCES, BG_EY_MAX_TEAM_SCORE); // Max resources
|
||||
packet.Worldstates.emplace_back(2565, 142); // unk, constant?
|
||||
packet.Worldstates.emplace_back(PROGRESS_BAR_PERCENT_GREY, 0); // Capturing progress-bar (100 -> empty (only grey), 0 -> blue|red (no grey), default 0)
|
||||
packet.Worldstates.emplace_back(PROGRESS_BAR_STATUS, 0); // Capturing progress-bar (0 - left, 100 - right)
|
||||
packet.Worldstates.emplace_back(PROGRESS_BAR_SHOW, 0); // Capturing progress-bar (1 - show, 0 - hide)
|
||||
packet.Worldstates.emplace_back(3085, 379); // unk, constant?
|
||||
|
||||
for (uint8 point = 0; point < EY_POINTS_MAX; ++point)
|
||||
{
|
||||
|
||||
@@ -287,19 +287,19 @@ void BattlegroundIC::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
|
||||
void BattlegroundIC::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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]));
|
||||
packet.Worldstates.emplace_back(BG_IC_ALLIANCE_RENFORT_SET, 1);
|
||||
packet.Worldstates.emplace_back(BG_IC_HORDE_RENFORT_SET, 1);
|
||||
packet.Worldstates.emplace_back(BG_IC_ALLIANCE_RENFORT, factionReinforcements[TEAM_ALLIANCE]);
|
||||
packet.Worldstates.emplace_back(BG_IC_HORDE_RENFORT, factionReinforcements[TEAM_HORDE]);
|
||||
|
||||
for (uint8 i = 0; i < MAX_FORTRESS_GATES_SPAWNS; ++i)
|
||||
for (uint8 itr = 0; itr < MAX_FORTRESS_GATES_SPAWNS; ++itr)
|
||||
{
|
||||
uint32 uws = GetWorldStateFromGateEntry(BG_IC_ObjSpawnlocs[i].entry, (GateStatus[GetGateIDFromEntry(BG_IC_ObjSpawnlocs[i].entry)] == BG_IC_GATE_DESTROYED ? true : false));
|
||||
packet.Worldstates.emplace_back(uint32(uws), 1);
|
||||
int32 worldState = GetWorldStateFromGateEntry(BG_IC_ObjSpawnlocs[itr].entry, (GateStatus[GetGateIDFromEntry(BG_IC_ObjSpawnlocs[itr].entry)] == BG_IC_GATE_DESTROYED ? true : false));
|
||||
packet.Worldstates.emplace_back(worldState, 1);
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < MAX_NODE_TYPES; ++i)
|
||||
packet.Worldstates.emplace_back(uint32(nodePoint[i].worldStates[nodePoint[i].nodeState]), 1);
|
||||
for (uint8 itr = 0; itr < MAX_NODE_TYPES; ++itr)
|
||||
packet.Worldstates.emplace_back(nodePoint[itr].worldStates[nodePoint[itr].nodeState], 1);
|
||||
}
|
||||
|
||||
bool BattlegroundIC::SetupBattleground()
|
||||
|
||||
@@ -58,7 +58,8 @@ void BattlegroundNA::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
|
||||
void BattlegroundNA::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(0xa11, 1);
|
||||
packet.Worldstates.emplace_back(2577, 1); // BATTLEGROUND_NAGRAND_ARENA_SHOW
|
||||
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ void BattlegroundRL::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
|
||||
void BattlegroundRL::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(0xbba, 1);
|
||||
packet.Worldstates.emplace_back(3002, 1); // BATTELGROUND_RUINS_OF_LORDAERNON_SHOW
|
||||
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,8 @@ void BattlegroundRV::HandleAreaTrigger(Player* player, uint32 trigger, bool ente
|
||||
|
||||
void BattlegroundRV::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(BG_RV_WORLD_STATE), 1);
|
||||
packet.Worldstates.emplace_back(BG_RV_WORLD_STATE, 1);
|
||||
|
||||
Arena::FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
|
||||
@@ -439,42 +439,39 @@ void BattlegroundSA::StartingEventOpenDoors() { }
|
||||
|
||||
void BattlegroundSA::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
bool allyAttacks = Attackers == TEAM_ALLIANCE;
|
||||
bool hordeAttacks = Attackers == TEAM_HORDE;
|
||||
bool const allyAttacks = Attackers == TEAM_ALLIANCE;
|
||||
bool const hordeAttacks = Attackers == TEAM_HORDE;
|
||||
|
||||
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]));
|
||||
packet.Worldstates.emplace_back(BG_SA_ANCIENT_GATEWS, GateStatus[BG_SA_ANCIENT_GATE]);
|
||||
packet.Worldstates.emplace_back(BG_SA_YELLOW_GATEWS, GateStatus[BG_SA_YELLOW_GATE]);
|
||||
packet.Worldstates.emplace_back(BG_SA_GREEN_GATEWS, GateStatus[BG_SA_GREEN_GATE]);
|
||||
packet.Worldstates.emplace_back(BG_SA_BLUE_GATEWS, GateStatus[BG_SA_BLUE_GATE]);
|
||||
packet.Worldstates.emplace_back(BG_SA_RED_GATEWS, GateStatus[BG_SA_RED_GATE]);
|
||||
packet.Worldstates.emplace_back(BG_SA_PURPLE_GATEWS, GateStatus[BG_SA_PURPLE_GATE]);
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_BONUS_TIMER), 0);
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_HORDE_ATTACKS), int32(hordeAttacks));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_ALLY_ATTACKS), int32(allyAttacks));
|
||||
packet.Worldstates.emplace_back(BG_SA_BONUS_TIMER, 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_HORDE_ATTACKS, hordeAttacks);
|
||||
packet.Worldstates.emplace_back(BG_SA_ALLY_ATTACKS, allyAttacks);
|
||||
|
||||
// Time will be sent on first update...
|
||||
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);
|
||||
packet.Worldstates.emplace_back(BG_SA_ENABLE_TIMER, TimerEnabled);
|
||||
packet.Worldstates.emplace_back(BG_SA_TIMER_MINS, 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_TIMER_SEC_TENS, 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_TIMER_SEC_DECS, 0);
|
||||
|
||||
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));
|
||||
packet.Worldstates.emplace_back(BG_SA_RIGHT_GY_HORDE, (GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_HORDE) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_LEFT_GY_HORDE, (GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_HORDE) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_CENTER_GY_HORDE, (GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_HORDE) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[BG_SA_RIGHT_CAPTURABLE_GY] == TEAM_ALLIANCE) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[BG_SA_LEFT_CAPTURABLE_GY] == TEAM_ALLIANCE) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(BG_SA_CENTER_GY_ALLIANCE, (GraveyardStatus[BG_SA_CENTRAL_CAPTURABLE_GY] == TEAM_ALLIANCE) ? 1 : 0);
|
||||
|
||||
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));
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_HORDE_DEFENCE_TOKEN), int32(allyAttacks));
|
||||
packet.Worldstates.emplace_back(uint32(BG_SA_ALLIANCE_DEFENCE_TOKEN), int32(hordeAttacks));
|
||||
|
||||
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));
|
||||
packet.Worldstates.emplace_back(BG_SA_HORDE_DEFENCE_TOKEN, allyAttacks);
|
||||
packet.Worldstates.emplace_back(BG_SA_ALLIANCE_DEFENCE_TOKEN, hordeAttacks);
|
||||
packet.Worldstates.emplace_back(BG_SA_LEFT_ATT_TOKEN_HRD, hordeAttacks);
|
||||
packet.Worldstates.emplace_back(BG_SA_RIGHT_ATT_TOKEN_HRD, hordeAttacks);
|
||||
packet.Worldstates.emplace_back(BG_SA_RIGHT_ATT_TOKEN_ALL, allyAttacks);
|
||||
packet.Worldstates.emplace_back(BG_SA_LEFT_ATT_TOKEN_ALL, allyAttacks);
|
||||
}
|
||||
|
||||
void BattlegroundSA::AddPlayer(Player* player)
|
||||
|
||||
@@ -821,42 +821,42 @@ WorldSafeLocsEntry const* BattlegroundWS::GetExploitTeleportLocation(Team team)
|
||||
|
||||
void BattlegroundWS::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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)));
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_CAPTURES_ALLIANCE, GetTeamScore(TEAM_ALLIANCE));
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_CAPTURES_HORDE, GetTeamScore(TEAM_HORDE));
|
||||
|
||||
if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_GROUND)
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_ALLIANCE), -1);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_UNK_ALLIANCE, uint32(-1)); // ??
|
||||
else if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_ALLIANCE), 1);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_UNK_ALLIANCE, 1);
|
||||
else
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_ALLIANCE), 0);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_UNK_ALLIANCE, 0);
|
||||
|
||||
if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_GROUND)
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_HORDE), -1);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_UNK_HORDE, uint32(-1)); // ??
|
||||
else if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_HORDE), 1);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_UNK_HORDE, 1);
|
||||
else
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_UNK_HORDE), 0);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_UNK_HORDE, 0);
|
||||
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_CAPTURES_MAX), int32(BG_WS_MAX_TEAM_SCORE));
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_CAPTURES_MAX, BG_WS_MAX_TEAM_SCORE);
|
||||
|
||||
if (GetStatus() == STATUS_IN_PROGRESS)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_STATE_TIMER_ACTIVE), 1);
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_STATE_TIMER), int32(25 - _minutesElapsed));
|
||||
packet.Worldstates.emplace_back(BG_WS_STATE_TIMER_ACTIVE, 1);
|
||||
packet.Worldstates.emplace_back(BG_WS_STATE_TIMER, 25 - _minutesElapsed);
|
||||
}
|
||||
else
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_STATE_TIMER_ACTIVE), 0);
|
||||
packet.Worldstates.emplace_back(BG_WS_STATE_TIMER_ACTIVE, 0);
|
||||
|
||||
if (_flagState[TEAM_HORDE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_HORDE), 2);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_STATE_HORDE, 2);
|
||||
else
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_HORDE), 1);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_STATE_HORDE, 1);
|
||||
|
||||
if (_flagState[TEAM_ALLIANCE] == BG_WS_FLAG_STATE_ON_PLAYER)
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_ALLIANCE), 2);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_STATE_ALLIANCE, 2);
|
||||
else
|
||||
packet.Worldstates.emplace_back(uint32(BG_WS_FLAG_STATE_ALLIANCE), 1);
|
||||
packet.Worldstates.emplace_back(BG_WS_FLAG_STATE_ALLIANCE, 1);
|
||||
}
|
||||
|
||||
uint32 BattlegroundWS::GetPrematureWinner()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2279,7 +2279,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
|
||||
void SetEquipmentSet(EquipmentSetInfo::EquipmentSetData const& newEqSet);
|
||||
void DeleteEquipmentSet(uint64 id);
|
||||
|
||||
void SendInitWorldStates(uint32 zone, uint32 area);
|
||||
void SendInitWorldStates(uint32 zoneId, uint32 areaId);
|
||||
void SendUpdateWorldState(uint32 variable, uint32 value, bool hidden = false) const;
|
||||
void SendDirectMessage(WorldPacket const* data) const;
|
||||
void SendBGWeekendWorldStates() const;
|
||||
|
||||
@@ -257,6 +257,10 @@ class TC_GAME_API InstanceScript : public ZoneScript
|
||||
// Returns completed encounters mask for packets
|
||||
uint32 GetCompletedEncounterMask() const { return completedEncounters; }
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
|
||||
uint32 GetEncounterCount() const { return uint32(bosses.size()); }
|
||||
|
||||
// Sets the entrance location (WorldSafeLoc) id
|
||||
void SetEntranceLocation(uint32 worldSafeLocationId);
|
||||
|
||||
@@ -277,13 +281,9 @@ class TC_GAME_API InstanceScript : public ZoneScript
|
||||
|
||||
void SendBossKillCredit(uint32 encounterId);
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
|
||||
// ReCheck PhaseTemplate related conditions
|
||||
void UpdatePhasing();
|
||||
|
||||
uint32 GetEncounterCount() const { return uint32(bosses.size()); }
|
||||
|
||||
void InitializeCombatResurrections(uint8 charges = 1, uint32 interval = 0);
|
||||
void AddCombatResurrectionCharge();
|
||||
void UseCombatResurrection();
|
||||
|
||||
@@ -198,7 +198,7 @@ class TC_GAME_API OutdoorPvP : public ZoneScript
|
||||
|
||||
typedef std::map<ObjectGuid::LowType/*spawnId*/, OPvPCapturePoint*> OPvPCapturePointMap;
|
||||
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates & /*packet*/) { }
|
||||
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& /*packet*/) { }
|
||||
|
||||
// called when a player triggers an areatrigger
|
||||
virtual bool HandleAreaTrigger(Player* /*player*/, uint32 /*trigger*/, bool /*entered*/) { return false; }
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "culling_of_stratholme.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "culling_of_stratholme.h"
|
||||
#include "EventMap.h"
|
||||
#include "GameObject.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
@@ -72,11 +72,11 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_SHOW_CRATES, 1);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_CRATES_REVEALED, _crateCount);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_WAVE_COUNT, 0);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_TIME_GUARDIAN, 25);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_TIME_GUARDIAN_SHOW, 0);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
|
||||
@@ -220,9 +220,15 @@ class spell_skeram_arcane_explosion : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if([](WorldObject* target)
|
||||
targets.remove_if([](WorldObject* object) -> bool
|
||||
{
|
||||
return target->GetTypeId() != TYPEID_PLAYER && (target->GetTypeId() != TYPEID_UNIT || !target->ToUnit()->IsPet());
|
||||
if (object->GetTypeId() == TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
if (Creature* creature = object->ToCreature())
|
||||
return !creature->IsPet();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ruby_sanctum.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "ruby_sanctum.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
@@ -199,9 +199,9 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_CORPOREALITY_MATERIAL, 50);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_CORPOREALITY_TWILIGHT, 50);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_CORPOREALITY_TOGGLE, 0);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "halls_of_reflection.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Transport.h"
|
||||
#include "WorldStatePackets.h"
|
||||
@@ -296,8 +296,8 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_HOR_WAVES_ENABLED, (_introState == DONE && GetBossState(DATA_MARWYN) != DONE) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_HOR_WAVE_COUNT, _waveCount);
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
|
||||
@@ -168,11 +168,11 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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));
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_SHOW_TIMER, BloodQuickeningState == IN_PROGRESS ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_EXECUTION_TIME, BloodQuickeningMinutes);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_SHOW_ATTEMPTS, instance->IsHeroic() ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_ATTEMPTS_REMAINING, HeroicAttempts);
|
||||
packet.Worldstates.emplace_back(WORLDSTATE_ATTEMPTS_MAX, MaxHeroicAttempts);
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "oculus.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "oculus.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "WorldStatePackets.h"
|
||||
@@ -155,13 +155,13 @@ class instance_oculus : public InstanceMapScript
|
||||
{
|
||||
if (GetBossState(DATA_DRAKOS) == DONE && GetBossState(DATA_VAROS) != DONE)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW), 1);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT), int32(CentrifugueConstructCounter));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, CentrifugueConstructCounter);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW), 0);
|
||||
packet.Worldstates.emplace_back(uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT), 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -526,11 +526,17 @@ class spell_auriaya_sentinel_blast : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_auriaya_sentinel_blast);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
unitList.remove_if([](WorldObject* target)
|
||||
targets.remove_if([](WorldObject* object) -> bool
|
||||
{
|
||||
return target->GetTypeId() != TYPEID_PLAYER && (target->GetTypeId() != TYPEID_UNIT || !target->ToUnit()->IsPet());
|
||||
if (object->GetTypeId() == TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
if (Creature* creature = object->ToCreature())
|
||||
return !creature->IsPet();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -615,11 +615,17 @@ class spell_kologarn_stone_shout : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_kologarn_stone_shout_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
unitList.remove_if([](WorldObject* target)
|
||||
targets.remove_if([](WorldObject* object) -> bool
|
||||
{
|
||||
return target->GetTypeId() != TYPEID_PLAYER && (target->GetTypeId() != TYPEID_UNIT || !target->ToUnit()->IsPet());
|
||||
if (object->GetTypeId() == TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
if (Creature* creature = object->ToCreature())
|
||||
return !creature->IsPet();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ class boss_thorim : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_OUTRO_2, _hardMode ? 8000 : 11000);
|
||||
events.ScheduleEvent(EVENT_OUTRO_3, _hardMode ? 19000 : 21000);
|
||||
|
||||
me->m_Events.AddEvent(new KeeperDespawnEvent(me), me->m_Events.CalculateTime(35000));
|
||||
me->m_Events.AddEvent(new UlduarKeeperDespawnEvent(me), me->m_Events.CalculateTime(35000));
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
@@ -1711,12 +1711,18 @@ class spell_thorim_frostbolt_volley : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_thorim_frostbolt_volley_SpellScript);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
unitList.remove_if([](WorldObject* target)
|
||||
{
|
||||
return target->GetTypeId() != TYPEID_PLAYER && (target->GetTypeId() != TYPEID_UNIT || !target->ToUnit()->IsPet());
|
||||
});
|
||||
targets.remove_if([](WorldObject* object) -> bool
|
||||
{
|
||||
if (object->GetTypeId() == TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
if (Creature* creature = object->ToCreature())
|
||||
return !creature->IsPet();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ulduar.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
@@ -23,10 +23,10 @@
|
||||
#include "Item.h"
|
||||
#include "Map.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellScript.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "ulduar.h"
|
||||
#include "Vehicle.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <sstream>
|
||||
@@ -143,6 +143,17 @@ ObjectData const objectData[] =
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
UlduarKeeperDespawnEvent::UlduarKeeperDespawnEvent(Creature* owner, uint32 despawnTimerOffset) : _owner(owner), _despawnTimer(despawnTimerOffset)
|
||||
{
|
||||
}
|
||||
|
||||
bool UlduarKeeperDespawnEvent::Execute(uint64 /*eventTime*/, uint32 /*updateTime*/)
|
||||
{
|
||||
_owner->CastSpell(_owner, SPELL_TELEPORT_KEEPER_VISUAL);
|
||||
_owner->DespawnOrUnsummon(1000 + _despawnTimer);
|
||||
return true;
|
||||
}
|
||||
|
||||
class instance_ulduar : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -218,8 +229,8 @@ class instance_ulduar : public InstanceMapScript
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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)));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ALGALON_TIMER_ENABLED, (_algalonTimer && _algalonTimer <= 60) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ALGALON_DESPAWN_TIMER, std::min<int32>(_algalonTimer, 60));
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define DEF_ULDUAR_H
|
||||
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "EventProcessor.h"
|
||||
|
||||
struct Position;
|
||||
|
||||
@@ -508,17 +509,14 @@ enum YoggSaronIllusions
|
||||
STORMWIND_ILLUSION = 2,
|
||||
};
|
||||
|
||||
class KeeperDespawnEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
KeeperDespawnEvent(Creature* owner, uint32 despawnTimerOffset = 500) : _owner(owner), _despawnTimer(despawnTimerOffset) { }
|
||||
class Creature;
|
||||
|
||||
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override
|
||||
{
|
||||
_owner->CastSpell(_owner, SPELL_TELEPORT_KEEPER_VISUAL);
|
||||
_owner->DespawnOrUnsummon(1000 + _despawnTimer);
|
||||
return true;
|
||||
}
|
||||
class UlduarKeeperDespawnEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
UlduarKeeperDespawnEvent(Creature* owner, uint32 despawnTimerOffset = 500);
|
||||
|
||||
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override;
|
||||
|
||||
private:
|
||||
Creature* _owner;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "violet_hold.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
@@ -24,8 +24,8 @@
|
||||
#include "MotionMaster.h"
|
||||
#include "Player.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "violet_hold.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <sstream>
|
||||
|
||||
@@ -293,11 +293,11 @@ class instance_violet_hold : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& data) override
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
data.Worldstates.emplace_back(uint32(WORLD_STATE_VH_SHOW), uint32(EventState == IN_PROGRESS ? 1 : 0));
|
||||
data.Worldstates.emplace_back(uint32(WORLD_STATE_VH_PRISON_STATE), uint32(DoorIntegrity));
|
||||
data.Worldstates.emplace_back(uint32(WORLD_STATE_VH_WAVE_COUNT), uint32(WaveCount));
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_VH_SHOW, EventState == IN_PROGRESS ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_VH_PRISON_STATE, DoorIntegrity);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_VH_WAVE_COUNT, WaveCount);
|
||||
}
|
||||
|
||||
bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
|
||||
|
||||
@@ -15,28 +15,21 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "OutdoorPvPHP.h"
|
||||
#include "GameObject.h"
|
||||
#include "MapManager.h"
|
||||
#include "OutdoorPvPHP.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
uint32 const OutdoorPvPHPBuffZonesNum = 6;
|
||||
// HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
|
||||
uint32 const OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 };
|
||||
|
||||
uint32 const OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 }; // HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
|
||||
uint32 const HP_CREDITMARKER[HP_TOWER_NUM] = { 19032, 19028, 19029 };
|
||||
|
||||
/*
|
||||
uint32 const HP_CapturePointEvent_Enter[HP_TOWER_NUM] = { 11404, 11396, 11388 };
|
||||
uint32 const HP_CapturePointEvent_Leave[HP_TOWER_NUM] = { 11403, 11395, 11387 };
|
||||
*/
|
||||
|
||||
//uint32 const HP_CapturePointEvent_Enter[HP_TOWER_NUM] = { 11404, 11396, 11388 };
|
||||
//uint32 const HP_CapturePointEvent_Leave[HP_TOWER_NUM] = { 11403, 11395, 11387 };
|
||||
uint32 const HP_MAP_N[HP_TOWER_NUM] = { 0x9b5, 0x9b2, 0x9a8 };
|
||||
uint32 const HP_MAP_A[HP_TOWER_NUM] = { 0x9b3, 0x9b0, 0x9a7 };
|
||||
uint32 const HP_MAP_H[HP_TOWER_NUM] = { 0x9b4, 0x9b1, 0x9a6 };
|
||||
|
||||
uint32 const HP_TowerArtKit_A[HP_TOWER_NUM] = { 65, 62, 67 };
|
||||
uint32 const HP_TowerArtKit_H[HP_TOWER_NUM] = { 64, 61, 68 };
|
||||
uint32 const HP_TowerArtKit_N[HP_TOWER_NUM] = { 66, 63, 69 };
|
||||
@@ -58,13 +51,11 @@ go_type const HPTowerFlags[HP_TOWER_NUM] =
|
||||
uint32 const HP_LANG_CAPTURE_A[HP_TOWER_NUM] = { TEXT_BROKEN_HILL_TAKEN_ALLIANCE, TEXT_OVERLOOK_TAKEN_ALLIANCE, TEXT_STADIUM_TAKEN_ALLIANCE };
|
||||
uint32 const HP_LANG_CAPTURE_H[HP_TOWER_NUM] = { TEXT_BROKEN_HILL_TAKEN_HORDE, TEXT_OVERLOOK_TAKEN_HORDE, TEXT_STADIUM_TAKEN_HORDE };
|
||||
|
||||
OPvPCapturePointHP::OPvPCapturePointHP(OutdoorPvP* pvp, OutdoorPvPHPTowerType type)
|
||||
: OPvPCapturePoint(pvp), m_TowerType(type)
|
||||
OPvPCapturePointHP::OPvPCapturePointHP(OutdoorPvP* pvp, OutdoorPvPHPTowerType type) : OPvPCapturePoint(pvp), m_TowerType(type)
|
||||
{
|
||||
SetCapturePointData(HPCapturePoints[type].entry, HPCapturePoints[type].map, HPCapturePoints[type].pos, HPCapturePoints[type].rot);
|
||||
AddObject(type, HPTowerFlags[type].entry, HPTowerFlags[type].map, HPTowerFlags[type].pos, HPTowerFlags[type].rot);
|
||||
}
|
||||
|
||||
OutdoorPvPHP::OutdoorPvPHP()
|
||||
{
|
||||
m_TypeId = OUTDOOR_PVP_HP;
|
||||
@@ -158,10 +149,10 @@ void OutdoorPvPHP::SendRemoveWorldStates(Player* player)
|
||||
|
||||
void OutdoorPvPHP::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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));
|
||||
packet.Worldstates.emplace_back(HP_UI_TOWER_DISPLAY_A, 1);
|
||||
packet.Worldstates.emplace_back(HP_UI_TOWER_DISPLAY_H, 1);
|
||||
packet.Worldstates.emplace_back(HP_UI_TOWER_COUNT_A, m_AllianceTowersControlled);
|
||||
packet.Worldstates.emplace_back(HP_UI_TOWER_COUNT_H, m_HordeTowersControlled);
|
||||
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
itr->second->FillInitialWorldStates(packet);
|
||||
@@ -276,23 +267,23 @@ void OPvPCapturePointHP::FillInitialWorldStates(WorldPackets::WorldState::InitWo
|
||||
{
|
||||
case OBJECTIVESTATE_ALLIANCE:
|
||||
case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
|
||||
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);
|
||||
packet.Worldstates.emplace_back(HP_MAP_N[m_TowerType], 0);
|
||||
packet.Worldstates.emplace_back(HP_MAP_A[m_TowerType], 1);
|
||||
packet.Worldstates.emplace_back(HP_MAP_H[m_TowerType], 0);
|
||||
break;
|
||||
case OBJECTIVESTATE_HORDE:
|
||||
case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE:
|
||||
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);
|
||||
packet.Worldstates.emplace_back(HP_MAP_N[m_TowerType], 0);
|
||||
packet.Worldstates.emplace_back(HP_MAP_A[m_TowerType], 0);
|
||||
packet.Worldstates.emplace_back(HP_MAP_H[m_TowerType], 1);
|
||||
break;
|
||||
case OBJECTIVESTATE_NEUTRAL:
|
||||
case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE:
|
||||
case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE:
|
||||
default:
|
||||
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);
|
||||
packet.Worldstates.emplace_back(HP_MAP_N[m_TowerType], 1);
|
||||
packet.Worldstates.emplace_back(HP_MAP_A[m_TowerType], 0);
|
||||
packet.Worldstates.emplace_back(HP_MAP_H[m_TowerType], 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ class OPvPCapturePointHP : public OPvPCapturePoint
|
||||
OPvPCapturePointHP(OutdoorPvP* pvp, OutdoorPvPHPTowerType type);
|
||||
|
||||
void ChangeState() override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
private:
|
||||
@@ -79,22 +78,17 @@ class OutdoorPvPHP : public OutdoorPvP
|
||||
void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void SendRemoveWorldStates(Player* player) override;
|
||||
|
||||
void HandleKillImpl(Player* player, Unit* killed) override;
|
||||
|
||||
uint32 GetAllianceTowersControlled() const;
|
||||
void SetAllianceTowersControlled(uint32 count);
|
||||
|
||||
uint32 GetHordeTowersControlled() const;
|
||||
void SetHordeTowersControlled(uint32 count);
|
||||
|
||||
private:
|
||||
// how many towers are controlled
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_AllianceTowersControlled; // how many towers are controlled
|
||||
uint32 m_HordeTowersControlled;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,32 +15,23 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "OutdoorPvPNA.h"
|
||||
#include "Creature.h"
|
||||
#include "GameObject.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPNA.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
// kill credit for pks
|
||||
uint32 const NA_CREDIT_MARKER = 24867;
|
||||
|
||||
uint32 const NA_CREDIT_MARKER = 24867; // kill credit for pks
|
||||
uint32 const NA_GUARDS_MAX = 15;
|
||||
|
||||
uint32 const NA_BUFF_ZONE = 3518;
|
||||
|
||||
uint32 const NA_HALAA_GRAVEYARD = 993;
|
||||
|
||||
uint32 const NA_HALAA_GRAVEYARD_ZONE = 3518; // need to add zone id, not area id
|
||||
|
||||
uint32 const NA_RESPAWN_TIME = 3600000; // one hour to capture after defeating all guards
|
||||
|
||||
uint32 const NA_GUARD_CHECK_TIME = 500; // every half second
|
||||
|
||||
uint32 const FLIGHT_NODES_NUM = 4;
|
||||
|
||||
uint32 const FlightPathStartNodes[FLIGHT_NODES_NUM] = { 103, 105, 107, 109 };
|
||||
uint32 const FlightPathEndNodes[FLIGHT_NODES_NUM] = { 104, 106, 108, 110 };
|
||||
|
||||
@@ -284,10 +275,8 @@ void OPvPCapturePointNA::FactionTakeOver(uint32 team)
|
||||
UpdateWyvernRoostWorldState(NA_ROOST_E);
|
||||
}
|
||||
|
||||
OPvPCapturePointNA::OPvPCapturePointNA(OutdoorPvP* pvp) :
|
||||
OPvPCapturePoint(pvp), m_capturable(true), m_GuardsAlive(0), m_ControllingFaction(0),
|
||||
m_WyvernStateNorth(0), m_WyvernStateSouth(0), m_WyvernStateEast(0), m_WyvernStateWest(0),
|
||||
m_HalaaState(HALAA_N), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME)
|
||||
OPvPCapturePointNA::OPvPCapturePointNA(OutdoorPvP* pvp) : OPvPCapturePoint(pvp), m_capturable(true), m_GuardsAlive(0), m_ControllingFaction(0), m_WyvernStateNorth(0), m_WyvernStateSouth(0), m_WyvernStateEast(0),
|
||||
m_WyvernStateWest(0), m_HalaaState(HALAA_N), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME)
|
||||
{
|
||||
SetCapturePointData(182210, 530, { -1572.57f, 7945.3f, -22.475f, 2.05949f }, { 0.0f, 0.0f, 0.857167f, 0.515038f });
|
||||
}
|
||||
@@ -330,48 +319,43 @@ void OPvPCapturePointNA::FillInitialWorldStates(WorldPackets::WorldState::InitWo
|
||||
{
|
||||
if (m_ControllingFaction == ALLIANCE)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_HORDE_GUARDS_SHOW), 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_ALLIANCE_GUARDS_SHOW), 1);
|
||||
packet.Worldstates.emplace_back(NA_UI_HORDE_GUARDS_SHOW, 0);
|
||||
packet.Worldstates.emplace_back(NA_UI_ALLIANCE_GUARDS_SHOW, 1);
|
||||
}
|
||||
else if (m_ControllingFaction == HORDE)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_HORDE_GUARDS_SHOW), 1);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_ALLIANCE_GUARDS_SHOW), 1);
|
||||
packet.Worldstates.emplace_back(NA_UI_HORDE_GUARDS_SHOW, 1);
|
||||
packet.Worldstates.emplace_back(NA_UI_ALLIANCE_GUARDS_SHOW, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_HORDE_GUARDS_SHOW), 0);
|
||||
packet.Worldstates.emplace_back(uint32(NA_UI_ALLIANCE_GUARDS_SHOW), 0);
|
||||
packet.Worldstates.emplace_back(NA_UI_HORDE_GUARDS_SHOW, 0);
|
||||
packet.Worldstates.emplace_back(NA_UI_ALLIANCE_GUARDS_SHOW, 0);
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
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));
|
||||
|
||||
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));
|
||||
|
||||
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));
|
||||
|
||||
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));
|
||||
|
||||
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));
|
||||
packet.Worldstates.emplace_back(NA_UI_GUARDS_MAX, NA_GUARDS_MAX);
|
||||
packet.Worldstates.emplace_back(NA_UI_GUARDS_LEFT, m_GuardsAlive);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_NORTH_NEU_H, (m_WyvernStateNorth & WYVERN_NEU_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_NORTH_NEU_A, (m_WyvernStateNorth & WYVERN_NEU_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_NORTH_H, (m_WyvernStateNorth & WYVERN_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_NORTH_A, (m_WyvernStateNorth & WYVERN_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_SOUTH_NEU_H, (m_WyvernStateSouth & WYVERN_NEU_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_SOUTH_NEU_A, (m_WyvernStateSouth & WYVERN_NEU_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_SOUTH_H, (m_WyvernStateSouth & WYVERN_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_SOUTH_A, (m_WyvernStateSouth & WYVERN_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_WEST_NEU_H, (m_WyvernStateWest & WYVERN_NEU_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_WEST_NEU_A, (m_WyvernStateWest & WYVERN_NEU_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_WEST_H, (m_WyvernStateWest & WYVERN_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_WEST_A, (m_WyvernStateWest & WYVERN_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_EAST_NEU_H, (m_WyvernStateEast & WYVERN_NEU_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_EAST_NEU_A, (m_WyvernStateEast & WYVERN_NEU_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_EAST_H, (m_WyvernStateEast & WYVERN_HORDE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_WYVERN_EAST_A, (m_WyvernStateEast & WYVERN_ALLIANCE) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_HALAA_NEUTRAL, (m_HalaaState & HALAA_N) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_HALAA_NEU_A, (m_HalaaState & HALAA_N_A) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_HALAA_NEU_H, (m_HalaaState & HALAA_N_H) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_HALAA_HORDE, (m_HalaaState & HALAA_H) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(NA_MAP_HALAA_ALLIANCE, (m_HalaaState & HALAA_A) != 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
void OutdoorPvPNA::SendRemoveWorldStates(Player* player)
|
||||
|
||||
@@ -148,7 +148,6 @@ enum HalaaStates
|
||||
|
||||
class Unit;
|
||||
class Creature;
|
||||
class OutdoorPvPNA;
|
||||
|
||||
class OPvPCapturePointNA : public OPvPCapturePoint
|
||||
{
|
||||
@@ -156,47 +155,31 @@ class OPvPCapturePointNA : public OPvPCapturePoint
|
||||
OPvPCapturePointNA(OutdoorPvP* pvp);
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void ChangeState() override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
bool HandleCustomSpell(Player* player, uint32 spellId, GameObject* go) override;
|
||||
|
||||
int32 HandleOpenGo(Player* player, GameObject* go) override;
|
||||
|
||||
uint32 GetAliveGuardsCount();
|
||||
uint32 GetControllingFaction() const;
|
||||
|
||||
protected:
|
||||
// called when a faction takes control
|
||||
void FactionTakeOver(uint32 team);
|
||||
|
||||
void FactionTakeOver(uint32 team); // called when a faction takes control
|
||||
void DeSpawnNPCs();
|
||||
void DeSpawnGOs();
|
||||
|
||||
void SpawnNPCsForTeam(uint32 team);
|
||||
void SpawnGOsForTeam(uint32 team);
|
||||
|
||||
void UpdateWyvernRoostWorldState(uint32 roost);
|
||||
void UpdateHalaaWorldState();
|
||||
|
||||
private:
|
||||
bool m_capturable;
|
||||
|
||||
uint32 m_GuardsAlive;
|
||||
|
||||
uint32 m_ControllingFaction;
|
||||
|
||||
uint32 m_WyvernStateNorth;
|
||||
uint32 m_WyvernStateSouth;
|
||||
uint32 m_WyvernStateEast;
|
||||
uint32 m_WyvernStateWest;
|
||||
|
||||
uint32 m_HalaaState;
|
||||
|
||||
uint32 m_RespawnTimer;
|
||||
|
||||
uint32 m_GuardCheckTimer;
|
||||
};
|
||||
|
||||
@@ -206,20 +189,15 @@ class OutdoorPvPNA : public OutdoorPvP
|
||||
OutdoorPvPNA();
|
||||
|
||||
bool SetupOutdoorPvP() override;
|
||||
|
||||
void HandlePlayerEnterZone(Player* player, uint32 zone) override;
|
||||
void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void SendRemoveWorldStates(Player* player) override;
|
||||
|
||||
void HandleKillImpl(Player* player, Unit* killed) override;
|
||||
|
||||
private:
|
||||
OPvPCapturePointNA * m_obj;
|
||||
OPvPCapturePointNA* m_obj;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,29 +15,25 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "OutdoorPvPSI.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameObject.h"
|
||||
#include "Language.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPSI.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
uint32 const SI_MAX_RESOURCES = 200;
|
||||
|
||||
uint32 const SI_AREATRIGGER_H = 4168;
|
||||
uint32 const SI_AREATRIGGER_A = 4162;
|
||||
|
||||
uint32 const SI_TURNIN_QUEST_CM_A = 17090;
|
||||
uint32 const SI_TURNIN_QUEST_CM_H = 18199;
|
||||
|
||||
uint32 const SI_SILITHYST_MOUND = 181597;
|
||||
|
||||
uint8 const OutdoorPvPSIBuffZonesNum = 3;
|
||||
uint32 const OutdoorPvPSIBuffZones[OutdoorPvPSIBuffZonesNum] = { 1377, 3428, 3429 };
|
||||
|
||||
@@ -51,9 +47,9 @@ OutdoorPvPSI::OutdoorPvPSI()
|
||||
|
||||
void OutdoorPvPSI::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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));
|
||||
packet.Worldstates.emplace_back(SI_GATHERED_A, m_Gathered_A);
|
||||
packet.Worldstates.emplace_back(SI_GATHERED_H, m_Gathered_H);
|
||||
packet.Worldstates.emplace_back(SI_SILITHYST_MAX, SI_MAX_RESOURCES);
|
||||
}
|
||||
|
||||
void OutdoorPvPSI::SendRemoveWorldStates(Player* player)
|
||||
|
||||
@@ -41,28 +41,19 @@ class OutdoorPvPSI : public OutdoorPvP
|
||||
OutdoorPvPSI();
|
||||
|
||||
bool SetupOutdoorPvP() override;
|
||||
|
||||
void HandlePlayerEnterZone(Player* player, uint32 zone) override;
|
||||
void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void SendRemoveWorldStates(Player* player) override;
|
||||
|
||||
bool HandleAreaTrigger(Player* player, uint32 trigger, bool entered) override;
|
||||
|
||||
bool HandleDropFlag(Player* player, uint32 spellId) override;
|
||||
|
||||
bool HandleCustomSpell(Player* player, uint32 spellId, GameObject* go) override;
|
||||
|
||||
void UpdateWorldState();
|
||||
|
||||
private:
|
||||
uint32 m_Gathered_A;
|
||||
uint32 m_Gathered_H;
|
||||
|
||||
uint32 m_LastController;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "OutdoorPvPTF.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
uint8 const OutdoorPvPTFBuffZonesNum = 5;
|
||||
@@ -93,44 +93,39 @@ uint32 const TFTowerPlayerLeaveEvents[TF_TOWER_NUM] =
|
||||
OutdoorPvPTF::OutdoorPvPTF()
|
||||
{
|
||||
m_TypeId = OUTDOOR_PVP_TF;
|
||||
|
||||
m_IsLocked = false;
|
||||
m_LockTimer = TF_LOCK_TIME;
|
||||
m_LockTimerUpdate = 0;
|
||||
|
||||
m_AllianceTowersControlled = 0;
|
||||
m_HordeTowersControlled = 0;
|
||||
|
||||
hours_left = 6;
|
||||
second_digit = 0;
|
||||
first_digit = 0;
|
||||
}
|
||||
|
||||
OPvPCapturePointTF::OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType type)
|
||||
: OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(TF_TOWERSTATE_N)
|
||||
OPvPCapturePointTF::OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(TF_TOWERSTATE_N)
|
||||
{
|
||||
SetCapturePointData(TFCapturePoints[type].entry, TFCapturePoints[type].map, TFCapturePoints[type].pos, TFCapturePoints[type].rot);
|
||||
}
|
||||
|
||||
void OPvPCapturePointTF::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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));
|
||||
packet.Worldstates.emplace_back(TFTowerWorldStates[m_TowerType].n, (m_TowerState & TF_TOWERSTATE_N) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(TFTowerWorldStates[m_TowerType].h, (m_TowerState & TF_TOWERSTATE_H) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(TFTowerWorldStates[m_TowerType].a, (m_TowerState & TF_TOWERSTATE_A) != 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
void OutdoorPvPTF::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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)));
|
||||
packet.Worldstates.emplace_back(TF_UI_TOWER_COUNT_H, m_HordeTowersControlled);
|
||||
packet.Worldstates.emplace_back(TF_UI_TOWER_COUNT_A, m_AllianceTowersControlled);
|
||||
packet.Worldstates.emplace_back(TF_UI_TOWERS_CONTROLLED_DISPLAY, !m_IsLocked);
|
||||
packet.Worldstates.emplace_back(TF_UI_LOCKED_TIME_MINUTES_FIRST_DIGIT, first_digit);
|
||||
packet.Worldstates.emplace_back(TF_UI_LOCKED_TIME_MINUTES_SECOND_DIGIT, second_digit);
|
||||
packet.Worldstates.emplace_back(TF_UI_LOCKED_TIME_HOURS, hours_left);
|
||||
packet.Worldstates.emplace_back(TF_UI_LOCKED_DISPLAY_NEUTRAL, (m_IsLocked && !m_HordeTowersControlled && !m_AllianceTowersControlled) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(TF_UI_LOCKED_DISPLAY_HORDE, (m_IsLocked && (m_HordeTowersControlled > m_AllianceTowersControlled)) ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(TF_UI_LOCKED_DISPLAY_ALLIANCE, (m_IsLocked && (m_HordeTowersControlled < m_AllianceTowersControlled)) ? 1 : 0);
|
||||
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
itr->second->FillInitialWorldStates(packet);
|
||||
|
||||
@@ -67,16 +67,13 @@ class OPvPCapturePointTF : public OPvPCapturePoint
|
||||
OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType type);
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void ChangeState() override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
protected:
|
||||
OutdoorPvPTF_TowerType m_TowerType;
|
||||
|
||||
uint32 m_TowerState;
|
||||
};
|
||||
|
||||
@@ -86,32 +83,24 @@ class OutdoorPvPTF : public OutdoorPvP
|
||||
OutdoorPvPTF();
|
||||
|
||||
bool SetupOutdoorPvP() override;
|
||||
|
||||
void HandlePlayerEnterZone(Player* player, uint32 zone) override;
|
||||
void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void SendRemoveWorldStates(Player* player) override;
|
||||
|
||||
uint32 GetAllianceTowersControlled() const;
|
||||
void SetAllianceTowersControlled(uint32 count);
|
||||
|
||||
uint32 GetHordeTowersControlled() const;
|
||||
void SetHordeTowersControlled(uint32 count);
|
||||
|
||||
bool IsLocked() const;
|
||||
|
||||
private:
|
||||
bool m_IsLocked;
|
||||
uint32 m_LockTimer;
|
||||
uint32 m_LockTimerUpdate;
|
||||
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
|
||||
uint32 hours_left, second_digit, first_digit;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "OutdoorPvPZM.h"
|
||||
#include "Creature.h"
|
||||
#include "GossipDef.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPZM.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
uint8 const OutdoorPvPZMBuffZonesNum = 5;
|
||||
@@ -83,20 +84,19 @@ go_type const ZMCapturePoints[ZM_NUM_BEACONS] =
|
||||
{ 182522, 530, { 336.466f, 7340.26f, 41.4984f, -1.58825f }, { 0.0f, 0.0f, 0.71325f, -0.700909f } }
|
||||
};
|
||||
|
||||
OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type)
|
||||
: OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(ZM_TOWERSTATE_N)
|
||||
OPvPCapturePointZM_Beacon::OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type) : OPvPCapturePoint(pvp), m_TowerType(type), m_TowerState(ZM_TOWERSTATE_N)
|
||||
{
|
||||
SetCapturePointData(ZMCapturePoints[type].entry, ZMCapturePoints[type].map, ZMCapturePoints[type].pos, ZMCapturePoints[type].rot);
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_Beacon::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].ui_tower_n, (m_TowerState & ZM_TOWERSTATE_N) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].map_tower_n, (m_TowerState & ZM_TOWERSTATE_N) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].ui_tower_a, (m_TowerState & ZM_TOWERSTATE_A) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].map_tower_a, (m_TowerState & ZM_TOWERSTATE_A) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].ui_tower_h, (m_TowerState & ZM_TOWERSTATE_H) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZMBeaconInfo[m_TowerType].map_tower_h, (m_TowerState & ZM_TOWERSTATE_H) != 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_Beacon::UpdateTowerState()
|
||||
@@ -273,8 +273,7 @@ int32 OPvPCapturePointZM_Graveyard::HandleOpenGo(Player* player, GameObject* go)
|
||||
return retval;
|
||||
}
|
||||
|
||||
OPvPCapturePointZM_Graveyard::OPvPCapturePointZM_Graveyard(OutdoorPvP* pvp)
|
||||
: OPvPCapturePoint(pvp)
|
||||
OPvPCapturePointZM_Graveyard::OPvPCapturePointZM_Graveyard(OutdoorPvP* pvp) : OPvPCapturePoint(pvp)
|
||||
{
|
||||
m_BothControllingFaction = 0;
|
||||
m_GraveyardState = ZM_GRAVEYARD_N;
|
||||
@@ -300,14 +299,13 @@ void OPvPCapturePointZM_Graveyard::UpdateTowerState()
|
||||
|
||||
void OPvPCapturePointZM_Graveyard::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
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));
|
||||
|
||||
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));
|
||||
packet.Worldstates.emplace_back(ZM_MAP_GRAVEYARD_N, (m_GraveyardState & ZM_GRAVEYARD_N) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZM_MAP_GRAVEYARD_H, (m_GraveyardState & ZM_GRAVEYARD_H) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZM_MAP_GRAVEYARD_A, (m_GraveyardState & ZM_GRAVEYARD_A) != 0 ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZM_MAP_ALLIANCE_FLAG_READY, m_BothControllingFaction == ALLIANCE ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZM_MAP_ALLIANCE_FLAG_NOT_READY, m_BothControllingFaction != ALLIANCE ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZM_MAP_HORDE_FLAG_READY, m_BothControllingFaction == HORDE ? 1 : 0);
|
||||
packet.Worldstates.emplace_back(ZM_MAP_HORDE_FLAG_NOT_READY, m_BothControllingFaction != HORDE ? 1 : 0);
|
||||
}
|
||||
|
||||
void OPvPCapturePointZM_Graveyard::SetBeaconState(uint32 controlling_faction)
|
||||
@@ -434,7 +432,8 @@ void OutdoorPvPZM::SetHordeTowersControlled(uint32 count)
|
||||
|
||||
void OutdoorPvPZM::FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet)
|
||||
{
|
||||
packet.Worldstates.emplace_back(uint32(ZM_WORLDSTATE_UNK_1), 1);
|
||||
packet.Worldstates.emplace_back(ZM_WORLDSTATE_UNK_1, 1);
|
||||
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
itr->second->FillInitialWorldStates(packet);
|
||||
}
|
||||
|
||||
@@ -96,15 +96,12 @@ enum ZM_TowerStateMask
|
||||
ZM_TOWERSTATE_H = 4
|
||||
};
|
||||
|
||||
class OutdoorPvPZM;
|
||||
|
||||
class OPvPCapturePointZM_Beacon : public OPvPCapturePoint
|
||||
{
|
||||
public:
|
||||
OPvPCapturePointZM_Beacon(OutdoorPvP* pvp, ZM_BeaconType type);
|
||||
|
||||
void ChangeState() override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void UpdateTowerState();
|
||||
@@ -127,64 +124,46 @@ class OPvPCapturePointZM_Graveyard : public OPvPCapturePoint
|
||||
OPvPCapturePointZM_Graveyard(OutdoorPvP* pvp);
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void ChangeState() override { }
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void UpdateTowerState();
|
||||
|
||||
int32 HandleOpenGo(Player* player, GameObject* go) override;
|
||||
|
||||
void SetBeaconState(uint32 controlling_team); // not good atm
|
||||
|
||||
bool HandleGossipOption(Player* player, Creature* creature, uint32 gossipid) override;
|
||||
|
||||
bool HandleDropFlag(Player* player, uint32 spellId) override;
|
||||
|
||||
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso) override;
|
||||
|
||||
void UpdateTowerState();
|
||||
void SetBeaconState(uint32 controlling_team); // not good atm
|
||||
uint32 GetGraveyardState() const;
|
||||
|
||||
private:
|
||||
uint32 m_GraveyardState;
|
||||
|
||||
protected:
|
||||
uint32 m_BothControllingFaction;
|
||||
|
||||
ObjectGuid m_FlagCarrierGUID;
|
||||
uint32 m_GraveyardState;
|
||||
};
|
||||
|
||||
/// @todo flag carrier death/leave/mount/activitychange should give back the gossip options
|
||||
class OutdoorPvPZM : public OutdoorPvP
|
||||
{
|
||||
public:
|
||||
OutdoorPvPZM();
|
||||
|
||||
bool SetupOutdoorPvP() override;
|
||||
|
||||
void HandlePlayerEnterZone(Player* player, uint32 zone) override;
|
||||
void HandlePlayerLeaveZone(Player* player, uint32 zone) override;
|
||||
|
||||
bool Update(uint32 diff) override;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override;
|
||||
|
||||
void SendRemoveWorldStates(Player* player) override;
|
||||
|
||||
void HandleKillImpl(Player* player, Unit* killed) override;
|
||||
|
||||
uint32 GetAllianceTowersControlled() const;
|
||||
void SetAllianceTowersControlled(uint32 count);
|
||||
|
||||
uint32 GetHordeTowersControlled() const;
|
||||
void SetHordeTowersControlled(uint32 count);
|
||||
|
||||
private:
|
||||
OPvPCapturePointZM_Graveyard * m_Graveyard;
|
||||
|
||||
OPvPCapturePointZM_Graveyard* m_Graveyard;
|
||||
uint32 m_AllianceTowersControlled;
|
||||
uint32 m_HordeTowersControlled;
|
||||
};
|
||||
|
||||
/// @todo flag carrier death/leave/mount/activitychange should give back the gossip options
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user