mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-21 18:58:19 +00:00
Potentially fix issues with regions
This commit is contained in:
parent
083e9ba422
commit
84e3823695
@ -710,12 +710,9 @@ public class Player implements PlayerHook, FieldFetch {
|
|||||||
this.getQuestManager().forEachActiveQuest(quest -> {
|
this.getQuestManager().forEachActiveQuest(quest -> {
|
||||||
if (quest.getTriggerData() != null &&
|
if (quest.getTriggerData() != null &&
|
||||||
quest.getTriggers().containsKey("ENTER_REGION_"+ region.config_id)) {
|
quest.getTriggers().containsKey("ENTER_REGION_"+ region.config_id)) {
|
||||||
// If trigger hasn't been fired yet
|
this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify());
|
||||||
if (!Boolean.TRUE.equals(quest.getTriggers().put("ENTER_REGION_" + region.config_id, true))) {
|
this.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_TRIGGER_FIRE,
|
||||||
this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify());
|
quest.getTriggerData().get("ENTER_REGION_" + region.config_id).getId(), 0);
|
||||||
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) {
|
public void onLeaveRegion(SceneRegion region) {
|
||||||
this.getQuestManager().forEachActiveQuest(quest -> {
|
this.getQuestManager().forEachActiveQuest(quest -> {
|
||||||
if (quest.getTriggers().containsKey("LEAVE_REGION_" + region.config_id)) {
|
if (quest.getTriggers().containsKey("LEAVE_REGION_" + region.config_id)) {
|
||||||
// If trigger hasn't been fired yet
|
this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify());
|
||||||
if (!Boolean.TRUE.equals(quest.getTriggers().put("LEAVE_REGION_" + region.config_id, true))) {
|
this.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_TRIGGER_FIRE,
|
||||||
this.getSession().send(new PacketServerCondMeetQuestListUpdateNotify());
|
quest.getTriggerData().get("LEAVE_REGION_" + region.config_id).getId(), 0);
|
||||||
this.getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_TRIGGER_FIRE,
|
|
||||||
quest.getTriggerData().get("LEAVE_REGION_" + region.config_id).getId(), 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user