Fix applying effects to bots

This commit is contained in:
Yordi 2023-03-24 13:53:33 +00:00 committed by John
parent ffd01c2965
commit fe2e3c0594

View File

@ -3607,9 +3607,7 @@ public class Room implements Comparable<Room>, 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<Room>, ISerialize, Runnable {
roomUnit.setEffectId(effectId, duration);
this.sendComposer(new AvatarEffectMessageComposer(roomUnit).compose());
}
}
}
public void giveHandItem(Habbo habbo, int handItem) {