Core/SAI: Allow resetting light overrides with SMART_ACTION_OVERRIDE_LIGHT

(cherry picked from commit c5226aec41)
This commit is contained in:
Shauren
2020-03-05 21:14:32 +01:00
parent 1529fe1064
commit 29aef603ef

View File

@@ -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;