From fe2e3c05948caed340ecb03fada05e8bb4302a4a Mon Sep 17 00:00:00 2001 From: Yordi Date: Fri, 24 Mar 2023 13:53:33 +0000 Subject: [PATCH] Fix applying effects to bots --- src/main/java/com/eu/habbo/habbohotel/rooms/Room.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index f8a0c468..f0ad12a9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -3607,9 +3607,7 @@ public class Room implements Comparable, ISerialize, Runnable { Habbo habbo = roomUnit.getRoom().getHabbo(roomUnit); - if (habbo == null) return; - - if (!habbo.getHabboInfo().isInGame() || ignoreChecks) { + if (roomUnit.getRoomUnitType() == RoomUnitType.USER && (habbo == null || habbo.getHabboInfo().isInGame() && !ignoreChecks)) { return; } if (duration == -1 || duration == Integer.MAX_VALUE) { duration = Integer.MAX_VALUE; } else { @@ -3620,7 +3618,6 @@ public class Room implements Comparable, ISerialize, Runnable { roomUnit.setEffectId(effectId, duration); this.sendComposer(new AvatarEffectMessageComposer(roomUnit).compose()); } - } } public void giveHandItem(Habbo habbo, int handItem) {