From cf4a6856573831b60d79bddad5a11f8432c3194a Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Fri, 3 Jan 2020 18:05:19 +0000 Subject: [PATCH] TODO: Fix Moving Large Furniture, which causes disconnections. Temp Fix by Beny. --- .../outgoing/rooms/UpdateStackHeightComposer.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/eu/habbo/messages/outgoing/rooms/UpdateStackHeightComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/rooms/UpdateStackHeightComposer.java index 4f6c3b67..5a99f16c 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/rooms/UpdateStackHeightComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/rooms/UpdateStackHeightComposer.java @@ -25,8 +25,21 @@ public class UpdateStackHeightComposer extends MessageComposer { @Override public ServerMessage compose() { + //TODO: THIS IS A TEMP FIX. THERE IS AN ISSUE WITH BAD PACKET STRUCTURE HERE CAUSING ISSUES WITH MOVING LARGE FURNITURE this.response.init(Outgoing.UpdateStackHeightComposer); if (this.updateTiles != null) { + if(this.updateTiles.size() > 4) { + RoomTile[] tiles = (RoomTile[])this.updateTiles.toArray(); + this.response.appendByte(4); + for(int i = 0; i < 4; i++) { + RoomTile t = tiles[i]; + this.response.appendByte((int) t.x); + this.response.appendByte((int) t.y); + this.response.appendShort(t.relativeHeight()); + } + return this.response; + } + this.response.appendByte(this.updateTiles.size()); for (RoomTile t : this.updateTiles) { this.response.appendByte((int) t.x);