diff --git a/core/src/com/riiablo/screen/panel/VendorGrid.java b/core/src/com/riiablo/screen/panel/VendorGrid.java index 760ed375..06cc581a 100644 --- a/core/src/com/riiablo/screen/panel/VendorGrid.java +++ b/core/src/com/riiablo/screen/panel/VendorGrid.java @@ -82,7 +82,9 @@ TopLevelSort: } coords.set(x, y); - return x < width && y < height; + if (contains) return false; + return x + item.base.invwidth - 1 < width + && y + item.base.invheight - 1 < height; } private boolean placeMultibuyItem(GridPoint2 coords, Item item, Array placed) { @@ -106,6 +108,8 @@ TopLevelSort: } coords.set(x, y); - return x < width && y < height; + if (contains) return false; + return x + item.base.invwidth - 1 < width + && y + item.base.invheight - 1 < height; } }