From e11fea28c57dc488c8a3e07fa5b13e19842e8d94 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sun, 26 Jun 2022 09:44:30 +0200 Subject: [PATCH] =?UTF-8?q?fix(Core/Units):=20Fixed=20problems=20with=20ch?= =?UTF-8?q?arming=20non-demon=20creatures=20by=20=E2=80=A6=20(#12164)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Units): Fixed problems with charming non-demon creatures by warlock. Fixed #12114 --- src/server/game/Entities/Unit/Unit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 09e18f0c7..b5945d25e 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -17970,8 +17970,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au GetMotionMaster()->MoveIdle(); StopMoving(); - if (charmer->GetTypeId() == TYPEID_PLAYER && - charmer->getClass() == CLASS_WARLOCK) + if (charmer->GetTypeId() == TYPEID_PLAYER && charmer->getClass() == CLASS_WARLOCK && ToCreature()->GetCreatureTemplate()->type == CREATURE_TYPE_DEMON) { // Disable CreatureAI/SmartAI and switch to CharmAI when charmed by warlock Creature* charmed = ToCreature();