rank effect should not be applied from RoomManager, apply it from EffectsComponent instead

This commit is contained in:
Dank074 2020-01-29 22:49:35 -06:00
parent db71cd8406
commit 1527fe5593
2 changed files with 2 additions and 5 deletions

View File

@ -747,11 +747,6 @@ public class RoomManager {
} }
int effect = habbo.getInventory().getEffectsComponent().activatedEffect; int effect = habbo.getInventory().getEffectsComponent().activatedEffect;
if (effect == 0) {
effect = habbo.getHabboInfo().getRank().getRoomEffect();
}
room.giveEffect(habbo.getRoomUnit(), effect, -1); room.giveEffect(habbo.getRoomUnit(), effect, -1);
} }

View File

@ -65,7 +65,9 @@ public class EffectsComponent {
rankEffect.duration = 0; rankEffect.duration = 0;
rankEffect.isRankEnable = true; rankEffect.isRankEnable = true;
rankEffect.activationTimestamp = Emulator.getIntUnixTimestamp(); rankEffect.activationTimestamp = Emulator.getIntUnixTimestamp();
rankEffect.enabled = true;
this.effects.put(effectId, rankEffect); this.effects.put(effectId, rankEffect);
this.activatedEffect = effectId; // enabled by default
return rankEffect; return rankEffect;
} }