Fix tag game effects

This commit is contained in:
Alejandro 2019-08-01 21:23:20 +03:00
parent 27b6766940
commit 430a86701e

View File

@ -140,14 +140,16 @@ public abstract class TagGame extends Game {
TObjectHashIterator<HabboItem> iterator = poles.iterator();
if ((iterator.hasNext())) {
HabboItem item = iterator.next();
habbo.getHabboInfo().getCurrentRoom().giveEffect(habbo, this.getTaggedEffect(habbo), -1);
habbo.getHabboInfo().getCurrentRoom().giveEffect(habbo, this.getEffect(habbo), -1);
this.room.scheduledTasks.add(() -> habbo.getHabboInfo().getCurrentRoom().giveEffect(habbo, this.getTaggedEffect(habbo), -1));
this.taggers.put(habbo, (InteractionTagPole) item);
return true;
}
}
} else {
if (this.taggers.isEmpty()) {
habbo.getHabboInfo().getCurrentRoom().giveEffect(habbo, this.getTaggedEffect(habbo), -1);
habbo.getHabboInfo().getCurrentRoom().giveEffect(habbo, this.getEffect(habbo), -1);
this.room.scheduledTasks.add(() -> habbo.getHabboInfo().getCurrentRoom().giveEffect(habbo, this.getTaggedEffect(habbo), -1));
this.taggers.put(habbo, null);
return true;
}