Core/CreatureAI: Disable TotemAI from database

Disable TotemAI set in creature_template, triggering an assert when spawning the creature
This commit is contained in:
jackpoz authored and Aokromes committed 2017-12-02 05:10:57 +01:00
1 parent c214b701b9
commit 2507d601b7
1 file changed
+6
+6
View File
@@ -845,6 +845,12 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
ok = true;
}
if (cInfo->AIName == "TotemAI")
{
TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has not-allowed `AIName` '%s' set, removing", cInfo->Entry, cInfo->AIName.c_str());
const_cast<CreatureTemplate*>(cInfo)->AIName.clear();
}
if (!cInfo->AIName.empty() && !sCreatureAIRegistry->HasItem(cInfo->AIName))
{
TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has non-registered `AIName` '%s' set, removing", cInfo->Entry, cInfo->AIName.c_str());