Core/SAI: Fix creatures casting spells while moving with flag SMARTCAST_COMBAT_MOVE

Port From (https://github.com/TrinityCore/TrinityCore/commit/b3545479bfbd2b743288bd32094ce8c4856a1e3d)
This commit is contained in:
hondacrx
2022-03-02 18:02:58 -05:00
parent 47bea619f7
commit 3f8c0f897a
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -482,7 +482,7 @@ namespace Game.AI
!_me.IsWithinLOSInMap(target) || !hasPower || _me.HasUnitFlag(UnitFlags.Silenced))
allowMove = true;
((SmartAI)_me.GetAI()).SetCombatMove(allowMove);
((SmartAI)_me.GetAI()).SetCombatMove(allowMove, true);
}
_me.CastSpell(target.ToUnit(), e.Action.cast.spell, new CastSpellExtraArgs(triggerFlag));