mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
feat(Core/WorldState): improved WorldState scripting (#20141)
* implement world state script
based on
0b87ca9d9e
Co-authored-by: killerwife <killerwife@gmail.com>
* refactor to use onleave and onenter instead of spell_area
allows players to right click remove adal's buff
* add MapMgr.h
* refactor: use condition enum instead of uint32, prefix WORLD_STATE where needed
* remove lock from WorldState::Update
sWorldState->Update() is only called from World::Update
* remove unsafe SmartAI action of setWorldState
---------
Co-authored-by: killerwife <killerwife@gmail.com>
This commit is contained in:
@@ -727,8 +727,9 @@ enum SMART_ACTION
|
||||
SMART_ACTION_MOVEMENT_STOP = 234, //
|
||||
SMART_ACTION_MOVEMENT_PAUSE = 235, // timer
|
||||
SMART_ACTION_MOVEMENT_RESUME = 236, // timerOverride
|
||||
SMART_ACTION_WORLD_SCRIPT = 237, // eventId, param
|
||||
|
||||
SMART_ACTION_AC_END = 237, // placeholder
|
||||
SMART_ACTION_AC_END = 238, // placeholder
|
||||
};
|
||||
|
||||
enum class SmartActionSummonCreatureFlags
|
||||
@@ -1472,6 +1473,12 @@ struct SmartAction
|
||||
{
|
||||
uint32 timer;
|
||||
} move;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 eventId;
|
||||
uint32 param;
|
||||
} worldStateScript;
|
||||
//! Note for any new future actions
|
||||
//! All parameters must have type uint32
|
||||
|
||||
|
||||
Reference in New Issue
Block a user