Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/wired/WiredGiveRewardItem.java

34 lines
961 B
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.wired;
2019-05-26 20:14:53 +02:00
public class WiredGiveRewardItem {
2018-07-06 15:30:00 +02:00
public final int id;
public final boolean badge;
public final String data;
public final int probability;
2019-05-26 20:14:53 +02:00
public WiredGiveRewardItem(int id, boolean badge, String data, int probability) {
2018-07-06 15:30:00 +02:00
this.id = id;
this.badge = badge;
this.data = data;
this.probability = probability;
}
2019-05-26 20:14:53 +02:00
public WiredGiveRewardItem(String dataString) {
2018-07-06 15:30:00 +02:00
String[] data = dataString.split(",");
this.id = Integer.valueOf(data[0]);
this.badge = data[1].equalsIgnoreCase("0");
this.data = data[2];
this.probability = Integer.valueOf(data[3]);
}
@Override
2019-05-26 20:14:53 +02:00
public String toString() {
2019-03-18 02:22:00 +01:00
return this.id + "," + (this.badge ? 0 : 1) + "," + this.data + "," + this.probability;
2018-07-06 15:30:00 +02:00
}
2019-05-26 20:14:53 +02:00
public String wiredString() {
2019-03-18 02:22:00 +01:00
return (this.badge ? 0 : 1) + "," + this.data + "," + this.probability;
2018-07-06 15:30:00 +02:00
}
}