From af779cea5f4d273e1d84a176735ab84652e826fb Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 16 Oct 2021 20:18:07 -0300 Subject: [PATCH] =?UTF-8?q?fix(Core/Globals):=20Check=20if=20creatures=20g?= =?UTF-8?q?ot=20any=20valid=20`InhabitType`=20dur=E2=80=A6=20(#8464)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/Globals/ObjectMgr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index f65d34ab4..d58bfe91a 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(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(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);