mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/WorldStates: Migrate instance script worldstates to new system
This commit is contained in:
46
sql/updates/world/master/2022_06_30_00_world.sql
Normal file
46
sql/updates/world/master/2022_06_30_00_world.sql
Normal file
@@ -0,0 +1,46 @@
|
||||
DELETE FROM `world_state` WHERE `ID` IN (2436,2453,2454,2540,2541,2784,2842,3104,3106,3479,3480,3486,3504,3524,3581,3582,3583,3584,3585,3810,3815,3816,3931,3932,4116,4129,4131,4162,4389,4390,4408,4882,4884,4903,4904,4940,4941,4942,5049,5050,5051,5636);
|
||||
INSERT INTO `world_state` (`ID`,`DefaultValue`,`MapIDs`,`AreaIDs`,`Comment`) VALUES
|
||||
(2436,0,'560','','The Escape from Durnholde - Incendiary Bombs Set'),
|
||||
(2453,0,'534','','The Battle for Mount Hyjal - Show enemy count'),
|
||||
(2454,0,'534','','The Battle for Mount Hyjal - Enemy count'),
|
||||
(2540,100,'269','','Opening of the Dark Portal - Medivh\'s Shield Remaining'),
|
||||
(2541,0,'269','','Opening of the Dark Portal - Show instance status'),
|
||||
(2784,0,'269','','Opening of the Dark Portal - Time Rifts Opened'),
|
||||
(2842,0,'534','','The Battle for Mount Hyjal - Wave counter'),
|
||||
(3104,0,'568','','Zul\'Aman - Show timer'),
|
||||
(3106,15,'568','','Zul\'Aman - Timer'),
|
||||
(3479,0,'595','','The Culling of Stratholme - Show Plagued Crates Revealed'),
|
||||
(3480,0,'595','','The Culling of Stratholme - Plagued Crates Revealed'),
|
||||
(3486,0,'578','','The Oculus - Centrifuge Constructs Remaining'),
|
||||
(3504,0,'595','','The Culling of Stratholme - Scourge Wave'),
|
||||
(3524,0,'578','','The Oculus - Show Centrifuge Constructs Remaining'),
|
||||
(3581,0,'595','','The Culling of Stratholme - Elder\'s Square Gate wave marker'),
|
||||
(3582,0,'595','','The Culling of Stratholme - Festival Lane Gate wave marker'),
|
||||
(3583,0,'595','','The Culling of Stratholme - King\'s Square Fountain wave marker'),
|
||||
(3584,0,'595','','The Culling of Stratholme - Market Row Gate wave marker'),
|
||||
(3585,0,'595','','The Culling of Stratholme - Town Hall wave marker'),
|
||||
(3810,0,'608','','Violet Hold - Portals Opened'),
|
||||
(3815,100,'608,1544','','Violet Hold - Prison Seal Integrity'),
|
||||
(3816,0,'608,1544','','Violet Hold - Show'),
|
||||
(3931,25,'595','','The Culling of Stratholme - Guardian time remaining'),
|
||||
(3932,0,'595','','The Culling of Stratholme - Show Guardian time remaining'),
|
||||
(4116,0,'603','','Ulduar - Yogg-Saron keepers active'),
|
||||
(4129,4,'603','','Ulduar - Flame Leviathan destroyed towers'),
|
||||
(4131,0,'603','','Ulduar - Algalon timer'),
|
||||
(4162,0,'603','','Ulduar - Razorscale music'),
|
||||
(4389,50,'649','','Trial of the Crusader - Attempts remaining'),
|
||||
(4390,0,'649','','Trial of the Crusader - Show attempts remaining'),
|
||||
(4408,0,'649','','Trial of the Crusader - Player death count'),
|
||||
(4882,0,'668','','Halls of Reflection - Spirit Wave '),
|
||||
(4884,0,'668','','Halls of Reflection - Show Spirit Wave '),
|
||||
(4903,0,'631','','Icecrown Citadel - Show Time Until Execution'),
|
||||
(4904,30,'631','','Icecrown Citadel - Time Until Execution'),
|
||||
(4940,0,'631','4890,4891,4889,4859,4910','Icecrown Citadel - Show remaining heroic attempts'),
|
||||
(4941,50,'631','4890,4891,4889,4859,4910','Icecrown Citadel - Remaining heroic attempts'),
|
||||
(4942,50,'631','4890,4891,4889,4859,4910','Icecrown Citadel - Max heroic attempts'),
|
||||
(5049,50,'724','','The Ruby Sanctum - Halion\'s corporeality (Normal)'),
|
||||
(5050,50,'724','','The Ruby Sanctum - Halion\'s corporeality (Twilight)'),
|
||||
(5051,0,'724','','The Ruby Sanctum - Show Halion\'s corporeality'),
|
||||
(5636,0,'603','','Ulduar - Show Algalon timer');
|
||||
|
||||
DELETE FROM `criteria_data` WHERE `ScriptName` IN ('achievement_orbital_bombardment','achievement_orbital_devastation','achievement_nuked_from_orbit','achievement_orbit_uary');
|
||||
@@ -9205,7 +9205,6 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
uint32 mapId = GetMapId();
|
||||
Battleground* battleground = GetBattleground();
|
||||
OutdoorPvP* outdoorPvP = sOutdoorPvPMgr->GetOutdoorPvPToZoneId(zoneId);
|
||||
InstanceScript* instance = GetInstanceScript();
|
||||
|
||||
TC_LOG_DEBUG("network", "Player::SendInitWorldStates: Sending SMSG_INIT_WORLD_STATES for Map: %u, Zone: %u", mapId, zoneId);
|
||||
|
||||
@@ -9687,86 +9686,6 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(4345, 1); // unk
|
||||
}
|
||||
break;
|
||||
case 4987: // The Ruby Sanctum
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(5049, 50); // WORLDSTATE_CORPOREALITY_MATERIAL
|
||||
packet.Worldstates.emplace_back(5050, 50); // WORLDSTATE_CORPOREALITY_TWILIGHT
|
||||
packet.Worldstates.emplace_back(5051, 0); // WORLDSTATE_CORPOREALITY_TOGGLE
|
||||
}
|
||||
break;
|
||||
case 4812: // Icecrown Citadel
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(4903, 0); // WORLDSTATE_SHOW_TIMER (Blood Quickening weekly)
|
||||
packet.Worldstates.emplace_back(4904, 30); // WORLDSTATE_EXECUTION_TIME
|
||||
packet.Worldstates.emplace_back(4940, 0); // WORLDSTATE_SHOW_ATTEMPTS
|
||||
packet.Worldstates.emplace_back(4941, 50); // WORLDSTATE_ATTEMPTS_REMAINING
|
||||
packet.Worldstates.emplace_back(4942, 50); // WORLDSTATE_ATTEMPTS_MAX
|
||||
}
|
||||
break;
|
||||
case 4100: // The Culling of Stratholme
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(3479, 0); // WORLDSTATE_SHOW_CRATES
|
||||
packet.Worldstates.emplace_back(3480, 0); // WORLDSTATE_CRATES_REVEALED
|
||||
packet.Worldstates.emplace_back(3504, 0); // WORLDSTATE_WAVE_COUNT
|
||||
packet.Worldstates.emplace_back(3931, 25); // WORLDSTATE_TIME_GUARDIAN
|
||||
packet.Worldstates.emplace_back(3932, 0); // WORLDSTATE_TIME_GUARDIAN_SHOW
|
||||
}
|
||||
break;
|
||||
case 4228: // The Oculus
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(3524, 0); // WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW
|
||||
packet.Worldstates.emplace_back(3486, 0); // WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT
|
||||
}
|
||||
break;
|
||||
case 4273: // Ulduar
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(4132, 0); // WORLDSTATE_ALGALON_TIMER_ENABLED
|
||||
packet.Worldstates.emplace_back(4131, 0); // WORLDSTATE_ALGALON_DESPAWN_TIMER
|
||||
}
|
||||
break;
|
||||
case 4415: // Violet Hold
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(3816, 0); // WORLD_STATE_VH_SHOW
|
||||
packet.Worldstates.emplace_back(3815, 100); // WORLD_STATE_VH_PRISON_STATE
|
||||
packet.Worldstates.emplace_back(3810, 0); // WORLD_STATE_VH_WAVE_COUNT
|
||||
}
|
||||
break;
|
||||
case 4820: // Halls of Refection
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(4884, 0); // WORLD_STATE_HOR_WAVES_ENABLED
|
||||
packet.Worldstates.emplace_back(4882, 0); // WORLD_STATE_HOR_WAVE_COUNT
|
||||
}
|
||||
break;
|
||||
case 3805: // Zul Aman
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
packet.Worldstates.emplace_back(3104, 0); // WORLD_STATE_ZULAMAN_TIMER_ENABLED
|
||||
packet.Worldstates.emplace_back(3106, 0); // WORLD_STATE_ZULAMAN_TIMER
|
||||
}
|
||||
break;
|
||||
case 5031: // Twin Peaks
|
||||
if (battleground && battleground->GetTypeID(true) == BATTLEGROUND_TP)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "SpellMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
#include "WorldStateMgr.h"
|
||||
#include <sstream>
|
||||
#include <cstdarg>
|
||||
|
||||
@@ -608,12 +609,9 @@ void InstanceScript::DoRespawnGameObject(ObjectGuid guid, Seconds timeToDespawn
|
||||
TC_LOG_DEBUG("scripts", "InstanceScript: DoRespawnGameObject failed");
|
||||
}
|
||||
|
||||
void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
|
||||
void InstanceScript::DoUpdateWorldState(int32 worldStateId, int32 value)
|
||||
{
|
||||
instance->DoOnPlayers([uiStateId, uiStateData](Player const* player)
|
||||
{
|
||||
player->SendUpdateWorldState(uiStateId, uiStateData);
|
||||
});
|
||||
sWorldStateMgr->SetValue(worldStateId, value, instance);
|
||||
}
|
||||
|
||||
// Send Notify to all players in instance
|
||||
|
||||
@@ -42,13 +42,6 @@ struct InstanceSpawnGroupInfo;
|
||||
enum class CriteriaType : uint8;
|
||||
enum class CriteriaStartEvent : uint8;
|
||||
enum EncounterCreditType : uint8;
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace WorldState
|
||||
{
|
||||
class InitWorldStates;
|
||||
}
|
||||
}
|
||||
|
||||
enum EncounterFrameType
|
||||
{
|
||||
@@ -216,7 +209,7 @@ class TC_GAME_API InstanceScript : public ZoneScript
|
||||
void DoRespawnGameObject(ObjectGuid guid, Seconds timeToDespawn = 1min);
|
||||
|
||||
// Sends world state update to all players in instance
|
||||
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue);
|
||||
void DoUpdateWorldState(int32 worldStateId, int32 value);
|
||||
|
||||
// Send Notify to all players in instance
|
||||
void DoSendNotifyToInstance(char const* format, ...);
|
||||
@@ -257,8 +250,6 @@ 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
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include "zulaman.h"
|
||||
#include <sstream>
|
||||
|
||||
@@ -37,17 +36,11 @@ class instance_zulaman : public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
|
||||
SpeedRunTimer = 16;
|
||||
SpeedRunTimer = 15;
|
||||
ZulAmanState = NOT_STARTED;
|
||||
ZulAmanBossCount = 0;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
@@ -273,16 +272,9 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
LoadDoorData(doorData);
|
||||
|
||||
_currentWorldStates[WORLDSTATE_SHOW_CRATES] = _currentWorldStates[WORLDSTATE_CRATES_REVEALED] = _currentWorldStates[WORLDSTATE_WAVE_COUNT] = _currentWorldStates[WORLDSTATE_TIME_GUARDIAN_SHOW] = _currentWorldStates[WORLDSTATE_TIME_GUARDIAN] = 0;
|
||||
_sentWorldStates = _currentWorldStates;
|
||||
_plagueCrates.reserve(NUM_PLAGUE_CRATES);
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
for (WorldStateMap::const_iterator itr = _sentWorldStates.begin(); itr != _sentWorldStates.end(); ++itr)
|
||||
packet.Worldstates.emplace_back(itr->first, itr->second);
|
||||
}
|
||||
|
||||
void WriteSaveDataMore(std::ostringstream& data) override
|
||||
{
|
||||
data << _currentState << ' ' << _infiniteGuardianTimeout;
|
||||
@@ -330,7 +322,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
break;
|
||||
case DATA_CRATE_REVEALED:
|
||||
if (uint32 missingCrates = MissingPlagueCrates())
|
||||
SetWorldState(WORLDSTATE_CRATES_REVEALED, NUM_PLAGUE_CRATES - missingCrates);
|
||||
DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, NUM_PLAGUE_CRATES - missingCrates);
|
||||
else
|
||||
SetInstanceProgress(CRATES_DONE, false);
|
||||
break;
|
||||
@@ -390,8 +382,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
|
||||
// clear existing world markers
|
||||
for (uint32 marker = WAVE_MARKER_MIN; marker <= WAVE_MARKER_MAX; ++marker)
|
||||
SetWorldState(COSWorldStates(marker), 0, false);
|
||||
PropagateWorldStateUpdate();
|
||||
DoUpdateWorldState(COSWorldStates(marker), 0);
|
||||
|
||||
// schedule next wave if applicable
|
||||
if (_waveCount < NUM_SCOURGE_WAVES)
|
||||
@@ -459,8 +450,8 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
if (type == DATA_INFINITE_CORRUPTOR && state == DONE)
|
||||
{
|
||||
events.CancelEvent(EVENT_GUARDIAN_TICK);
|
||||
SetWorldState(WORLDSTATE_TIME_GUARDIAN_SHOW, 0, false);
|
||||
SetWorldState(WORLDSTATE_TIME_GUARDIAN, 0);
|
||||
DoUpdateWorldState(WORLDSTATE_TIME_GUARDIAN_SHOW, 0);
|
||||
DoUpdateWorldState(WORLDSTATE_TIME_GUARDIAN, 0);
|
||||
}
|
||||
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
@@ -485,8 +476,8 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
if (secondsToGuardianDeath <= 0)
|
||||
{
|
||||
_infiniteGuardianTimeout = 0;
|
||||
SetWorldState(WORLDSTATE_TIME_GUARDIAN_SHOW, 0, false);
|
||||
SetWorldState(WORLDSTATE_TIME_GUARDIAN, 0);
|
||||
DoUpdateWorldState(WORLDSTATE_TIME_GUARDIAN_SHOW, 0);
|
||||
DoUpdateWorldState(WORLDSTATE_TIME_GUARDIAN, 0);
|
||||
|
||||
if (Creature* corruptor = instance->GetCreature(_corruptorGUID))
|
||||
{
|
||||
@@ -513,8 +504,8 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
chromie->AI()->Talk(CHROMIE_WHISPER_GUARDIAN_3);
|
||||
|
||||
// update the timer state
|
||||
SetWorldState(WORLDSTATE_TIME_GUARDIAN_SHOW, 1, false);
|
||||
SetWorldState(WORLDSTATE_TIME_GUARDIAN, minutes + 1);
|
||||
DoUpdateWorldState(WORLDSTATE_TIME_GUARDIAN_SHOW, 1);
|
||||
DoUpdateWorldState(WORLDSTATE_TIME_GUARDIAN, minutes + 1);
|
||||
if (minutes == 4 && seconds > 30)
|
||||
events.Repeat(Seconds(seconds - 30));
|
||||
else
|
||||
@@ -538,7 +529,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
break;
|
||||
|
||||
++_waveCount;
|
||||
SetWorldState(WORLDSTATE_WAVE_COUNT, _waveCount);
|
||||
DoUpdateWorldState(WORLDSTATE_WAVE_COUNT, _waveCount);
|
||||
|
||||
uint8 spawnLoc = urand(WAVE_LOC_MIN, WAVE_LOC_MAX);
|
||||
while (spawnLoc == _currentSpawnLoc) // don't allow repeats
|
||||
@@ -573,8 +564,8 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
}
|
||||
|
||||
for (uint32 marker = WAVE_MARKER_MIN; marker <= WAVE_MARKER_MAX; ++marker)
|
||||
SetWorldState(COSWorldStates(marker), 0, false);
|
||||
SetWorldState(spawnLocation.WorldState, 1);
|
||||
DoUpdateWorldState(COSWorldStates(marker), 0);
|
||||
DoUpdateWorldState(spawnLocation.WorldState, 1);
|
||||
|
||||
events.RescheduleEvent(EVENT_CRIER_ANNOUNCE_WAVE, 2s);
|
||||
_currentSpawnLoc = spawnLoc;
|
||||
@@ -689,26 +680,24 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
// Plague crates
|
||||
if (state == CRATES_IN_PROGRESS)
|
||||
{
|
||||
SetWorldState(WORLDSTATE_SHOW_CRATES, 1, false);
|
||||
SetWorldState(WORLDSTATE_CRATES_REVEALED, 0, false);
|
||||
DoUpdateWorldState(WORLDSTATE_SHOW_CRATES, 1);
|
||||
DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, 0);
|
||||
}
|
||||
else if (state == CRATES_DONE)
|
||||
{
|
||||
SetWorldState(WORLDSTATE_SHOW_CRATES, 1, false);
|
||||
SetWorldState(WORLDSTATE_CRATES_REVEALED, NUM_PLAGUE_CRATES, false);
|
||||
DoUpdateWorldState(WORLDSTATE_SHOW_CRATES, 1);
|
||||
DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, NUM_PLAGUE_CRATES);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWorldState(WORLDSTATE_SHOW_CRATES, 0, false);
|
||||
SetWorldState(WORLDSTATE_CRATES_REVEALED, state == JUST_STARTED ? 0 : NUM_PLAGUE_CRATES, false);
|
||||
DoUpdateWorldState(WORLDSTATE_SHOW_CRATES, 0);
|
||||
DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, state == JUST_STARTED ? 0 : NUM_PLAGUE_CRATES);
|
||||
}
|
||||
// Scourge wave counter
|
||||
if (state == WAVES_DONE)
|
||||
SetWorldState(WORLDSTATE_WAVE_COUNT, NUM_SCOURGE_WAVES, false);
|
||||
DoUpdateWorldState(WORLDSTATE_WAVE_COUNT, NUM_SCOURGE_WAVES);
|
||||
else
|
||||
SetWorldState(WORLDSTATE_WAVE_COUNT, 0, false);
|
||||
|
||||
PropagateWorldStateUpdate();
|
||||
DoUpdateWorldState(WORLDSTATE_WAVE_COUNT, 0);
|
||||
|
||||
// Hidden Passage status handling
|
||||
if (GameObject* passage = instance->GetGameObject(_passageGUID))
|
||||
@@ -768,7 +757,6 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
}
|
||||
|
||||
private:
|
||||
typedef std::unordered_map<uint32, uint32> WorldStateMap;
|
||||
|
||||
uint32 MissingPlagueCrates() const
|
||||
{
|
||||
@@ -792,29 +780,6 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void SetWorldState(COSWorldStates state, uint32 value, bool immediate = true)
|
||||
{
|
||||
TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::SetWorldState: %u %u", uint32(state), value);
|
||||
_currentWorldStates[state] = value;
|
||||
if (immediate)
|
||||
PropagateWorldStateUpdate();
|
||||
}
|
||||
|
||||
void PropagateWorldStateUpdate()
|
||||
{
|
||||
TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::PropagateWorldStateUpdate: Propagate world states");
|
||||
for (WorldStateMap::const_iterator it = _currentWorldStates.begin(); it != _currentWorldStates.end(); ++it)
|
||||
{
|
||||
uint32& sent = _sentWorldStates[it->first];
|
||||
if (sent != it->second)
|
||||
{
|
||||
TC_LOG_DEBUG("scripts.cos", "instance_culling_of_stratholme::PropagateWorldStateUpdate: Sending world state %u (%u)", it->first, it->second);
|
||||
DoUpdateWorldState(it->first, it->second);
|
||||
sent = it->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetSpawnGroupState(COSInstanceEntries group, bool state, bool force)
|
||||
{
|
||||
if (state)
|
||||
@@ -827,8 +792,7 @@ class instance_culling_of_stratholme : public InstanceMapScript
|
||||
|
||||
EventMap events;
|
||||
COSProgressStates _currentState;
|
||||
WorldStateMap _sentWorldStates;
|
||||
WorldStateMap _currentWorldStates;
|
||||
std::unordered_map<uint32, uint32> _currentWorldStates;
|
||||
time_t _infiniteGuardianTimeout;
|
||||
|
||||
// Generic
|
||||
|
||||
@@ -108,13 +108,6 @@ public:
|
||||
_currentRiftId = 0;
|
||||
}
|
||||
|
||||
void InitWorldState(bool Enable = true)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_BM, Enable ? 1 : 0);
|
||||
DoUpdateWorldState(WORLD_STATE_BM_SHIELD, 100);
|
||||
DoUpdateWorldState(WORLD_STATE_BM_RIFT, 0);
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
if (GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
@@ -123,14 +116,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
{
|
||||
if (GetData(TYPE_MEDIVH) == IN_PROGRESS)
|
||||
return;
|
||||
|
||||
player->SendUpdateWorldState(WORLD_STATE_BM, 0);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
if (creature->GetEntry() == NPC_MEDIVH)
|
||||
@@ -192,7 +177,7 @@ public:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
TC_LOG_DEBUG("scripts", "Instance The Black Morass: Starting event.");
|
||||
InitWorldState();
|
||||
DoUpdateWorldState(WORLD_STATE_BM, 1);
|
||||
m_auiEncounter[1] = IN_PROGRESS;
|
||||
ScheduleEventNextPortal(15s);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "Map.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
Position const HalionControllerSpawnPos = { 3156.037f, 533.2656f, 72.97205f, 0.0f };
|
||||
|
||||
@@ -197,13 +196,6 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
return BaltharusSharedHealth;
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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:
|
||||
ObjectGuid ZarithrianSpawnStalkerGUID[2];
|
||||
uint32 BaltharusSharedHealth;
|
||||
|
||||
@@ -117,22 +117,15 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
ResilienceWillFixItTimer = 0;
|
||||
SnoboldCount = 0;
|
||||
MistressOfPainCount = 0;
|
||||
TributeToImmortalityEligible = true;
|
||||
PlayerDeathCount = 0;
|
||||
NeedSave = false;
|
||||
CrusadersSpecialState = false;
|
||||
TributeToDedicatedInsanity = false; // NYI, set to true when implement it
|
||||
DoUpdateWorldState(UPDATE_STATE_UI_SHOW, instance->IsHeroic() ? 1 : 0);
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
{
|
||||
if (instance->IsHeroic())
|
||||
{
|
||||
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 1);
|
||||
player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER));
|
||||
}
|
||||
else
|
||||
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 0);
|
||||
|
||||
if (Team == TEAM_OTHER)
|
||||
Team = player->GetTeam();
|
||||
|
||||
@@ -167,8 +160,10 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
void OnUnitDeath(Unit* unit) override
|
||||
{
|
||||
if (unit->GetTypeId() == TYPEID_PLAYER && IsEncounterInProgress())
|
||||
TributeToImmortalityEligible = false;
|
||||
|
||||
{
|
||||
++PlayerDeathCount;
|
||||
DoUpdateWorldState(WORLD_STATE_PLAYER_DEATHS, PlayerDeathCount);
|
||||
}
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
@@ -305,10 +300,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
{
|
||||
--TrialCounter;
|
||||
// decrease attempt counter at wipe
|
||||
Map::PlayerList const& PlayerList = instance->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, TrialCounter);
|
||||
DoUpdateWorldState(UPDATE_STATE_UI_COUNT, TrialCounter);
|
||||
|
||||
// if theres no more attemps allowed
|
||||
if (!TrialCounter)
|
||||
@@ -581,7 +573,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
saveStream << GetBossState(i) << ' ';
|
||||
|
||||
saveStream << TrialCounter << ' '
|
||||
<< uint32(TributeToImmortalityEligible ? 1 : 0) << ' '
|
||||
<< PlayerDeathCount << ' '
|
||||
<< uint32(TributeToDedicatedInsanity ? 1 : 0);
|
||||
SaveDataBuffer = saveStream.str();
|
||||
|
||||
@@ -617,8 +609,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
}
|
||||
|
||||
loadStream >> TrialCounter;
|
||||
loadStream >> tmpState;
|
||||
TributeToImmortalityEligible = tmpState != 0;
|
||||
loadStream >> PlayerDeathCount;
|
||||
loadStream >> tmpState;
|
||||
TributeToDedicatedInsanity = tmpState != 0;
|
||||
EventStage = 0;
|
||||
@@ -641,19 +632,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
case THREE_SIXTY_PAIN_SPIKE_25_PLAYER:
|
||||
case THREE_SIXTY_PAIN_SPIKE_25_PLAYER_HEROIC:
|
||||
return MistressOfPainCount >= 2;
|
||||
case A_TRIBUTE_TO_SKILL_10_PLAYER:
|
||||
case A_TRIBUTE_TO_SKILL_25_PLAYER:
|
||||
return TrialCounter >= 25;
|
||||
case A_TRIBUTE_TO_MAD_SKILL_10_PLAYER:
|
||||
case A_TRIBUTE_TO_MAD_SKILL_25_PLAYER:
|
||||
return TrialCounter >= 45;
|
||||
case A_TRIBUTE_TO_INSANITY_10_PLAYER:
|
||||
case A_TRIBUTE_TO_INSANITY_25_PLAYER:
|
||||
case REALM_FIRST_GRAND_CRUSADER:
|
||||
return TrialCounter == 50;
|
||||
case A_TRIBUTE_TO_IMMORTALITY_HORDE:
|
||||
case A_TRIBUTE_TO_IMMORTALITY_ALLIANCE:
|
||||
return TrialCounter == 50 && TributeToImmortalityEligible;
|
||||
case A_TRIBUTE_TO_DEDICATED_INSANITY:
|
||||
return false/*TrialCounter == 50 && TributeToDedicatedInsanity*/;
|
||||
default:
|
||||
@@ -680,7 +658,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
uint8 SnoboldCount;
|
||||
uint8 MistressOfPainCount;
|
||||
uint8 NorthrendBeastsCount;
|
||||
bool TributeToImmortalityEligible;
|
||||
int32 PlayerDeathCount;
|
||||
bool TributeToDedicatedInsanity;
|
||||
};
|
||||
|
||||
|
||||
@@ -128,8 +128,9 @@ extern Position const AnubarakLoc[];
|
||||
|
||||
enum TCRWorldStateIds
|
||||
{
|
||||
UPDATE_STATE_UI_SHOW = 4390,
|
||||
UPDATE_STATE_UI_COUNT = 4389
|
||||
UPDATE_STATE_UI_SHOW = 4390,
|
||||
UPDATE_STATE_UI_COUNT = 4389,
|
||||
WORLD_STATE_PLAYER_DEATHS = 4408
|
||||
};
|
||||
|
||||
enum NorthrendBeasts
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Transport.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <sstream>
|
||||
|
||||
Position const JainaSpawnPos = { 5236.659f, 1929.894f, 707.7781f, 0.8726646f }; // Jaina Spawn Position
|
||||
@@ -294,12 +293,6 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "TemporarySummon.h"
|
||||
#include "Transport.h"
|
||||
#include "TransportMgr.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <sstream>
|
||||
#include <unordered_set>
|
||||
|
||||
@@ -177,15 +176,6 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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
|
||||
{
|
||||
uint8 spawnGroupId = TeamInInstance == ALLIANCE ? SPAWN_GROUP_ALLIANCE_ROS : SPAWN_GROUP_HORDE_ROS;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
@@ -152,20 +151,6 @@ class instance_oculus : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
if (GetBossState(DATA_DRAKOS) == DONE && GetBossState(DATA_VAROS) != DONE)
|
||||
{
|
||||
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(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*unit*/, uint32 eventId, WorldObject* /*invoker*/) override
|
||||
{
|
||||
if (eventId != EVENT_CALL_DRAGON)
|
||||
|
||||
@@ -143,7 +143,6 @@ enum Vehicles
|
||||
enum Misc
|
||||
{
|
||||
DATA_SHUTOUT = 29112912, // 2911, 2912 are achievement IDs
|
||||
DATA_ORBIT_ACHIEVEMENTS = 1,
|
||||
VEHICLE_SPAWNS = 5,
|
||||
FREYA_SPAWNS = 4
|
||||
|
||||
@@ -351,10 +350,6 @@ class boss_flame_leviathan : public CreatureScript
|
||||
return Shutout ? 1 : 0;
|
||||
case DATA_UNBROKEN:
|
||||
return Unbroken ? 1 : 0;
|
||||
case DATA_ORBIT_ACHIEVEMENTS:
|
||||
if (ActiveTowers) // Only on HardMode
|
||||
return ActiveTowersCount;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -522,6 +517,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
{
|
||||
towerOfStorms = false;
|
||||
--ActiveTowersCount;
|
||||
instance->DoUpdateWorldState(WORLD_STATE_FLAME_LEVIATHAN_DESTROYED_TOWERS, 4 - ActiveTowersCount);
|
||||
}
|
||||
break;
|
||||
case ACTION_TOWER_OF_FROST_DESTROYED:
|
||||
@@ -529,6 +525,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
{
|
||||
towerOfFrost = false;
|
||||
--ActiveTowersCount;
|
||||
instance->DoUpdateWorldState(WORLD_STATE_FLAME_LEVIATHAN_DESTROYED_TOWERS, 4 - ActiveTowersCount);
|
||||
}
|
||||
break;
|
||||
case ACTION_TOWER_OF_FLAMES_DESTROYED:
|
||||
@@ -536,6 +533,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
{
|
||||
towerOfFlames = false;
|
||||
--ActiveTowersCount;
|
||||
instance->DoUpdateWorldState(WORLD_STATE_FLAME_LEVIATHAN_DESTROYED_TOWERS, 4 - ActiveTowersCount);
|
||||
}
|
||||
break;
|
||||
case ACTION_TOWER_OF_LIFE_DESTROYED:
|
||||
@@ -543,9 +541,11 @@ class boss_flame_leviathan : public CreatureScript
|
||||
{
|
||||
towerOfLife = false;
|
||||
--ActiveTowersCount;
|
||||
instance->DoUpdateWorldState(WORLD_STATE_FLAME_LEVIATHAN_DESTROYED_TOWERS, 4 - ActiveTowersCount);
|
||||
}
|
||||
break;
|
||||
case ACTION_START_HARD_MODE: // Activate hard-mode enable all towers, apply buffs on leviathan
|
||||
instance->DoUpdateWorldState(WORLD_STATE_FLAME_LEVIATHAN_DESTROYED_TOWERS, 0);
|
||||
ActiveTowers = true;
|
||||
towerOfStorms = true;
|
||||
towerOfLife = true;
|
||||
@@ -1422,78 +1422,6 @@ class achievement_unbroken : public AchievementCriteriaScript
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_orbital_bombardment : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_orbital_bombardment() : AchievementCriteriaScript("achievement_orbital_bombardment") { }
|
||||
|
||||
bool OnCheck(Player* /*source*/, Unit* target) override
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
if (Creature* Leviathan = target->ToCreature())
|
||||
if (Leviathan->AI()->GetData(DATA_ORBIT_ACHIEVEMENTS) >= 1)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_orbital_devastation : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_orbital_devastation() : AchievementCriteriaScript("achievement_orbital_devastation") { }
|
||||
|
||||
bool OnCheck(Player* /*source*/, Unit* target) override
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
if (Creature* Leviathan = target->ToCreature())
|
||||
if (Leviathan->AI()->GetData(DATA_ORBIT_ACHIEVEMENTS) >= 2)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_nuked_from_orbit : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_nuked_from_orbit() : AchievementCriteriaScript("achievement_nuked_from_orbit") { }
|
||||
|
||||
bool OnCheck(Player* /*source*/, Unit* target) override
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
if (Creature* Leviathan = target->ToCreature())
|
||||
if (Leviathan->AI()->GetData(DATA_ORBIT_ACHIEVEMENTS) >= 3)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_orbit_uary : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_orbit_uary() : AchievementCriteriaScript("achievement_orbit_uary") { }
|
||||
|
||||
bool OnCheck(Player* /*source*/, Unit* target) override
|
||||
{
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
if (Creature* Leviathan = target->ToCreature())
|
||||
if (Leviathan->AI()->GetData(DATA_ORBIT_ACHIEVEMENTS) == 4)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// 62399 - Overload Circuit
|
||||
class spell_overload_circuit : public AuraScript
|
||||
{
|
||||
@@ -1878,10 +1806,6 @@ void AddSC_boss_flame_leviathan()
|
||||
new achievement_three_car_garage_siege();
|
||||
new achievement_shutout();
|
||||
new achievement_unbroken();
|
||||
new achievement_orbital_bombardment();
|
||||
new achievement_orbital_devastation();
|
||||
new achievement_nuked_from_orbit();
|
||||
new achievement_orbit_uary();
|
||||
|
||||
RegisterSpellScript(spell_overload_circuit);
|
||||
RegisterSpellScript(spell_tar_blaze);
|
||||
|
||||
@@ -532,7 +532,7 @@ struct boss_razorscale : public BossAI
|
||||
|
||||
void HandleMusic(bool active)
|
||||
{
|
||||
uint32 enabled = active ? 1 : 0;
|
||||
int32 enabled = active ? 1 : 0;
|
||||
instance->DoUpdateWorldState(WORLD_STATE_RAZORSCALE_MUSIC, enabled);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Vehicle.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <sstream>
|
||||
|
||||
static BossBoundaryData const boundaries =
|
||||
@@ -226,13 +225,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
bool Unbroken;
|
||||
bool IsDriveMeCrazyEligible;
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_YOGG_SARON_KEEPERS, int32(keepersCount));
|
||||
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
|
||||
{
|
||||
if (!TeamInInstance)
|
||||
@@ -359,24 +351,28 @@ class instance_ulduar : public InstanceMapScript
|
||||
_summonYSKeeper[0] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
DoUpdateWorldState(WORLD_STATE_YOGG_SARON_KEEPERS, keepersCount);
|
||||
break;
|
||||
case NPC_HODIR_YS:
|
||||
KeeperGUIDs[1] = creature->GetGUID();
|
||||
_summonYSKeeper[1] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
DoUpdateWorldState(WORLD_STATE_YOGG_SARON_KEEPERS, keepersCount);
|
||||
break;
|
||||
case NPC_THORIM_YS:
|
||||
KeeperGUIDs[2] = creature->GetGUID();
|
||||
_summonYSKeeper[2] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
DoUpdateWorldState(WORLD_STATE_YOGG_SARON_KEEPERS, keepersCount);
|
||||
break;
|
||||
case NPC_MIMIRON_YS:
|
||||
KeeperGUIDs[3] = creature->GetGUID();
|
||||
_summonYSKeeper[3] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
DoUpdateWorldState(WORLD_STATE_YOGG_SARON_KEEPERS, keepersCount);
|
||||
break;
|
||||
case NPC_SANITY_WELL:
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
@@ -885,19 +881,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
case CRITERIA_DRIVE_ME_CRAZY_10:
|
||||
case CRITERIA_DRIVE_ME_CRAZY_25:
|
||||
return IsDriveMeCrazyEligible;
|
||||
case CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_25:
|
||||
return keepersCount <= 3;
|
||||
case CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_25:
|
||||
return keepersCount <= 2;
|
||||
case CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_25:
|
||||
return keepersCount <= 1;
|
||||
case CRITERIA_ALONE_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_ALONE_IN_THE_DARKNESS_25:
|
||||
case REALM_FIRST_DEATHS_DEMISE:
|
||||
return keepersCount == 0;
|
||||
case CRITERIA_C_O_U_LEVIATHAN_10:
|
||||
case CRITERIA_C_O_U_LEVIATHAN_25:
|
||||
return (_CoUAchivePlayerDeathMask & (1 << DATA_FLAME_LEVIATHAN)) == 0;
|
||||
|
||||
@@ -357,18 +357,8 @@ enum UlduarAchievementCriteriaIds
|
||||
CRITERIA_WAITS_DREAMING_ICECROWN_10 = 10326,
|
||||
CRITERIA_DRIVE_ME_CRAZY_10 = 10185,
|
||||
CRITERIA_DRIVE_ME_CRAZY_25 = 10296,
|
||||
CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_10 = 10410,
|
||||
CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_25 = 10414,
|
||||
CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_10 = 10388,
|
||||
CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_25 = 10415,
|
||||
CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_10 = 10409,
|
||||
CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_25 = 10416,
|
||||
CRITERIA_ALONE_IN_THE_DARKNESS_10 = 10412,
|
||||
CRITERIA_ALONE_IN_THE_DARKNESS_25 = 10417,
|
||||
CRITERIA_HERALD_OF_TITANS = 10678,
|
||||
|
||||
REALM_FIRST_DEATHS_DEMISE = 10279,
|
||||
|
||||
// Champion of Ulduar
|
||||
CRITERIA_C_O_U_LEVIATHAN_10 = 10042,
|
||||
CRITERIA_C_O_U_IGNIS_10 = 10342,
|
||||
@@ -477,9 +467,10 @@ enum UlduarData
|
||||
|
||||
enum UlduarWorldStates
|
||||
{
|
||||
WORLD_STATE_YOGG_SARON_KEEPERS = 4116,
|
||||
WORLD_STATE_ALGALON_DESPAWN_TIMER = 4131,
|
||||
WORLD_STATE_ALGALON_TIMER_ENABLED = 4132,
|
||||
WORLD_STATE_FLAME_LEVIATHAN_DESTROYED_TOWERS = 4129,
|
||||
WORLD_STATE_YOGG_SARON_KEEPERS = 4116,
|
||||
WORLD_STATE_ALGALON_DESPAWN_TIMER = 4131,
|
||||
WORLD_STATE_ALGALON_TIMER_ENABLED = 5636,
|
||||
};
|
||||
|
||||
enum UlduarAchievementData
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "TaskScheduler.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "WorldStatePackets.h"
|
||||
#include <sstream>
|
||||
|
||||
/*
|
||||
@@ -293,13 +292,6 @@ class instance_violet_hold : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet) override
|
||||
{
|
||||
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
|
||||
{
|
||||
if (_SkipCheckRequiredBosses(player))
|
||||
|
||||
Reference in New Issue
Block a user