From b783182e7f90bd48de059baa073cf37f9cd10aa7 Mon Sep 17 00:00:00 2001 From: brenoepic <59066707+brenoepics@users.noreply.github.com> Date: Fri, 29 Apr 2022 22:46:53 -0300 Subject: [PATCH] nullables --- .../games/battlebanzai/InteractionBattleBanzaiPuck.java | 3 +-- .../items/interactions/totems/InteractionTotemLegs.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java index 67436d2a..da8ccf7d 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/battlebanzai/InteractionBattleBanzaiPuck.java @@ -63,8 +63,7 @@ public class InteractionBattleBanzaiPuck extends InteractionPushable { @Override public int getNextRollDelay(int currentStep, int totalSteps) { - int t = 2500; - return (totalSteps == 1) ? 500 : 100 * ((t = t / t - 1) * t * t * t * t + 1) + (currentStep * 100); + return (totalSteps == 1) ? 500 : 100 + (currentStep * 100); } @Override diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemLegs.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemLegs.java index d8d83da4..6ae0c802 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemLegs.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/totems/InteractionTotemLegs.java @@ -51,7 +51,7 @@ public class InteractionTotemLegs extends InteractionDefault { public void onClick(GameClient client, Room room, Object[] objects) throws Exception { super.onClick(client, room, objects); - if (!((client != null && room != null && room.hasRights(client.getHabbo())) || (objects.length >= 2 && objects[1] instanceof WiredEffectType))) + if (room == null || !((client != null && room.hasRights(client.getHabbo())) || (objects.length >= 2 && objects[1] instanceof WiredEffectType))) return; updateHead(room, room.getLayout().getTile(this.getX(), this.getY()));