mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-29 04:53:33 +00:00
91b685586e
1. During the conversion of Morphia calls to the new API, some of the `Filter.eq()` calls had their `field` set to `playerId` due to a copy/paste typo. 2. Morphia 2 switches to the codec system, so anything that will be serialized in the pipeline requires the `@Entity` annotation.
41 lines
1008 B
Java
41 lines
1008 B
Java
package emu.grasscutter.game.gacha;
|
|
|
|
import dev.morphia.annotations.Entity;
|
|
|
|
@Entity
|
|
public class PlayerGachaInfo {
|
|
private PlayerGachaBannerInfo standardBanner;
|
|
private PlayerGachaBannerInfo eventCharacterBanner;
|
|
private PlayerGachaBannerInfo eventWeaponBanner;
|
|
|
|
public PlayerGachaInfo() {
|
|
this.standardBanner = new PlayerGachaBannerInfo();
|
|
this.eventCharacterBanner = new PlayerGachaBannerInfo();
|
|
this.eventWeaponBanner = new PlayerGachaBannerInfo();
|
|
}
|
|
|
|
public PlayerGachaBannerInfo getStandardBanner() {
|
|
return standardBanner;
|
|
}
|
|
|
|
public PlayerGachaBannerInfo getEventCharacterBanner() {
|
|
return eventCharacterBanner;
|
|
}
|
|
|
|
public PlayerGachaBannerInfo getEventWeaponBanner() {
|
|
return 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;
|
|
}
|
|
}
|
|
}
|