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

Loading…
Cancel
Save