diff --git a/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java b/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java index f40ff03c0..9c320e8f4 100644 --- a/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java +++ b/src/main/java/emu/grasscutter/game/quest/GameMainQuest.java @@ -167,7 +167,7 @@ public class GameMainQuest { boolean didRewind = false; for (GameQuest quest : sortedByOrder) { int i = sortedByOrder.indexOf(quest); - if ( i == sortedByOrder.size()) { + if ( (i+1) >= sortedByOrder.size()) { didRewind = quest.rewind(null); } else { didRewind = quest.rewind(sortedByOrder.get(i+1)); diff --git a/src/main/java/emu/grasscutter/game/systems/InventorySystem.java b/src/main/java/emu/grasscutter/game/systems/InventorySystem.java index 23876aa6d..0cd2f4def 100644 --- a/src/main/java/emu/grasscutter/game/systems/InventorySystem.java +++ b/src/main/java/emu/grasscutter/game/systems/InventorySystem.java @@ -778,7 +778,7 @@ public class InventorySystem extends BaseGameSystem { } int[] satiationParams = itemData.getSatiationParams(); - if (satiationParams != null && target.isPresent()) { + if (satiationParams != null && satiationParams.length > 0 && target.isPresent()) { // Invoke and call player use food event. var event = new PlayerUseFoodEvent(params.player, itemData, params.targetAvatar.getAsEntity()); event.call(); if (event.isCanceled()) return false;