Core/Spells: Fix crash when using spells with mindcontrol.

This commit is contained in:
hondacrx
2021-01-31 01:15:46 -05:00
parent de1bbca76c
commit c8db343278
+2 -3
View File
@@ -201,9 +201,8 @@ namespace Game
charmInfo.SetIsReturning(false);
CreatureAI AI = pet.ToCreature().GetAI();
PetAI petAI = (PetAI)AI;
if (petAI != null)
petAI._AttackStart(TargetUnit); // force target switch
if (AI is PetAI)
((PetAI)AI)._AttackStart(TargetUnit); // force target switch
else
AI.AttackStart(TargetUnit);