mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 12:22:36 +01:00
Fixed a leftover bug
This commit is contained in:
parent
a4beae1e7d
commit
703a2e8659
@ -42,17 +42,19 @@ public class WiredConditionTriggerOnFurni extends InteractionWiredCondition {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* 1. If a Habbo IS NOT walking we only have to check if the Habbo is on one of the selected tiles.
|
* 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 very first tile in the walking path since the startlocation
|
* 2. If a Habbo IS walking we have to check if the next tile in the walking path is one of the selected items
|
||||||
* is one of the selected items
|
|
||||||
* */
|
* */
|
||||||
if (!roomUnit.isWalking()) {
|
if (!roomUnit.isWalking()) {
|
||||||
THashSet<HabboItem> itemsAtUser = room.getItemsAt(roomUnit.getCurrentLocation());
|
THashSet<HabboItem> itemsAtUser = room.getItemsAt(roomUnit.getCurrentLocation());
|
||||||
return this.items.stream().anyMatch(itemsAtUser::contains);
|
return this.items.stream().anyMatch(itemsAtUser::contains);
|
||||||
} else {
|
} else {
|
||||||
RoomTile firstTileInPath = room.getLayout()
|
RoomTile firstTileInPath = room.getLayout()
|
||||||
.findPath(roomUnit.getStartLocation(), roomUnit.getGoal(), roomUnit.getGoal(), roomUnit)
|
.findPath(roomUnit.getCurrentLocation(), roomUnit.getGoal(), roomUnit.getGoal(), roomUnit)
|
||||||
.peek();
|
.peek();
|
||||||
|
|
||||||
|
if (firstTileInPath == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
return this.items
|
return this.items
|
||||||
.stream()
|
.stream()
|
||||||
.anyMatch(conditionItem -> conditionItem
|
.anyMatch(conditionItem -> conditionItem
|
||||||
|
Loading…
x
Reference in New Issue
Block a user