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
2017-12-01 21:50:37 +01:00
parent e4398fa1da
commit 072c884ed8

View File

@@ -808,6 +808,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());