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
7cf0e448
Commit
7cf0e448
authored
3 years ago
by
Melledy
Browse files
Options
Downloads
Patches
Plain Diff
World level updates without needing to restart
parent
9b729327
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/command/commands/SetWorldLevelCommand.java
+1
-1
1 addition, 1 deletion
...mu/grasscutter/command/commands/SetWorldLevelCommand.java
src/main/java/emu/grasscutter/game/GenshinPlayer.java
+5
-0
5 additions, 0 deletions
src/main/java/emu/grasscutter/game/GenshinPlayer.java
with
6 additions
and
1 deletion
src/main/java/emu/grasscutter/command/commands/SetWorldLevelCommand.java
+
1
−
1
View file @
7cf0e448
...
...
@@ -29,7 +29,7 @@ public final class SetWorldLevelCommand implements CommandHandler {
// Set in both world and player props
sender
.
getWorld
().
setWorldLevel
(
level
);
sender
.
set
Property
(
PlayerProperty
.
PROP_PLAYER_WORLD_LEVEL
,
level
);
sender
.
set
WorldLevel
(
level
);
sender
.
dropMessage
(
"World level set to "
+
level
+
"."
);
}
catch
(
NumberFormatException
ignored
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/emu/grasscutter/game/GenshinPlayer.java
+
5
−
0
View file @
7cf0e448
...
...
@@ -267,6 +267,11 @@ public class GenshinPlayer {
public
int
getWorldLevel
()
{
return
this
.
getProperty
(
PlayerProperty
.
PROP_PLAYER_WORLD_LEVEL
);
}
public
void
setWorldLevel
(
int
level
)
{
this
.
setProperty
(
PlayerProperty
.
PROP_PLAYER_WORLD_LEVEL
,
level
);
this
.
sendPacket
(
new
PacketPlayerPropNotify
(
this
,
PlayerProperty
.
PROP_PLAYER_WORLD_LEVEL
));
}
public
int
getPrimogems
()
{
return
this
.
getProperty
(
PlayerProperty
.
PROP_PLAYER_HCOIN
);
...
...
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