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

39 lines
977 B
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.wired;
public class WiredGiveRewardItem
{
public final int id;
public final boolean badge;
public final String data;
public final int probability;
public WiredGiveRewardItem(int id, boolean badge, String data, int probability)
{
this.id = id;
this.badge = badge;
this.data = data;
this.probability = probability;
}
public WiredGiveRewardItem(String dataString)
{
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
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
}
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
}
}