diff --git a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java index 76298df0c..94d6a4185 100644 --- a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java +++ b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateEqual.java @@ -20,6 +20,9 @@ public class ConditionStateEqual extends BaseCondition { var questStateValue = condition.getParam()[1]; var checkQuest = owner.getQuestManager().getQuestById(questId); - return checkQuest != null && checkQuest.getState().getValue() == questStateValue; + if (checkQuest == null) { + return questStateValue == 0; + } + return checkQuest.getState().getValue() == questStateValue; } } diff --git a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateNotEqual.java b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateNotEqual.java index 946ef7420..4c06ac627 100644 --- a/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateNotEqual.java +++ b/src/main/java/emu/grasscutter/game/quest/conditions/ConditionStateNotEqual.java @@ -20,6 +20,9 @@ public class ConditionStateNotEqual extends BaseCondition { var questStateValue = condition.getParam()[1]; var checkQuest = owner.getQuestManager().getQuestById(questId); - return checkQuest != null && checkQuest.getState().getValue() != questStateValue; + if (checkQuest == null) { + return questStateValue != 0; + } + return checkQuest.getState().getValue() != questStateValue; } }