diff --git a/server/internal/questflow/quest.go b/server/internal/questflow/quest.go index 960b9e0..54e57f8 100644 --- a/server/internal/questflow/quest.go +++ b/server/internal/questflow/quest.go @@ -259,7 +259,12 @@ func (h *QuestHandler) HandleQuestFinish(user *store.UserState, questId int32, i if !isRetired { h.applyQuestVictory(user, questId, &outcome, nowMillis, wasReplay) - if isMainQuestPlayable(quest) && !wasMenuReplay { + // A replay-flow finish must NOT move the MainFlow scene pointer: the + // finished quest is a replay-variant (30000+) with no chapter, so a + // replay scene left in CurrentQuestSceneId makes the client world map's + // CalculatorWorldMap.GetCurrentSeasonId resolve chapter 0 and NRE. The + // replay's own position is tracked in ReplayFlowCurrentQuestSceneId. + if isMainQuestPlayable(quest) && !wasMenuReplay && !wasReplay { lastSceneId := h.getLastMainFlowSceneId(questId) h.advanceMainFlowScene(user, questId, lastSceneId) } diff --git a/server/internal/questflow/scene.go b/server/internal/questflow/scene.go index 88795f7..ea5f0c2 100644 --- a/server/internal/questflow/scene.go +++ b/server/internal/questflow/scene.go @@ -233,7 +233,10 @@ func (h *QuestHandler) HandleMainQuestSceneProgress(user *store.UserState, quest user.MainQuest.CurrentQuestFlowType = int32(model.QuestFlowTypeSubFlow) user.MainQuest.ProgressQuestFlowType = int32(model.QuestFlowTypeSubFlow) } - } else { + } else if !isReplay { + // Background/non-playable quest: advance the MainFlow pointer — but not + // during a replay, where the isReplay block below tracks the ReplayFlow + // scene and the MainFlow pointer must stay on real main-story progress. user.MainQuest.CurrentQuestSceneId = questSceneId if h.isSceneAhead(questSceneId, user.MainQuest.HeadQuestSceneId) { user.MainQuest.HeadQuestSceneId = questSceneId