Commit 100d08ec authored by AnimeGitB's avatar AnimeGitB
Browse files

Fix up pity tallies for new BannerTypes

Also fixes Beginner banner using Standard pity.
parent 83b84408
......@@ -5,6 +5,7 @@ import dev.morphia.annotations.Entity;
@Entity
public class PlayerGachaInfo {
private PlayerGachaBannerInfo standardBanner;
private PlayerGachaBannerInfo beginnerBanner;
private PlayerGachaBannerInfo eventCharacterBanner;
private PlayerGachaBannerInfo eventWeaponBanner;
......@@ -15,26 +16,31 @@ public class PlayerGachaInfo {
}
public PlayerGachaBannerInfo getStandardBanner() {
return standardBanner;
if (this.standardBanner == null) this.standardBanner = new PlayerGachaBannerInfo();
return this.standardBanner;
}
public PlayerGachaBannerInfo getBeginnerBanner() {
if (this.beginnerBanner == null) this.beginnerBanner = new PlayerGachaBannerInfo();
return this.beginnerBanner;
}
public PlayerGachaBannerInfo getEventCharacterBanner() {
return eventCharacterBanner;
if (this.eventCharacterBanner == null) this.eventCharacterBanner = new PlayerGachaBannerInfo();
return this.eventCharacterBanner;
}
public PlayerGachaBannerInfo getEventWeaponBanner() {
return eventWeaponBanner;
if (this.eventWeaponBanner == null) this.eventWeaponBanner = new PlayerGachaBannerInfo();
return this.eventWeaponBanner;
}
public PlayerGachaBannerInfo getBannerInfo(GachaBanner banner) {
switch (banner.getBannerType()) {
case EVENT:
return this.eventCharacterBanner;
case WEAPON:
return this.eventWeaponBanner;
case STANDARD:
default:
return this.standardBanner;
}
return switch (banner.getBannerType()) {
case STANDARD -> this.getStandardBanner();
case BEGINNER -> this.getBeginnerBanner();
case EVENT, CHARACTER, CHARACTER2 -> this.getEventCharacterBanner();
case WEAPON -> this.getEventWeaponBanner();
};
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment