mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 04:12:37 +01:00
Merge branch '53-stackhelpers-do-not-let-you-place-them-on-non-stackable-furniture-from-your-hand' into 'dev'
Resolve "Stackhelpers do not let you place them on non-stackable furniture from your hand." See merge request morningstar/Arcturus-Community!15
This commit is contained in:
commit
104368006d
@ -5425,23 +5425,24 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
|
||||
if (this.hasPetsAt(t.x, t.y)) return FurnitureMovementError.TILE_HAS_PETS;
|
||||
}
|
||||
|
||||
List<Pair<RoomTile, THashSet<HabboItem>>> tileFurniList = new ArrayList<>();
|
||||
for (RoomTile t : occupiedTiles)
|
||||
{
|
||||
tileFurniList.add(Pair.create(t, this.getItemsAt(t)));
|
||||
boolean magicTile = item instanceof InteractionStackHelper;
|
||||
|
||||
HabboItem topItem = this.getTopItemAt(t.x, t.y, item);
|
||||
if (topItem != null && !topItem.getBaseItem().allowStack())
|
||||
{
|
||||
if(!magicTile) {
|
||||
List<Pair<RoomTile, THashSet<HabboItem>>> tileFurniList = new ArrayList<>();
|
||||
for (RoomTile t : occupiedTiles) {
|
||||
tileFurniList.add(Pair.create(t, this.getItemsAt(t)));
|
||||
|
||||
HabboItem topItem = this.getTopItemAt(t.x, t.y, item);
|
||||
if (topItem != null && !topItem.getBaseItem().allowStack() && !t.getAllowStack()) {
|
||||
return FurnitureMovementError.CANT_STACK;
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.canStackAt(this, tileFurniList)) {
|
||||
return FurnitureMovementError.CANT_STACK;
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.canStackAt(this, tileFurniList))
|
||||
{
|
||||
return FurnitureMovementError.CANT_STACK;
|
||||
}
|
||||
|
||||
return FurnitureMovementError.NONE;
|
||||
}
|
||||
public FurnitureMovementError placeFloorFurniAt(HabboItem item, RoomTile tile, int rotation, Habbo owner) throws Exception
|
||||
|
Loading…
x
Reference in New Issue
Block a user