Partially fix Chasing Shadows (#2159)

* Partially fix Chasing Shadows

* Go ahead and move it before the return before Magix tells me to.
This commit is contained in:
Nazrin 2023-05-20 08:42:26 -07:00 committed by GitHub
parent 9b83ea9072
commit 4e8726d29e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -78,6 +78,10 @@ public class PlayerProgress {
return questProgressCountMap.merge(progressId, count, Integer::sum);
}
public int resetCurrentProgress(int progressId) {
return questProgressCountMap.merge(progressId,0,Integer::min);
}
@Entity
@NoArgsConstructor
public static class ItemEntry {

View File

@ -173,6 +173,7 @@ public class GameQuest {
finishTime = 0;
acceptTime = 0;
startTime = 0;
this.getOwner().getPlayerProgress().resetCurrentProgress(this.subQuestId);
if (oldState == QuestState.QUEST_STATE_UNSTARTED) {
return false;
}

View File

@ -16,7 +16,7 @@ public class ContentFinishPlot extends BaseContent {
MainQuestData.TalkData talkData =
quest.getMainQuest().getTalks().get(Integer.valueOf(params[0]));
GameQuest subQuest = quest.getMainQuest().getChildQuestById(params[0]);
return talkData != null && subQuest != null
|| condition.getParamStr().equals(paramStr) && condition.getParam()[0] == params[0];
return (talkData != null && subQuest != null
|| condition.getParamStr().equals(paramStr)) && condition.getParam()[0] == params[0];
}
}