mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +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:
@@ -777,6 +777,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
|
||||
case SMART_ACTION_MOVEMENT_STOP: return NO_PARAMS;
|
||||
case SMART_ACTION_MOVEMENT_PAUSE: return sizeof(SmartAction::move);
|
||||
case SMART_ACTION_MOVEMENT_RESUME: return sizeof(SmartAction::move);
|
||||
case SMART_ACTION_WORLD_SCRIPT: return sizeof(SmartAction::worldStateScript);
|
||||
default:
|
||||
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.",
|
||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
@@ -1960,6 +1961,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_MOVEMENT_STOP:
|
||||
case SMART_ACTION_MOVEMENT_PAUSE:
|
||||
case SMART_ACTION_MOVEMENT_RESUME:
|
||||
case SMART_ACTION_WORLD_SCRIPT:
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("sql.sql", "SmartAIMgr: Not handled action_type({}), event_type({}), Entry {} SourceType {} Event {}, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
|
||||
|
||||
Reference in New Issue
Block a user