mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-05-08 21:15:54 +08:00
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.
27 lines
460 B
Java
27 lines
460 B
Java
package emu.grasscutter.game.avatar;
|
|
|
|
import dev.morphia.annotations.Entity;
|
|
|
|
@Entity
|
|
public class AvatarProfileData {
|
|
private int avatarId;
|
|
private int level;
|
|
|
|
public AvatarProfileData(GenshinAvatar avatar) {
|
|
this.update(avatar);
|
|
}
|
|
|
|
public int getAvatarId() {
|
|
return avatarId;
|
|
}
|
|
|
|
public int getLevel() {
|
|
return level;
|
|
}
|
|
|
|
public void update(GenshinAvatar avatar) {
|
|
this.avatarId = avatar.getAvatarId();
|
|
this.level = avatar.getLevel();
|
|
}
|
|
}
|