Move server profile away from GameConstants

This commit is contained in:
Melledy 2022-05-06 19:16:36 -07:00
parent e31a0c14ec
commit af39613d4f
2 changed files with 7 additions and 12 deletions

View File

@ -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;

View File

@ -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)