mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-19 07:56:26 +01:00
Fixed magictile placement on non-stackable items when being placed from your inventory.
This commit is contained in:
parent
d08795159f
commit
9b6a380a3d
@ -5425,22 +5425,23 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
|
|||||||
if (this.hasPetsAt(t.x, t.y)) return FurnitureMovementError.TILE_HAS_PETS;
|
if (this.hasPetsAt(t.x, t.y)) return FurnitureMovementError.TILE_HAS_PETS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean magicTile = item instanceof InteractionStackHelper;
|
||||||
|
|
||||||
|
if(!magicTile) {
|
||||||
List<Pair<RoomTile, THashSet<HabboItem>>> tileFurniList = new ArrayList<>();
|
List<Pair<RoomTile, THashSet<HabboItem>>> tileFurniList = new ArrayList<>();
|
||||||
for (RoomTile t : occupiedTiles)
|
for (RoomTile t : occupiedTiles) {
|
||||||
{
|
|
||||||
tileFurniList.add(Pair.create(t, this.getItemsAt(t)));
|
tileFurniList.add(Pair.create(t, this.getItemsAt(t)));
|
||||||
|
|
||||||
HabboItem topItem = this.getTopItemAt(t.x, t.y, item);
|
HabboItem topItem = this.getTopItemAt(t.x, t.y, item);
|
||||||
if (topItem != null && !topItem.getBaseItem().allowStack())
|
if (topItem != null && !topItem.getBaseItem().allowStack() && !t.getAllowStack()) {
|
||||||
{
|
|
||||||
return FurnitureMovementError.CANT_STACK;
|
return FurnitureMovementError.CANT_STACK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.canStackAt(this, tileFurniList))
|
if (!item.canStackAt(this, tileFurniList)) {
|
||||||
{
|
|
||||||
return FurnitureMovementError.CANT_STACK;
|
return FurnitureMovementError.CANT_STACK;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return FurnitureMovementError.NONE;
|
return FurnitureMovementError.NONE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user