mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 22:56:24 +00:00
fix(Core/Units): Fixed problems with charming non-demon creatures by … (#12164)
fix(Core/Units): Fixed problems with charming non-demon creatures by warlock. Fixed #12114
This commit is contained in:
@@ -17970,8 +17970,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
|
|||||||
GetMotionMaster()->MoveIdle();
|
GetMotionMaster()->MoveIdle();
|
||||||
StopMoving();
|
StopMoving();
|
||||||
|
|
||||||
if (charmer->GetTypeId() == TYPEID_PLAYER &&
|
if (charmer->GetTypeId() == TYPEID_PLAYER && charmer->getClass() == CLASS_WARLOCK && ToCreature()->GetCreatureTemplate()->type == CREATURE_TYPE_DEMON)
|
||||||
charmer->getClass() == CLASS_WARLOCK)
|
|
||||||
{
|
{
|
||||||
// Disable CreatureAI/SmartAI and switch to CharmAI when charmed by warlock
|
// Disable CreatureAI/SmartAI and switch to CharmAI when charmed by warlock
|
||||||
Creature* charmed = ToCreature();
|
Creature* charmed = ToCreature();
|
||||||
|
|||||||
Reference in New Issue
Block a user