mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:32:53 +08:00
Fix food decreasing (#1834)
* Update InventorySystem.java Fix some food didn't reduce after use. * Update InventorySystem.java
This commit is contained in:
parent
a520bc9416
commit
004a765e5b
@ -851,7 +851,8 @@ public class InventorySystem extends BaseGameSystem {
|
||||
switch (useData.getUseOp()) {
|
||||
case ITEM_USE_ADD_SERVER_BUFF -> {
|
||||
int buffId = Integer.parseInt(useData.getUseParam()[0]);
|
||||
float time = Float.parseFloat(useData.getUseParam()[1]);
|
||||
String timeString = useData.getUseParam()[1];
|
||||
float time = timeString.isEmpty() ? 0 : Float.parseFloat(timeString);
|
||||
|
||||
player.getBuffManager().addBuff(buffId, time);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user