aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2021-02-07 16:54:47 +0000
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2021-02-07 16:54:47 +0000
commitc471a53a54271eeff8f6b2539d3edac7cfaa4cc7 (patch)
tree2945158762db5d9350533cf5b38109f973a0133c /src/main/java/com
parentc587aebdee75d674711c7d36fa5e11c29289f33c (diff)
Reset task progress on completion
- Closes #113
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/leonardobishop/quests/player/questprogressfile/QuestProgressFile.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/leonardobishop/quests/player/questprogressfile/QuestProgressFile.java b/src/main/java/com/leonardobishop/quests/player/questprogressfile/QuestProgressFile.java
index ff9bc3e3..97819c56 100644
--- a/src/main/java/com/leonardobishop/quests/player/questprogressfile/QuestProgressFile.java
+++ b/src/main/java/com/leonardobishop/quests/player/questprogressfile/QuestProgressFile.java
@@ -36,6 +36,10 @@ public class QuestProgressFile {
public boolean completeQuest(Quest quest) {
QuestProgress questProgress = getQuestProgress(quest);
questProgress.setStarted(false);
+ for (TaskProgress taskProgress : questProgress.getTaskProgress()) {
+ taskProgress.setCompleted(false);
+ taskProgress.setProgress(null);
+ }
questProgress.setCompleted(true);
questProgress.setCompletedBefore(true);
questProgress.setCompletionDate(System.currentTimeMillis());