From 6049c195d6448013068d1dcc02653773e9e40bde Mon Sep 17 00:00:00 2001 From: ArpyAge Date: Thu, 2 Sep 2021 01:41:33 +0200 Subject: [PATCH] Reverted Wired Condition inner workings because it seemed to only give problems and nullpointers --- .../WiredConditionTriggerOnFurni.java | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTriggerOnFurni.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTriggerOnFurni.java index 250d4751..61e3fd70 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTriggerOnFurni.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionTriggerOnFurni.java @@ -46,28 +46,8 @@ public class WiredConditionTriggerOnFurni extends InteractionWiredCondition { } protected boolean triggerOnFurni(RoomUnit roomUnit, Room room) { - /* - * 1. If a Habbo IS NOT walking we only have to check if the Habbo is on one of the selected tiles. - * 2. If a Habbo IS walking we have to check if the next tile in the walking path is one of the selected items - * */ - if (!roomUnit.isWalking()) { - THashSet itemsAtUser = room.getItemsAt(roomUnit.getCurrentLocation()); - return this.items.stream().anyMatch(itemsAtUser::contains); - } else { - RoomTile firstTileInPath = room.getLayout() - .findPath(roomUnit.getCurrentLocation(), roomUnit.getGoal(), roomUnit.getGoal(), roomUnit) - .peek(); - - if (firstTileInPath == null) - return false; - - return this.items - .stream() - .anyMatch(conditionItem -> conditionItem - .getOccupyingTiles(room.getLayout()) - .contains(firstTileInPath) - ); - } + THashSet itemsAtUser = room.getItemsAt(roomUnit.getCurrentLocation()); + return this.items.stream().anyMatch(itemsAtUser::contains); } @Override