mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-10 19:20:32 +00:00
refactor(Core/WorldState): Initial addition of world state definition file. (#21875)
Many world states had their enums from script's header and hardcoded values to their respective header file (WorldStateDefines.h) Co-authored-by: Jelle Meeus <sogladev@gmail.com>
This commit is contained in:
@@ -100,12 +100,6 @@ enum GameObjects
|
||||
GO_PORTAL_TO_DALARAN = 195682,
|
||||
};
|
||||
|
||||
enum HorWorldStates
|
||||
{
|
||||
WORLD_STATE_HOR_COUNTER = 4884,
|
||||
WORLD_STATE_HOR_WAVE_COUNT = 4882,
|
||||
};
|
||||
|
||||
enum BatteredHiltStatusFlags
|
||||
{
|
||||
BHSF_NONE = 0,
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "InstanceScript.h"
|
||||
#include "MapMgr.h"
|
||||
#include "Transport.h"
|
||||
#include "WorldStateDefines.h"
|
||||
#include "halls_of_reflection.h"
|
||||
|
||||
class UtherBatteredHiltEvent : public BasicEvent
|
||||
@@ -435,7 +436,7 @@ public:
|
||||
c->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
|
||||
}
|
||||
WaveNumber = 0;
|
||||
DoUpdateWorldState(WORLD_STATE_HOR_COUNTER, 0);
|
||||
DoUpdateWorldState(WORLD_STATE_HALLS_OF_REFLECTION_WAVES_ENABLED, 0);
|
||||
|
||||
// give quest
|
||||
Map::PlayerList const& pl = instance->GetPlayers();
|
||||
@@ -803,8 +804,8 @@ public:
|
||||
if (WaveNumber >= 6)
|
||||
bFinished5Waves = true;
|
||||
|
||||
DoUpdateWorldState(WORLD_STATE_HOR_COUNTER, 1);
|
||||
DoUpdateWorldState(WORLD_STATE_HOR_WAVE_COUNT, WaveNumber);
|
||||
DoUpdateWorldState(WORLD_STATE_HALLS_OF_REFLECTION_WAVES_ENABLED, 1);
|
||||
DoUpdateWorldState(WORLD_STATE_HALLS_OF_REFLECTION_WAVE_COUNT, WaveNumber);
|
||||
HandleGameObject(GO_FrontDoorGUID, false);
|
||||
|
||||
// some of them could go back to spawn due to vanish, etc.
|
||||
@@ -869,8 +870,8 @@ public:
|
||||
if (!WaveNumber)
|
||||
return;
|
||||
|
||||
DoUpdateWorldState(WORLD_STATE_HOR_COUNTER, 0);
|
||||
DoUpdateWorldState(WORLD_STATE_HOR_WAVE_COUNT, 0);
|
||||
DoUpdateWorldState(WORLD_STATE_HALLS_OF_REFLECTION_WAVES_ENABLED, 0);
|
||||
DoUpdateWorldState(WORLD_STATE_HALLS_OF_REFLECTION_WAVE_COUNT, 0);
|
||||
HandleGameObject(GO_FrontDoorGUID, true);
|
||||
|
||||
TrashCounter = NUM_OF_TRASH;
|
||||
|
||||
Reference in New Issue
Block a user