diff --git a/src/main/java/emu/grasscutter/GameConstants.java b/src/main/java/emu/grasscutter/GameConstants.java index 4bebf9c81..dc07c32e1 100644 --- a/src/main/java/emu/grasscutter/GameConstants.java +++ b/src/main/java/emu/grasscutter/GameConstants.java @@ -11,13 +11,7 @@ public final class GameConstants { public static final int MAX_TEAMS = 4; public static final int MAIN_CHARACTER_MALE = 10000005; public static final int MAIN_CHARACTER_FEMALE = 10000007; - public static final String SERVER_AVATAR_NAME = Grasscutter.getConfig().getGameServerOptions().ServerNickname; - public static final int SERVER_AVATAR_ID = Grasscutter.getConfig().getGameServerOptions().ServerAvatarId; - public static final String SERVER_SIGNATURE = Grasscutter.getConfig().getGameServerOptions().ServerSignature; public static final Position START_POSITION = new Position(2747, 194, -1719); - public static final int SERVER_NAMECARD_ID = Grasscutter.getConfig().getGameServerOptions().ServerNameCardId; - public static final int SERVER_LEVEL = Grasscutter.getConfig().getGameServerOptions().ServerLevel; - public static final int SERVER_WORLD_LEVEL = Grasscutter.getConfig().getGameServerOptions().ServerWorldLevel; public static final int MAX_FRIENDS = 45; public static final int MAX_FRIEND_REQUESTS = 50; diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java b/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java index 781faf411..ff373140b 100644 --- a/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java @@ -1,6 +1,7 @@ package emu.grasscutter.server.packet.send; import emu.grasscutter.GameConstants; +import emu.grasscutter.Grasscutter; import emu.grasscutter.game.friends.Friendship; import emu.grasscutter.game.player.Player; import emu.grasscutter.net.packet.BasePacket; @@ -18,13 +19,13 @@ public class PacketGetPlayerFriendListRsp extends BasePacket { FriendBrief serverFriend = FriendBrief.newBuilder() .setUid(GameConstants.SERVER_CONSOLE_UID) - .setNickname(GameConstants.SERVER_AVATAR_NAME) - .setLevel(GameConstants.SERVER_LEVEL) - .setProfilePicture(ProfilePicture.newBuilder().setAvatarId(GameConstants.SERVER_AVATAR_ID)) - .setWorldLevel(GameConstants.SERVER_WORLD_LEVEL) - .setSignature(GameConstants.SERVER_SIGNATURE) + .setNickname(Grasscutter.getConfig().getGameServerOptions().ServerNickname) + .setLevel(Grasscutter.getConfig().getGameServerOptions().ServerLevel) + .setProfilePicture(ProfilePicture.newBuilder().setAvatarId(Grasscutter.getConfig().getGameServerOptions().ServerAvatarId)) + .setWorldLevel(Grasscutter.getConfig().getGameServerOptions().ServerWorldLevel) + .setSignature(Grasscutter.getConfig().getGameServerOptions().ServerSignature) .setLastActiveTime((int) (System.currentTimeMillis() / 1000f)) - .setNameCardId(GameConstants.SERVER_NAMECARD_ID) + .setNameCardId(Grasscutter.getConfig().getGameServerOptions().ServerNameCardId) .setOnlineState(FriendOnlineState.FRIEND_ONLINE) .setParam(1) .setIsGameSource(true)