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
9671a76a
Commit
9671a76a
authored
Sep 17, 2022
by
AnimeGitB
Browse files
character and companionship exp gain to party not active character
fixes #1787
parent
08fdcf6e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/inventory/Inventory.java
View file @
9671a76a
...
@@ -273,11 +273,15 @@ public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
...
@@ -273,11 +273,15 @@ public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
private
void
addVirtualItem
(
int
itemId
,
int
count
)
{
private
void
addVirtualItem
(
int
itemId
,
int
count
)
{
switch
(
itemId
)
{
switch
(
itemId
)
{
case
101
->
// Character exp
case
101
->
// Character exp
this
.
player
.
getServer
().
getInventorySystem
().
upgradeAvatar
(
this
.
player
,
this
.
player
.
getTeamManager
().
getCurrentAvatarEntity
().
getAvatar
(),
count
);
this
.
player
.
getTeamManager
().
getActiveTeam
().
stream
().
map
(
e
->
e
.
getAvatar
()).
forEach
(
avatar
->
this
.
player
.
getServer
().
getInventorySystem
().
upgradeAvatar
(
this
.
player
,
avatar
,
count
)
);
case
102
->
// Adventure exp
case
102
->
// Adventure exp
this
.
player
.
addExpDirectly
(
count
);
this
.
player
.
addExpDirectly
(
count
);
case
105
->
// Companionship exp
case
105
->
// Companionship exp
this
.
player
.
getServer
().
getInventorySystem
().
upgradeAvatarFetterLevel
(
this
.
player
,
this
.
player
.
getTeamManager
().
getCurrentAvatarEntity
().
getAvatar
(),
count
);
this
.
player
.
getTeamManager
().
getActiveTeam
().
stream
().
map
(
e
->
e
.
getAvatar
()).
forEach
(
avatar
->
this
.
player
.
getServer
().
getInventorySystem
().
upgradeAvatarFetterLevel
(
this
.
player
,
avatar
,
count
*
(
this
.
player
.
isInMultiplayer
()
?
2
:
1
))
);
case
106
->
// Resin
case
106
->
// Resin
this
.
player
.
getResinManager
().
addResin
(
count
);
this
.
player
.
getResinManager
().
addResin
(
count
);
case
107
->
// Legendary Key
case
107
->
// Legendary Key
...
...
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