From 8f24dd48d0901c24049f2736d55c0c7e6cdc1b98 Mon Sep 17 00:00:00 2001 From: Kitt Mustang Date: Sun, 5 Sep 2021 02:53:10 +0000 Subject: [PATCH] Fix ticks in crackable furni interaction. --- .../habbohotel/items/interactions/InteractionCrackable.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionCrackable.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionCrackable.java index 70869154..f9aed59a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionCrackable.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionCrackable.java @@ -100,6 +100,11 @@ public class InteractionCrackable extends HabboItem { if (rewardData.requiredEffect > 0 && habbo.getRoomUnit().getEffectId() != rewardData.requiredEffect) return; + if(this.ticks < 1) + { + // If there are no ticks (for example because the room has been reloaded), check the current extradata of the item and update the ticks. + this.ticks = Integer.parseInt(this.getExtradata()); + } this.ticks++; this.setExtradata("" + (this.ticks)); this.needsUpdate(true);