fix: Adds GetDistanceToSqrt for Point3D and centralizes all the calls (#2233)
This commit is contained in:
parent
2086e9b292
commit
416e1be735
8 changed files with 56 additions and 39 deletions
|
|
@ -2439,7 +2439,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
FightMode.Strongest => m.Skills.Tactics.Value + m.Str, // returns strongest mobile
|
||||
FightMode.Weakest => -m.Hits, // returns weakest mobile
|
||||
_ => -GetDistanceToSqrt(m)
|
||||
_ => -this.GetDistanceToSqrt(m)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -2461,7 +2461,7 @@ namespace Server.Mobiles
|
|||
|
||||
public bool IsHurt() => Hits != HitsMax;
|
||||
|
||||
public double GetHomeDistance() => GetDistanceToSqrt(m_Home);
|
||||
public double GetHomeDistance() => this.GetDistanceToSqrt(m_Home);
|
||||
|
||||
public virtual int GetTeamSize(int iRange)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue