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
84d02370
Commit
84d02370
authored
2 years ago
by
AnimeGitB
Browse files
Options
Downloads
Patches
Plain Diff
Change logging level on item use from info to debug
parent
cf67c44f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/emu/grasscutter/game/systems/InventorySystem.java
+4
-4
4 additions, 4 deletions
...in/java/emu/grasscutter/game/systems/InventorySystem.java
with
4 additions
and
4 deletions
src/main/java/emu/grasscutter/game/systems/InventorySystem.java
+
4
−
4
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
))
...
...
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