From 582d7af9c4ab370578e37c4977f412e701dcf5c1 Mon Sep 17 00:00:00 2001 From: Nazrin Date: Mon, 2 Oct 2023 07:56:09 -0700 Subject: [PATCH] Send QUEST_COND_STATE_NOT_EQUAL and QUEST_COND_STATE_EQUAL on login (#2394) --- src/main/java/emu/grasscutter/game/quest/QuestManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/emu/grasscutter/game/quest/QuestManager.java b/src/main/java/emu/grasscutter/game/quest/QuestManager.java index 0e9ae04a5..a2e3c56e1 100644 --- a/src/main/java/emu/grasscutter/game/quest/QuestManager.java +++ b/src/main/java/emu/grasscutter/game/quest/QuestManager.java @@ -295,6 +295,12 @@ public final class QuestManager extends BasePlayerManager { } public void enableQuests() { + GameData.getBeginCondQuestMap().keySet().forEach(x -> { + if (x.contains("QUEST_COND_STATE_NOT_EQUAL")) + this.triggerEvent(QuestCond.QUEST_COND_STATE_NOT_EQUAL, null, Integer.parseInt(x.substring(26))); + if (x.contains("QUEST_COND_STATE_EQUAL")) + this.triggerEvent(QuestCond.QUEST_COND_STATE_EQUAL, null, Integer.parseInt(x.substring(22))); + }); this.triggerEvent(QuestCond.QUEST_COND_NONE, null, 0); this.triggerEvent(QuestCond.QUEST_COND_PLAYER_LEVEL_EQUAL_GREATER, null, 1); }