Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
af39613d
Commit
af39613d
authored
May 06, 2022
by
Melledy
Browse files
Move server profile away from GameConstants
parent
e31a0c14
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/GameConstants.java
View file @
af39613d
...
...
@@ -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
;
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
View file @
af39613d
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
(
G
ameConstants
.
SERVER_AVATAR_NAME
)
.
setLevel
(
G
ameConstants
.
SERVER_LEVEL
)
.
setProfilePicture
(
ProfilePicture
.
newBuilder
().
setAvatarId
(
G
ameConstants
.
SERVER_AVATAR_ID
))
.
setWorldLevel
(
G
ameConstants
.
SERVER_WORLD_LEVEL
)
.
setSignature
(
G
ameConstants
.
SERVER_SIGNATURE
)
.
setNickname
(
G
rasscutter
.
getConfig
().
getGameServerOptions
().
ServerNickname
)
.
setLevel
(
G
rasscutter
.
getConfig
().
getGameServerOptions
().
ServerLevel
)
.
setProfilePicture
(
ProfilePicture
.
newBuilder
().
setAvatarId
(
G
rasscutter
.
getConfig
().
getGameServerOptions
().
ServerAvatarId
))
.
setWorldLevel
(
G
rasscutter
.
getConfig
().
getGameServerOptions
().
ServerWorldLevel
)
.
setSignature
(
G
rasscutter
.
getConfig
().
getGameServerOptions
().
ServerSignature
)
.
setLastActiveTime
((
int
)
(
System
.
currentTimeMillis
()
/
1000
f
))
.
setNameCardId
(
G
ameConstants
.
SERVER_NAMECARD_ID
)
.
setNameCardId
(
G
rasscutter
.
getConfig
().
getGameServerOptions
().
ServerNameCardId
)
.
setOnlineState
(
FriendOnlineState
.
FRIEND_ONLINE
)
.
setParam
(
1
)
.
setIsGameSource
(
true
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment