Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grasscutter
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ziqian zhang
Grasscutter
Commits
af39613d
Commit
af39613d
authored
3 years ago
by
Melledy
Browse files
Options
Downloads
Patches
Plain Diff
Move server profile away from GameConstants
parent
e31a0c14
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/emu/grasscutter/GameConstants.java
+0
-6
0 additions, 6 deletions
src/main/java/emu/grasscutter/GameConstants.java
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
+7
-6
7 additions, 6 deletions
...tter/server/packet/send/PacketGetPlayerFriendListRsp.java
with
7 additions
and
12 deletions
src/main/java/emu/grasscutter/GameConstants.java
+
0
−
6
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
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
+
7
−
6
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment