From 84e3823695a0e1ee761f486bf2e5a8d089aace82 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Wed, 31 May 2023 23:34:43 -0400 Subject: [PATCH] Potentially fix issues with regions --- .../emu/grasscutter/game/player/Player.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/player/Player.java b/src/main/java/emu/grasscutter/game/player/Player.java index df03e8d65..92577ffa2 100644 --- a/src/main/java/emu/grasscutter/game/player/Player.java +++ b/src/main/java/emu/grasscutter/game/player/Player.java @@ -710,12 +710,9 @@ public class Player implements PlayerHook, FieldFetch { this.getQuestManager().forEachActiveQuest(quest -> { if (quest.getTriggerData() != null && quest.getTriggers().containsKey("ENTER_REGION_"+ region.config_id)) { - // If trigger hasn't been fired yet - if (!Boolean.TRUE.equals(quest.getTriggers().put("ENTER_REGION_" + region.config_id, true))) { - this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify()); - this.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_TRIGGER_FIRE, - quest.getTriggerData().get("ENTER_REGION_" + region.config_id).getId(), 0); - } + this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify()); + this.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_TRIGGER_FIRE, + quest.getTriggerData().get("ENTER_REGION_" + region.config_id).getId(), 0); } }); @@ -724,12 +721,9 @@ public class Player implements PlayerHook, FieldFetch { public void onLeaveRegion(SceneRegion region) { this.getQuestManager().forEachActiveQuest(quest -> { if (quest.getTriggers().containsKey("LEAVE_REGION_" + region.config_id)) { - // If trigger hasn't been fired yet - if (!Boolean.TRUE.equals(quest.getTriggers().put("LEAVE_REGION_" + region.config_id, true))) { - this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify()); - this.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_TRIGGER_FIRE, - quest.getTriggerData().get("LEAVE_REGION_" + region.config_id).getId(), 0); - } + this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify()); + this.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_TRIGGER_FIRE, + quest.getTriggerData().get("LEAVE_REGION_" + region.config_id).getId(), 0); } }); }