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
29f9d650
Commit
29f9d650
authored
May 07, 2022
by
gentlespoon
Committed by
Melledy
May 07, 2022
Browse files
Make stamina consumption classes public so others can use.
parent
836e0150
Changes
4
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/managers/StaminaManager/Consumption.java
0 → 100644
View file @
29f9d650
package
emu.grasscutter.game.managers.StaminaManager
;
public
class
Consumption
{
public
ConsumptionType
consumptionType
;
public
int
amount
;
public
Consumption
(
ConsumptionType
ct
,
int
a
)
{
consumptionType
=
ct
;
amount
=
a
;
}
public
Consumption
(
ConsumptionType
ct
)
{
this
(
ct
,
ct
.
amount
);
}
}
src/main/java/emu/grasscutter/game/managers/StaminaManager/ConsumptionType.java
0 → 100644
View file @
29f9d650
package
emu.grasscutter.game.managers.StaminaManager
;
public
enum
ConsumptionType
{
None
(
0
),
// consume
CLIMB_START
(-
500
),
CLIMBING
(-
150
),
CLIMB_JUMP
(-
2500
),
SPRINT
(-
1800
),
DASH
(-
360
),
FLY
(-
60
),
SWIM_DASH_START
(-
200
),
SWIM_DASH
(-
200
),
SWIMMING
(-
80
),
FIGHT
(
0
),
// restore
STANDBY
(
500
),
RUN
(
500
),
WALK
(
500
),
STANDBY_MOVE
(
500
),
POWERED_FLY
(
500
);
public
final
int
amount
;
ConsumptionType
(
int
amount
)
{
this
.
amount
=
amount
;
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/game/managers/StaminaManager.java
→
src/main/java/emu/grasscutter/game/managers/StaminaManager
/StaminaManager
.java
View file @
29f9d650
package
emu.grasscutter.game.managers
;
package
emu.grasscutter.game.managers
.StaminaManager
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.game.entity.EntityAvatar
;
import
emu.grasscutter.game.entity.EntityAvatar
;
...
@@ -35,48 +35,8 @@ public class StaminaManager {
...
@@ -35,48 +35,8 @@ public class StaminaManager {
private
int
staminaRecoverDelay
=
0
;
private
int
staminaRecoverDelay
=
0
;
private
boolean
isInSkillMove
=
false
;
private
boolean
isInSkillMove
=
false
;
private
enum
ConsumptionType
{
None
(
0
),
// consume
CLIMB_START
(-
500
),
CLIMBING
(-
150
),
CLIMB_JUMP
(-
2500
),
SPRINT
(-
1800
),
DASH
(-
360
),
FLY
(-
60
),
SWIM_DASH_START
(-
200
),
SWIM_DASH
(-
200
),
SWIMMING
(-
80
),
FIGHT
(
0
),
// restore
STANDBY
(
500
),
RUN
(
500
),
WALK
(
500
),
STANDBY_MOVE
(
500
),
POWERED_FLY
(
500
);
public
final
int
amount
;
ConsumptionType
(
int
amount
)
{
this
.
amount
=
amount
;
}
}
private
class
Consumption
{
public
ConsumptionType
consumptionType
;
public
int
amount
;
public
Consumption
(
ConsumptionType
ct
,
int
a
)
{
consumptionType
=
ct
;
amount
=
a
;
}
public
Consumption
(
ConsumptionType
ct
)
{
this
(
ct
,
ct
.
amount
);
}
}
public
boolean
getIsInSkillMove
()
{
public
boolean
getIsInSkillMove
()
{
return
isInSkillMove
;
return
isInSkillMove
;
...
...
src/main/java/emu/grasscutter/game/player/Player.java
View file @
29f9d650
...
@@ -22,7 +22,7 @@ import emu.grasscutter.game.inventory.GameItem;
...
@@ -22,7 +22,7 @@ import emu.grasscutter.game.inventory.GameItem;
import
emu.grasscutter.game.inventory.Inventory
;
import
emu.grasscutter.game.inventory.Inventory
;
import
emu.grasscutter.game.mail.Mail
;
import
emu.grasscutter.game.mail.Mail
;
import
emu.grasscutter.game.mail.MailHandler
;
import
emu.grasscutter.game.mail.MailHandler
;
import
emu.grasscutter.game.managers.StaminaManager
;
import
emu.grasscutter.game.managers.StaminaManager
.StaminaManager
;
import
emu.grasscutter.game.managers.SotSManager
;
import
emu.grasscutter.game.managers.SotSManager
;
import
emu.grasscutter.game.props.ActionReason
;
import
emu.grasscutter.game.props.ActionReason
;
import
emu.grasscutter.game.props.EntityType
;
import
emu.grasscutter.game.props.EntityType
;
...
...
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