Skip to content

Commit

Permalink
fix: Change Decorate FindItem range from 0 to 1 (#1725)
Browse files Browse the repository at this point in the history
  • Loading branch information
srosellj committed Apr 7, 2024
1 parent d6fe502 commit 6c07673
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions Projects/UOContent/Commands/Object Creation/Decorate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ private static bool FindItem(int x, int y, int z, Map map, Item srcItem)

using var queue = PooledRefQueue<Item>.Create();

foreach (var item in map.GetItemsInRange(new Point3D(x, y, z), 1))
foreach (var item in map.GetItemsAt(x, y))
{
if (srcItem is BaseDoor)
{
Expand Down Expand Up @@ -1118,12 +1118,9 @@ private static bool FindItem(int x, int y, int z, Map map, Item srcItem)
}
}
}
else
else if (item.Z == z && item.ItemID == itemID)
{
if (item.Z == z && item.ItemID == itemID)
{
return true;
}
return true;
}
}

Expand Down
9 changes: 3 additions & 6 deletions Projects/UOContent/Commands/Object Creation/DecorateMag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ private static bool FindItem(int x, int y, int z, Map map, Item srcItem)
var res = false;

using var queue = PooledRefQueue<Item>.Create();
foreach (var item in map.GetItemsInRange(new Point3D(x, y, z), 1))
foreach (var item in map.GetItemsAt(x, y))
{
if (srcItem is BaseDoor)
{
Expand Down Expand Up @@ -1113,12 +1113,9 @@ private static bool FindItem(int x, int y, int z, Map map, Item srcItem)
}
}
}
else
else if (item.Z == z && item.ItemID == itemID)
{
if (item.Z == z && item.ItemID == itemID)
{
return true;
}
return true;
}
}

Expand Down

0 comments on commit 6c07673

Please sign in to comment.