fix: Changes IPAddress comparison to use UInt128 (#1897)
This commit is contained in:
parent
83db1f91f6
commit
4d47b3849f
2 changed files with 6 additions and 13 deletions
|
|
@ -174,7 +174,7 @@ public class AddonGenerator
|
|||
|
||||
using var target = PooledRefList<Item>.Create();
|
||||
|
||||
foreach(Static s in map.GetItemsInBounds<Static>(bounds))
|
||||
foreach (Static s in map.GetItemsInBounds<Static>(bounds))
|
||||
{
|
||||
if (!range || s.Z >= min && s.Z <= max)
|
||||
{
|
||||
|
|
@ -189,7 +189,7 @@ public class AddonGenerator
|
|||
}
|
||||
|
||||
// Get correct bounds
|
||||
foreach(Item item in target)
|
||||
foreach (Item item in target)
|
||||
{
|
||||
if (item.Z < center.Z)
|
||||
{
|
||||
|
|
@ -241,7 +241,7 @@ public class AddonGenerator
|
|||
}
|
||||
}
|
||||
|
||||
foreach(Item item in target)
|
||||
foreach (Item item in target)
|
||||
{
|
||||
int xOffset = item.X - center.X;
|
||||
int yOffset = item.Y - center.Y;
|
||||
|
|
|
|||
|
|
@ -324,17 +324,10 @@ public class HouseRaffleManagementGump : Gump
|
|||
return 1;
|
||||
}
|
||||
|
||||
var a = x.Address.GetAddressBytes();
|
||||
var b = y.Address.GetAddressBytes();
|
||||
|
||||
for (var i = 0; i < a.Length && i < b.Length; i++)
|
||||
var addressCompare = x.Address.ToUInt128().CompareTo(y.Address.ToUInt128());
|
||||
if (addressCompare != 0)
|
||||
{
|
||||
var compare = a[i].CompareTo(b[i]);
|
||||
|
||||
if (compare != 0)
|
||||
{
|
||||
return compare;
|
||||
}
|
||||
return addressCompare;
|
||||
}
|
||||
|
||||
return x.Date.CompareTo(y.Date);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue