diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-03-05 21:14:32 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-22 21:46:04 +0100 |
commit | 29aef603efefdbecf32d7376b1c24781cb635f04 (patch) | |
tree | fb43d88b0c98f9cd0c82d2b20801ba404fdc4c11 | |
parent | 1529fe10644858023ae953b0d6e2090b78dab5da (diff) |
Core/SAI: Allow resetting light overrides with SMART_ACTION_OVERRIDE_LIGHT
(cherry picked from commit c5226aec41ce1430b53cc5b4073dff644fe37dac)
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 2432dc14984..d8a0258b05b 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1715,7 +1715,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) return false; } - if (!sLightStore.LookupEntry(e.action.overrideLight.overrideLightId)) + if (e.action.overrideLight.overrideLightId && !sLightStore.LookupEntry(e.action.overrideLight.overrideLightId)) { TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent overrideLightId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.overrideLight.overrideLightId); return false; |