From 1527fe5593973185f0a5acd76d393bba26f61251 Mon Sep 17 00:00:00 2001 From: Dank074 Date: Wed, 29 Jan 2020 22:49:35 -0600 Subject: [PATCH] rank effect should not be applied from RoomManager, apply it from EffectsComponent instead --- src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java | 5 ----- .../habbo/habbohotel/users/inventory/EffectsComponent.java | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java index 60c67a59..b0512576 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java @@ -747,11 +747,6 @@ public class RoomManager { } int effect = habbo.getInventory().getEffectsComponent().activatedEffect; - - if (effect == 0) { - effect = habbo.getHabboInfo().getRank().getRoomEffect(); - } - room.giveEffect(habbo.getRoomUnit(), effect, -1); } diff --git a/src/main/java/com/eu/habbo/habbohotel/users/inventory/EffectsComponent.java b/src/main/java/com/eu/habbo/habbohotel/users/inventory/EffectsComponent.java index 6448e23a..b1e50d72 100644 --- a/src/main/java/com/eu/habbo/habbohotel/users/inventory/EffectsComponent.java +++ b/src/main/java/com/eu/habbo/habbohotel/users/inventory/EffectsComponent.java @@ -65,7 +65,9 @@ public class EffectsComponent { rankEffect.duration = 0; rankEffect.isRankEnable = true; rankEffect.activationTimestamp = Emulator.getIntUnixTimestamp(); + rankEffect.enabled = true; this.effects.put(effectId, rankEffect); + this.activatedEffect = effectId; // enabled by default return rankEffect; }