aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-03-05 21:14:32 +0100
committerShauren <shauren.trinity@gmail.com>2020-03-05 21:14:32 +0100
commitc5226aec41ce1430b53cc5b4073dff644fe37dac (patch)
tree83a88a51c4be1755d855a50ef3852d37f01c265a /src
parent0752584856b0d9c2a1a5b179cf90d3bc765fa2c1 (diff)
Core/SAI: Allow resetting light overrides with SMART_ACTION_OVERRIDE_LIGHT
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp2
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 bf581b93a89..7412252b7ad 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -1542,7 +1542,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 %d 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;