Browse Source

donate stats fix v4

master
gsd 1 year ago
parent
commit
b6e39de122
  1. 10
      src/main/java/app/entities/db/DonateStat.java

10
src/main/java/app/entities/db/DonateStat.java

@ -45,13 +45,13 @@ public class DonateStat {
}
@JsonValue
public Integer getKeys() {
public Integer getTF2Keys() {
if (this.giveMethod == VipGiveMethod.STEAM) return Integer.valueOf(this.reserved.split(";")[0].split("=")[1]);
return 0;
}
@JsonValue
public Integer getRefs() {
public Integer getTF2Refs() {
if (this.giveMethod == VipGiveMethod.STEAM) return Integer.valueOf(this.reserved.split(";")[1].split("=")[1]);
return 0;
}
@ -67,8 +67,8 @@ public class DonateStat {
}
case STEAM -> {
return "Оплачено инвентарём: "
+ (getKeys() > 0?getKeys().toString() + " ключ":"")
+ (getRefs() > 0?getRefs().toString() + " рефов":"");
+ (getTF2Keys() > 0?getTF2Keys().toString() + " ключ":"")
+ (getTF2Refs() > 0?getTF2Refs().toString() + " рефов":"");
}
case MANUAL -> {
return "Выдана админом";
@ -81,7 +81,7 @@ public class DonateStat {
}
@JsonValue
public String getHasExtended() {
public String getBeExtended() {
return extended?"Была продлена":"";
}
}

Loading…
Cancel
Save