diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp index 852824a54..667a5841f 100644 --- a/src/game/CreatureEventAIMgr.cpp +++ b/src/game/CreatureEventAIMgr.cpp @@ -815,6 +815,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() delete result; + // post check + for (uint32 i = 1; i < sCreatureStorage.MaxEntry; ++i) + { + if (CreatureInfo const* cInfo = sCreatureStorage.LookupEntry(i)) + { + bool ainame = strcmp(cInfo->AIName, "EventAI") == 0; + bool hasevent = m_CreatureEventAI_Event_Map.find(i) != m_CreatureEventAI_Event_Map.end(); + if (ainame && !hasevent) + sLog.outErrorDb("CreatureEventAI: EventAI not has script for creature entry (%u), but AIName = '%s'.", i, cInfo->AIName); + else if (!ainame && hasevent) + sLog.outErrorDb("CreatureEventAI: EventAI has script for creature entry (%u), but AIName = '%s' instead 'EventAI'.", i, cInfo->AIName); + + if (hasevent && cInfo->ScriptID && !sLog.HasLogFilter(LOG_FILTER_DB_STRICTED_CHECK)) + sLog.outErrorDb("CreatureEventAI: EventAI has script for creature entry (%u), but it have associated library script: %s.", i, sScriptMgr.GetScriptName(cInfo->ScriptID)); + } + } + CheckUnusedAITexts(); CheckUnusedAISummons(); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 33d71b7d2..d46c5651e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11662" + #define REVISION_NR "11663" #endif // __REVISION_NR_H__