aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2017-12-01 21:50:37 +0100
committerfunjoker <funjoker109@gmail.com>2021-02-25 18:50:55 +0100
commit7cb6c17df4a3c281dc4b101881f12720fff7cbdc (patch)
tree4e9370cd73dcf9444bbd2391af5a7dcca61634c9 /src
parent1565c4d52db5cb168ae6b4e903728fe76dbb4b2e (diff)
Core/CreatureAI: Disable TotemAI from database
Disable TotemAI set in creature_template, triggering an assert when spawning the creature (cherry picked from commit 072c884ed86a9bf895cd5f53b0f6480ae14c3059)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 0bc8ac121a1..c40f145691e 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -937,6 +937,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());