Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/items/interactions/games/InteractionGameScoreboard.java

35 lines
1.2 KiB
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.items.interactions.games;
import com.eu.habbo.habbohotel.games.GameTeamColors;
import com.eu.habbo.habbohotel.items.Item;
import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.messages.ServerMessage;
import java.sql.ResultSet;
import java.sql.SQLException;
2019-05-26 20:14:53 +02:00
public abstract class InteractionGameScoreboard extends InteractionGameTeamItem {
protected InteractionGameScoreboard(ResultSet set, Item baseItem, GameTeamColors teamColor) throws SQLException {
2018-07-06 15:30:00 +02:00
super(set, baseItem, teamColor);
this.setExtradata("0");
2018-07-06 15:30:00 +02:00
}
2019-05-26 20:14:53 +02:00
protected InteractionGameScoreboard(int id, int userId, Item item, String extradata, int limitedStack, int limitedSells, GameTeamColors teamColor) {
2018-07-06 15:30:00 +02:00
super(id, userId, item, extradata, limitedStack, limitedSells, teamColor);
this.setExtradata("0");
2018-07-06 15:30:00 +02:00
}
@Override
2019-05-26 20:14:53 +02:00
public void serializeExtradata(ServerMessage serverMessage) {
2018-07-06 15:30:00 +02:00
serverMessage.appendInt((this.isLimited() ? 256 : 0));
serverMessage.appendString(this.getExtradata());
super.serializeExtradata(serverMessage);
}
@Override
2019-05-26 20:14:53 +02:00
public void onPickUp(Room room) {
2018-07-06 15:30:00 +02:00
this.setExtradata("0");
}
}