fix: Adds GetDistanceToSqrt for Point3D and centralizes all the calls (#2233)

This commit is contained in:
Kamron Batman 2025-07-18 09:24:41 -07:00 • committed by GitHub
parent 2086e9b292
commit 416e1be735
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 56 additions and 39 deletions

View file

@ -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)
{