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
0ea0eab6
Commit
0ea0eab6
authored
3 years ago
by
gentlespoon
Committed by
Melledy
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Stamina will be set to full if Stamina is disabled.
parent
c424d15b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/emu/grasscutter/game/managers/StaminaManager/StaminaManager.java
+10
-10
10 additions, 10 deletions
...sscutter/game/managers/StaminaManager/StaminaManager.java
with
10 additions
and
10 deletions
src/main/java/emu/grasscutter/game/managers/StaminaManager/StaminaManager.java
+
10
−
10
View file @
0ea0eab6
...
...
@@ -190,7 +190,9 @@ public class StaminaManager {
// Returns new stamina and sends PlayerPropNotify
public
int
setStamina
(
GameSession
session
,
String
reason
,
int
newStamina
)
{
if
(
Grasscutter
.
getConfig
().
OpenStamina
)
{
if
(!
Grasscutter
.
getConfig
().
OpenStamina
)
{
newStamina
=
player
.
getProperty
(
PlayerProperty
.
PROP_MAX_STAMINA
);
}
// set stamina
player
.
setProperty
(
PlayerProperty
.
PROP_CUR_PERSIST_STAMINA
,
newStamina
);
session
.
send
(
new
PacketPlayerPropNotify
(
player
,
PlayerProperty
.
PROP_CUR_PERSIST_STAMINA
));
...
...
@@ -200,8 +202,6 @@ public class StaminaManager {
}
return
newStamina
;
}
return
player
.
getProperty
(
PlayerProperty
.
PROP_CUR_PERSIST_STAMINA
);
}
// Kills avatar, removes entity and sends notification.
// TODO: Probably move this to Avatar class? since other components may also need to kill avatar.
...
...
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