diff --git a/Projects/UOContent/Commands/AddonGenerator.cs b/Projects/UOContent/Commands/AddonGenerator.cs index 49bd1d6d5..85999f383 100644 --- a/Projects/UOContent/Commands/AddonGenerator.cs +++ b/Projects/UOContent/Commands/AddonGenerator.cs @@ -174,7 +174,7 @@ private static void PickerCallback(Mobile from, Map map, Point3D start, Point3D using var target = PooledRefList.Create(); - foreach(Static s in map.GetItemsInBounds(bounds)) + foreach (Static s in map.GetItemsInBounds(bounds)) { if (!range || s.Z >= min && s.Z <= max) { @@ -189,7 +189,7 @@ private static void PickerCallback(Mobile from, Map map, Point3D start, Point3D } // Get correct bounds - foreach(Item item in target) + foreach (Item item in target) { if (item.Z < center.Z) { @@ -241,7 +241,7 @@ private static void PickerCallback(Mobile from, Map map, Point3D start, Point3D } } - foreach(Item item in target) + foreach (Item item in target) { int xOffset = item.X - center.X; int yOffset = item.Y - center.Y; diff --git a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleManagementGump.cs b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleManagementGump.cs index dfa50ae44..dd39c9ba7 100644 --- a/Projects/UOContent/Items/Special/House Raffle/HouseRaffleManagementGump.cs +++ b/Projects/UOContent/Items/Special/House Raffle/HouseRaffleManagementGump.cs @@ -324,17 +324,10 @@ public int Compare(RaffleEntry x, RaffleEntry y) 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);