mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fixed Wired Exploit, WiredEffectMatchFurni did not check max height.
This commit is contained in:
parent
732910e3fc
commit
3177e19960
@ -101,7 +101,8 @@ public class WiredEffectMatchFurni extends InteractionWiredEffect {
|
|||||||
tilesToUpdate.addAll(tiles);
|
tilesToUpdate.addAll(tiles);
|
||||||
|
|
||||||
double offsetZ = highestZ - item.getZ();
|
double offsetZ = highestZ - item.getZ();
|
||||||
|
double totalHeight = item.getZ() + offsetZ;
|
||||||
|
if(totalHeight > 40) break;
|
||||||
tilesToUpdate.addAll(room.getLayout().getTilesAt(room.getLayout().getTile(item.getX(), item.getY()), item.getBaseItem().getWidth(), item.getBaseItem().getLength(), oldRotation));
|
tilesToUpdate.addAll(room.getLayout().getTilesAt(room.getLayout().getTile(item.getX(), item.getY()), item.getBaseItem().getWidth(), item.getBaseItem().getLength(), oldRotation));
|
||||||
|
|
||||||
if (!slideAnimation) {
|
if (!slideAnimation) {
|
||||||
|
@ -1478,12 +1478,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
|
|
||||||
if (newRoller == null || topItem == newRoller) {
|
if (newRoller == null || topItem == newRoller) {
|
||||||
List<HabboItem> sortedItems = new ArrayList<>(itemsOnRoller);
|
List<HabboItem> sortedItems = new ArrayList<>(itemsOnRoller);
|
||||||
sortedItems.sort(new Comparator<HabboItem>() {
|
sortedItems.sort((o1, o2) -> o1.getZ() > o2.getZ() ? -1 : 1);
|
||||||
@Override
|
|
||||||
public int compare(HabboItem o1, HabboItem o2) {
|
|
||||||
return o1.getZ() > o2.getZ() ? -1 : 1;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
for (HabboItem item : sortedItems) {
|
for (HabboItem item : sortedItems) {
|
||||||
if (item.getX() == roller.getX() && item.getY() == roller.getY() && zOffset <= 0) {
|
if (item.getX() == roller.getX() && item.getY() == roller.getY() && zOffset <= 0) {
|
||||||
@ -4471,9 +4466,11 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Place at new position
|
//Place at new position
|
||||||
|
double height = this.getStackHeight(tile.x, tile.y, false);
|
||||||
|
if(height > 40d) return FurnitureMovementError.CANT_STACK;
|
||||||
item.setX(tile.x);
|
item.setX(tile.x);
|
||||||
item.setY(tile.y);
|
item.setY(tile.y);
|
||||||
item.setZ(this.getStackHeight(tile.x, tile.y, false, item));
|
item.setZ(height);
|
||||||
if (magicTile) {
|
if (magicTile) {
|
||||||
item.setZ(tile.z);
|
item.setZ(tile.z);
|
||||||
item.setExtradata("" + item.getZ() * 100);
|
item.setExtradata("" + item.getZ() * 100);
|
||||||
|
Loading…
Reference in New Issue
Block a user