mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
Update gifts manager
This commit is contained in:
@@ -7,9 +7,8 @@ import lombok.*;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class Gift {
|
||||
public static final Gift UNDEFINED = new Gift(-1, "undefined", -1, "", null);
|
||||
public static final Gift UNDEFINED = new Gift(-1, "undefined", -1, "");
|
||||
|
||||
private final int id;
|
||||
|
||||
@@ -21,28 +20,21 @@ public class Gift {
|
||||
|
||||
private final JsonObject properties;
|
||||
|
||||
public Gift(int id, String name, int diamondCost, String pictureLink, JsonObject properties) {
|
||||
public Gift(int id, String name, int diamondCost, Picture pictureLink, JsonObject properties) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.diamondCost = diamondCost;
|
||||
this.picture = new Picture(pictureLink);
|
||||
this.picture = pictureLink;
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
|
||||
public Gift(int id, String name, int diamondCost, String pictureLink) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.diamondCost = diamondCost;
|
||||
this.picture = new Picture(pictureLink);
|
||||
this.properties = new JsonObject();
|
||||
this(id, name, diamondCost, new Picture(pictureLink), new JsonObject());
|
||||
}
|
||||
|
||||
public Gift(int id, String name, int diamondCost, Picture picture) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.diamondCost = diamondCost;
|
||||
this.picture = picture;
|
||||
this.properties = new JsonObject();
|
||||
this(id, name, diamondCost, picture, new JsonObject());
|
||||
}
|
||||
|
||||
public boolean hasDiamondCostRange(int minimalCost, int maximalCost) {
|
||||
|
||||
Reference in New Issue
Block a user