Core/Maps: Citizens of Dalaran! Raise your eyes to the skies and observe! Any non-map-default light can now be overriden!

Closes #24250

(cherry picked from commit e10313b380)
This commit is contained in:
Shauren
2020-03-06 17:44:10 +01:00
parent bab4e668b8
commit e8d1f37ee0
7 changed files with 52 additions and 28 deletions

View File

@@ -1715,6 +1715,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
if (!sLightStore.LookupEntry(e.action.overrideLight.areaLightId))
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses non-existent areaLightId %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.overrideLight.areaLightId);
return false;
}
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);