mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/Spell): Enslaved Demon does not auto-attack/auto-cast (#11677)
This commit is contained in:
@@ -17941,7 +17941,18 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
|
||||
|
||||
StopMoving();
|
||||
|
||||
ToCreature()->AI()->OnCharmed(true);
|
||||
if (charmer->GetTypeId() == TYPEID_PLAYER &&
|
||||
charmer->getClass() == CLASS_WARLOCK)
|
||||
{
|
||||
// Disable CreatureAI/SmartAI and switch to CharmAI when charmed by warlock
|
||||
Creature* charmed = ToCreature();
|
||||
charmed->NeedChangeAI = true;
|
||||
charmed->IsAIEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ToCreature()->AI()->OnCharmed(true);
|
||||
}
|
||||
|
||||
// Xinef: If creature can fly, add normal player flying flag (fixes speed)
|
||||
if (charmer->GetTypeId() == TYPEID_PLAYER && ToCreature()->CanFly())
|
||||
|
||||
Reference in New Issue
Block a user