Reset banzai tile state on pickup

This commit is contained in:
Alejandro 2020-02-04 14:09:48 +02:00
parent 44de2a81ec
commit 304907ddf1
2 changed files with 20 additions and 1 deletions

View File

@ -99,4 +99,23 @@ public class InteractionBattleBanzaiTile extends HabboItem {
return super.canStackAt(room, itemsAtLocation);
}
@Override
public void onPickUp(Room room) {
super.onPickUp(room);
this.setExtradata("0");
room.updateItem(this);
}
@Override
public void onPlace(Room room) {
super.onPlace(room);
BattleBanzaiGame game = (BattleBanzaiGame) room.getGame(BattleBanzaiGame.class);
if (game != null && game.getState() != GameState.IDLE) {
this.setExtradata("1");
}
}
}

View File

@ -13,7 +13,7 @@ public class MoodLightSaveSettingsEvent extends MessageHandler {
public void handle() throws Exception {
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
if ((room.getGuildId() > 0 && room.guildRightLevel(this.client.getHabbo()) < 2) && !room.hasRights(this.client.getHabbo()))
if ((room.getGuildId() <= 0 && room.guildRightLevel(this.client.getHabbo()) < 2) && !room.hasRights(this.client.getHabbo()))
return;
int id = this.packet.readInt();