mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-03-13 01:47:18 +08:00
Fix up pity tallies for new BannerTypes
Also fixes Beginner banner using Standard pity.
This commit is contained in:
parent
83b84408a1
commit
100d08ec5d
@ -5,6 +5,7 @@ import dev.morphia.annotations.Entity;
|
|||||||
@Entity
|
@Entity
|
||||||
public class PlayerGachaInfo {
|
public class PlayerGachaInfo {
|
||||||
private PlayerGachaBannerInfo standardBanner;
|
private PlayerGachaBannerInfo standardBanner;
|
||||||
|
private PlayerGachaBannerInfo beginnerBanner;
|
||||||
private PlayerGachaBannerInfo eventCharacterBanner;
|
private PlayerGachaBannerInfo eventCharacterBanner;
|
||||||
private PlayerGachaBannerInfo eventWeaponBanner;
|
private PlayerGachaBannerInfo eventWeaponBanner;
|
||||||
|
|
||||||
@ -15,26 +16,31 @@ public class PlayerGachaInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PlayerGachaBannerInfo getStandardBanner() {
|
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() {
|
public PlayerGachaBannerInfo getEventCharacterBanner() {
|
||||||
return eventCharacterBanner;
|
if (this.eventCharacterBanner == null) this.eventCharacterBanner = new PlayerGachaBannerInfo();
|
||||||
|
return this.eventCharacterBanner;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerGachaBannerInfo getEventWeaponBanner() {
|
public PlayerGachaBannerInfo getEventWeaponBanner() {
|
||||||
return eventWeaponBanner;
|
if (this.eventWeaponBanner == null) this.eventWeaponBanner = new PlayerGachaBannerInfo();
|
||||||
|
return this.eventWeaponBanner;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerGachaBannerInfo getBannerInfo(GachaBanner banner) {
|
public PlayerGachaBannerInfo getBannerInfo(GachaBanner banner) {
|
||||||
switch (banner.getBannerType()) {
|
return switch (banner.getBannerType()) {
|
||||||
case EVENT:
|
case STANDARD -> this.getStandardBanner();
|
||||||
return this.eventCharacterBanner;
|
case BEGINNER -> this.getBeginnerBanner();
|
||||||
case WEAPON:
|
case EVENT, CHARACTER, CHARACTER2 -> this.getEventCharacterBanner();
|
||||||
return this.eventWeaponBanner;
|
case WEAPON -> this.getEventWeaponBanner();
|
||||||
case STANDARD:
|
};
|
||||||
default:
|
|
||||||
return this.standardBanner;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user