summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSkjalf <47818697+Nyeriah@users.noreply.github.com>2021-10-16 20:18:07 -0300
committerGitHub <noreply@github.com>2021-10-17 01:18:07 +0200
commitaf779cea5f4d273e1d84a176735ab84652e826fb (patch)
tree4b795e42254e3a81acd93ac2a1cc30224b991d4b /src
parent12185d8f03b6e3ce8c019db0cb94d75e51937664 (diff)
fix(Core/Globals): Check if creatures got any valid `InhabitType` dur… (#8464)
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 f65d34ab4d..d58bfe91a6 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1063,6 +1063,12 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
const_cast<CreatureTemplate*>(cInfo)->InhabitType = INHABIT_ANYWHERE;
}
+ if (cInfo->InhabitType == INHABIT_ROOT)
+ {
+ LOG_ERROR("sql.sql", "Creature (Entry: %u) only has INHABIT_ROOT(8) as `InhabitType`, creature will not behave correctly.", cInfo->Entry);
+ const_cast<CreatureTemplate*>(cInfo)->InhabitType = INHABIT_ANYWHERE;
+ }
+
if (cInfo->HoverHeight < 0.0f)
{
LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong value (%f) in `HoverHeight`", cInfo->Entry, cInfo->HoverHeight);