Core/SmartAI: add missing movement generator type check on SmartAI::SetCombatMove

Port From (https://github.com/TrinityCore/TrinityCore/commit/e94dca132b4a505f3cc4583bd63879148ad51ca3)
This commit is contained in:
hondacrx
2022-01-01 16:17:58 -05:00
parent c0aad82cd1
commit a4c4897b4d
2 changed files with 6 additions and 6 deletions
+4 -1
View File
@@ -849,7 +849,10 @@ namespace Game.AI
{
if (on)
{
if (!me.HasReactState(ReactStates.Passive) && me.GetVictim() && !me.GetMotionMaster().HasMovementGenerator(movement => movement.Mode == MovementGeneratorMode.Default && movement.Priority == MovementGeneratorPriority.Normal))
if (!me.HasReactState(ReactStates.Passive) && me.GetVictim() && !me.GetMotionMaster().HasMovementGenerator(movement =>
{
return movement.GetMovementGeneratorType() == MovementGeneratorType.Chase && movement.Mode == MovementGeneratorMode.Default && movement.Priority == MovementGeneratorPriority.Normal;
}))
{
SetRun(_run);
me.GetMotionMaster().MoveChase(me.GetVictim());