diff --git a/src/main/java/emu/grasscutter/Config.java b/src/main/java/emu/grasscutter/Config.java index c911a1cf0..f31d3b7cc 100644 --- a/src/main/java/emu/grasscutter/Config.java +++ b/src/main/java/emu/grasscutter/Config.java @@ -82,6 +82,10 @@ public final class Config { public boolean WatchGacha = false; public String ServerNickname = "Server"; public int ServerAvatarId = 10000007; + public int ServerNameCardId = 210001; + public int ServerLevel = 1; + public int ServerWorldLevel = 1; + public String ServerSignature = "Server Signature"; public int[] WelcomeEmotes = {2007, 1002, 4010}; public String WelcomeMotd = "Welcome to Grasscutter emu"; public String WelcomeMailTitle = "Welcome to Grasscutter!"; diff --git a/src/main/java/emu/grasscutter/GameConstants.java b/src/main/java/emu/grasscutter/GameConstants.java index 39b28b736..4bebf9c81 100644 --- a/src/main/java/emu/grasscutter/GameConstants.java +++ b/src/main/java/emu/grasscutter/GameConstants.java @@ -13,7 +13,11 @@ public final class GameConstants { 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 d7a9427b8..781faf411 100644 --- a/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java @@ -19,12 +19,12 @@ public class PacketGetPlayerFriendListRsp extends BasePacket { FriendBrief serverFriend = FriendBrief.newBuilder() .setUid(GameConstants.SERVER_CONSOLE_UID) .setNickname(GameConstants.SERVER_AVATAR_NAME) - .setLevel(1) + .setLevel(GameConstants.SERVER_LEVEL) .setProfilePicture(ProfilePicture.newBuilder().setAvatarId(GameConstants.SERVER_AVATAR_ID)) - .setWorldLevel(0) - .setSignature("") + .setWorldLevel(GameConstants.SERVER_WORLD_LEVEL) + .setSignature(GameConstants.SERVER_SIGNATURE) .setLastActiveTime((int) (System.currentTimeMillis() / 1000f)) - .setNameCardId(210001) + .setNameCardId(GameConstants.SERVER_NAMECARD_ID) .setOnlineState(FriendOnlineState.FRIEND_ONLINE) .setParam(1) .setIsGameSource(true)