Core/SAI: Allow resetting light overrides with SMART_ACTION_OVERRIDE_LIGHT

Port From (https://github.com/TrinityCore/TrinityCore/commit/29aef603efefdbecf32d7376b1c24781cb635f04)
This commit is contained in:
hondacrx
2022-01-07 11:26:19 -05:00
parent 66e49cd043
commit 0490d3eed1
@@ -1465,7 +1465,7 @@ namespace Game.AI
return false;
}
if (!CliDB.LightStorage.ContainsKey(e.Action.overrideLight.overrideLightId))
if (e.Action.overrideLight.overrideLightId != 0 && !CliDB.LightStorage.ContainsKey(e.Action.overrideLight.overrideLightId))
{
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} uses non-existent overrideLightId {e.Action.overrideLight.overrideLightId}, skipped.");
return false;