2022-04-17 12:43:07 +00:00
|
|
|
package emu.grasscutter.game.gacha;
|
|
|
|
|
2022-04-22 02:19:47 +00:00
|
|
|
import dev.morphia.annotations.Entity;
|
|
|
|
|
|
|
|
@Entity
|
2022-04-17 12:43:07 +00:00
|
|
|
public class PlayerGachaInfo {
|
2022-11-25 15:33:11 +00:00
|
|
|
private PlayerGachaBannerInfo standardBanner;
|
|
|
|
private PlayerGachaBannerInfo beginnerBanner;
|
|
|
|
private PlayerGachaBannerInfo eventCharacterBanner;
|
|
|
|
private PlayerGachaBannerInfo eventWeaponBanner;
|
|
|
|
|
|
|
|
public PlayerGachaInfo() {
|
|
|
|
this.standardBanner = new PlayerGachaBannerInfo();
|
|
|
|
this.eventCharacterBanner = new PlayerGachaBannerInfo();
|
|
|
|
this.eventWeaponBanner = new PlayerGachaBannerInfo();
|
|
|
|
}
|
|
|
|
|
|
|
|
public PlayerGachaBannerInfo getStandardBanner() {
|
|
|
|
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() {
|
|
|
|
if (this.eventCharacterBanner == null) this.eventCharacterBanner = new PlayerGachaBannerInfo();
|
|
|
|
return this.eventCharacterBanner;
|
|
|
|
}
|
|
|
|
|
|
|
|
public PlayerGachaBannerInfo getEventWeaponBanner() {
|
|
|
|
if (this.eventWeaponBanner == null) this.eventWeaponBanner = new PlayerGachaBannerInfo();
|
|
|
|
return this.eventWeaponBanner;
|
|
|
|
}
|
|
|
|
|
|
|
|
public PlayerGachaBannerInfo getBannerInfo(GachaBanner banner) {
|
|
|
|
return switch (banner.getBannerType()) {
|
|
|
|
case STANDARD -> this.getStandardBanner();
|
|
|
|
case BEGINNER -> this.getBeginnerBanner();
|
|
|
|
case EVENT, CHARACTER, CHARACTER2 -> this.getEventCharacterBanner();
|
|
|
|
case WEAPON -> this.getEventWeaponBanner();
|
|
|
|
};
|
|
|
|
}
|
2022-04-17 12:43:07 +00:00
|
|
|
}
|