small quest fixes (#1677)

* small quest fixes

* uncomment hack
This commit is contained in:
akatatsu27
2022-08-21 10:08:37 +03:00
committed by GitHub
parent abd1e7569e
commit 77f2bcf5bf
8 changed files with 42 additions and 45 deletions

View File

@@ -137,13 +137,6 @@ public class GameQuest {
this.state = QuestState.QUEST_STATE_FINISHED;
this.finishTime = Utils.getCurrentSeconds();
if (getFinishProgressList() != null) {
Arrays.fill(getFinishProgressList(), 1);
}
getOwner().getSession().send(new PacketQuestProgressUpdateNotify(this));
if (getQuestData().finishParent()) {
// This quest finishes the questline - the main quest will also save the quest to db, so we don't have to call save() here
getMainQuest().finish();
@@ -169,12 +162,6 @@ public class GameQuest {
this.state = QuestState.QUEST_STATE_FAILED;
this.finishTime = Utils.getCurrentSeconds();
if (getFailProgressList() != null) {
Arrays.fill(getFailProgressList(), 1);
}
getOwner().getSession().send(new PacketQuestProgressUpdateNotify(this));
getQuestData().getFailExec().forEach(e -> getOwner().getServer().getQuestSystem().triggerExec(this, e, e.getParam()));
//Some subQuests have conditions that subQuests fail (even from different MainQuests)
getOwner().getQuestManager().triggerEvent(QuestTrigger.QUEST_CONTENT_QUEST_STATE_EQUAL, this.subQuestId, this.state.getValue(),0,0,0);