Fix ticks in crackable furni interaction.

This commit is contained in:
Kitt Mustang 2021-09-05 02:53:10 +00:00
parent 2d99f8b579
commit 8f24dd48d0

View File

@ -100,6 +100,11 @@ public class InteractionCrackable extends HabboItem {
if (rewardData.requiredEffect > 0 && habbo.getRoomUnit().getEffectId() != rewardData.requiredEffect) if (rewardData.requiredEffect > 0 && habbo.getRoomUnit().getEffectId() != rewardData.requiredEffect)
return; 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.ticks++;
this.setExtradata("" + (this.ticks)); this.setExtradata("" + (this.ticks));
this.needsUpdate(true); this.needsUpdate(true);