Commit afa3747f authored by Scald's avatar Scald Committed by GitHub
Browse files

Add config option to change console server's signature, namecard, level and world level (#586)

* Add files via upload

* Add files via upload

* Update GameConstants.java

* Update Config.java

* Update PacketGetPlayerFriendListRsp.java
parent 0152b146
......@@ -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!";
......
......@@ -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;
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment