mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:32:53 +08:00
Change logging level on item use from info to debug
This commit is contained in:
parent
cf67c44f22
commit
84d02370df
@ -734,7 +734,7 @@ public class InventorySystem extends BaseGameSystem {
|
|||||||
|
|
||||||
// Uses an item from the player's inventory.
|
// Uses an item from the player's inventory.
|
||||||
public synchronized GameItem useItem(Player player, long targetGuid, long itemGuid, int count, int optionId, boolean isEnterMpDungeonTeam) {
|
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);
|
Avatar target = player.getAvatars().getAvatarByGuid(targetGuid);
|
||||||
GameItem item = player.getInventory().getItemByGuid(itemGuid);
|
GameItem item = player.getInventory().getItemByGuid(itemGuid);
|
||||||
if (item == null) return null;
|
if (item == null) return null;
|
||||||
@ -748,10 +748,10 @@ public class InventorySystem extends BaseGameSystem {
|
|||||||
var actions = itemData.getItemUseActions();
|
var actions = itemData.getItemUseActions();
|
||||||
if (actions != null)
|
if (actions != null)
|
||||||
actions.forEach(use -> use.postUseItem(params));
|
actions.forEach(use -> use.postUseItem(params));
|
||||||
Grasscutter.getLogger().info("Item use succeeded!");
|
Grasscutter.getLogger().debug("Item use succeeded!");
|
||||||
return item;
|
return item;
|
||||||
} else {
|
} else {
|
||||||
Grasscutter.getLogger().info("Item use failed!");
|
Grasscutter.getLogger().debug("Item use failed!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -791,7 +791,7 @@ public class InventorySystem extends BaseGameSystem {
|
|||||||
|
|
||||||
// Use
|
// Use
|
||||||
var actions = itemData.getItemUseActions();
|
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?
|
if (actions == null) return true; // Maybe returning false would be more appropriate?
|
||||||
return actions.stream()
|
return actions.stream()
|
||||||
.map(use -> use.useItem(params))
|
.map(use -> use.useItem(params))
|
||||||
|
Loading…
Reference in New Issue
Block a user