Core/SAI: Allow resetting light overrides with SMART_ACTION_OVERRIDE_LIGHT

This commit is contained in:
Shauren
2020-03-05 21:14:32 +01:00
parent 0752584856
commit c5226aec41

View File

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