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
84d02370
Commit
84d02370
authored
Oct 17, 2022
by
AnimeGitB
Browse files
Change logging level on item use from info to debug
parent
cf67c44f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/systems/InventorySystem.java
View file @
84d02370
...
...
@@ -734,7 +734,7 @@ public class InventorySystem extends BaseGameSystem {
// Uses an item from the player's inventory.
public
synchronized
GameItem
useItem
(
Player
player
,
long
targetGuid
,
long
itemGuid
,
int
count
,
int
optionId
,
boolean
isEnterMpDungeonTeam
)
{
Grasscutter
.
getLogger
().
info
(
"Attempting to use item from inventory"
);
Grasscutter
.
getLogger
().
debug
(
"Attempting to use item from inventory"
);
Avatar
target
=
player
.
getAvatars
().
getAvatarByGuid
(
targetGuid
);
GameItem
item
=
player
.
getInventory
().
getItemByGuid
(
itemGuid
);
if
(
item
==
null
)
return
null
;
...
...
@@ -748,10 +748,10 @@ public class InventorySystem extends BaseGameSystem {
var
actions
=
itemData
.
getItemUseActions
();
if
(
actions
!=
null
)
actions
.
forEach
(
use
->
use
.
postUseItem
(
params
));
Grasscutter
.
getLogger
().
info
(
"Item use succeeded!"
);
Grasscutter
.
getLogger
().
debug
(
"Item use succeeded!"
);
return
item
;
}
else
{
Grasscutter
.
getLogger
().
info
(
"Item use failed!"
);
Grasscutter
.
getLogger
().
debug
(
"Item use failed!"
);
return
null
;
}
}
...
...
@@ -791,7 +791,7 @@ public class InventorySystem extends BaseGameSystem {
// Use
var
actions
=
itemData
.
getItemUseActions
();
Grasscutter
.
getLogger
().
info
(
"Using - actions - {}"
,
actions
);
Grasscutter
.
getLogger
().
debug
(
"Using - actions - {}"
,
actions
);
if
(
actions
==
null
)
return
true
;
// Maybe returning false would be more appropriate?
return
actions
.
stream
()
.
map
(
use
->
use
.
useItem
(
params
))
...
...
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