fix: Fixes house update range bug (#1790)

This commit is contained in:
Kamron Batman 2024-05-23 16:07:33 -07:00 • committed by GitHub
parent 6596046216
commit 0011db7f47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 10 deletions

View file

@ -716,7 +716,9 @@ namespace Server.Multis
return fromSecures + fromVendors + fromLockdowns + fromMovingCrate;
}
public bool InRange(Point2D from, int range)
public override bool InRange(Point3D from, int range) => InRange(new Point2D(from), range);
public override bool InRange(Point2D from, int range)
{
if (Region == null)
{
@ -725,7 +727,6 @@ namespace Server.Multis
foreach (var rect in Region.Area)
{
// TODO: Convert this to 3D - https://github.com/modernuo/ModernUO/issues/29
if (from.X >= rect.Start.X - range && from.Y >= rect.Start.Y - range && from.X < rect.End.X + range && from.Y < rect.End.Y + range)
{
return true;

View file

@ -201,7 +201,7 @@ namespace Server.Multis
}
}
public static ComponentVerification Verification => m_Verification ?? (m_Verification = new ComponentVerification());
public static ComponentVerification Verification => m_Verification ??= new ComponentVerification();
public bool IsFixture(Item item) => Fixtures.Contains(item);