fix(Core/Movement): properly initialized combat distance for creatures with SAI script (#7437)
- Closes #7331
This commit is contained in:
parent
3b356f218b
commit
e35e47c2f7
1 changed files with 2 additions and 1 deletions
|
|
@ -800,7 +800,8 @@ void SmartAI::AttackStart(Unit* who)
|
|||
me->GetMotionMaster()->MovementExpired();
|
||||
me->StopMoving();
|
||||
}
|
||||
me->GetMotionMaster()->MoveChase(who, GetScript()->GetCasterActualDist() ? GetScript()->GetCasterActualDist() : GetScript()->GetActualCombatDist());
|
||||
float range = GetScript()->GetCasterActualDist() > 0.f ? GetScript()->GetCasterActualDist() : GetScript()->GetActualCombatDist();
|
||||
me->GetMotionMaster()->MoveChase(who, range > 0.f ? ChaseRange(range) : std::optional<ChaseRange>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue