mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
feat: support multiplayer mode in teapot (#2317)
This commit is contained in:
@@ -3,8 +3,11 @@ package emu.grasscutter.game.friends;
|
||||
import dev.morphia.annotations.AlsoLoad;
|
||||
import dev.morphia.annotations.Entity;
|
||||
import dev.morphia.annotations.Transient;
|
||||
import emu.grasscutter.game.home.GameHome;
|
||||
import emu.grasscutter.game.player.Player;
|
||||
import emu.grasscutter.net.proto.FriendEnterHomeOptionOuterClass;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
import lombok.Getter;
|
||||
|
||||
@Entity
|
||||
public class PlayerProfile {
|
||||
@@ -17,11 +20,12 @@ public class PlayerProfile {
|
||||
private int avatarId;
|
||||
private String name;
|
||||
private String signature;
|
||||
private int achievements;
|
||||
|
||||
private int playerLevel;
|
||||
private int worldLevel;
|
||||
private int lastActiveTime;
|
||||
@Getter
|
||||
private int enterHomeOption;
|
||||
|
||||
@Deprecated // Morphia only
|
||||
public PlayerProfile() {}
|
||||
@@ -59,10 +63,6 @@ public class PlayerProfile {
|
||||
return signature;
|
||||
}
|
||||
|
||||
public int getAchievements() {
|
||||
return achievements;
|
||||
}
|
||||
|
||||
public int getPlayerLevel() {
|
||||
return playerLevel;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class PlayerProfile {
|
||||
this.nameCard = player.getNameCardId();
|
||||
this.playerLevel = player.getLevel();
|
||||
this.worldLevel = player.getWorldLevel();
|
||||
// this.achievements = 0;
|
||||
this.enterHomeOption = player.tryGetHome().map(GameHome::getEnterHomeOption).orElse(FriendEnterHomeOptionOuterClass.FriendEnterHomeOption.FRIEND_ENTER_HOME_OPTION_REFUSE_VALUE);
|
||||
this.updateLastActiveTime();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user