From 6c07673a37143ef350b16e81804a51b7bda6eb75 Mon Sep 17 00:00:00 2001 From: srosellj <50594106+srosellj@users.noreply.github.com> Date: Sun, 7 Apr 2024 23:56:39 +0200 Subject: [PATCH] fix: Change Decorate FindItem range from 0 to 1 (#1725) --- Projects/UOContent/Commands/Object Creation/Decorate.cs | 9 +++------ .../UOContent/Commands/Object Creation/DecorateMag.cs | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Projects/UOContent/Commands/Object Creation/Decorate.cs b/Projects/UOContent/Commands/Object Creation/Decorate.cs index d9006580d..a092bcaac 100644 --- a/Projects/UOContent/Commands/Object Creation/Decorate.cs +++ b/Projects/UOContent/Commands/Object Creation/Decorate.cs @@ -1045,7 +1045,7 @@ namespace Server.Commands using var queue = PooledRefQueue.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) { @@ -1118,12 +1118,9 @@ namespace Server.Commands } } } - else + else if (item.Z == z && item.ItemID == itemID) { - if (item.Z == z && item.ItemID == itemID) - { - return true; - } + return true; } } diff --git a/Projects/UOContent/Commands/Object Creation/DecorateMag.cs b/Projects/UOContent/Commands/Object Creation/DecorateMag.cs index 8a19d146a..f263a2ad7 100644 --- a/Projects/UOContent/Commands/Object Creation/DecorateMag.cs +++ b/Projects/UOContent/Commands/Object Creation/DecorateMag.cs @@ -1040,7 +1040,7 @@ namespace Server.Commands var res = false; using var queue = PooledRefQueue.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) { @@ -1113,12 +1113,9 @@ namespace Server.Commands } } } - else + else if (item.Z == z && item.ItemID == itemID) { - if (item.Z == z && item.ItemID == itemID) - { - return true; - } + return true; } }