mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
fix(Core/Movement): properly initialized combat distance for creatures with SAI script (#7437)
- Closes #7331
This commit is contained in:
@@ -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>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user