chore: don't splice quest stages when backtracking
All checks were successful
Build / build (pull_request) Successful in 1m54s
All checks were successful
Build / build (pull_request) Successful in 1m54s
Inbox messages and items likely should not be given again
This commit is contained in:
parent
2b054d1728
commit
5bf743569d
@ -104,14 +104,10 @@ export const resetQuestKeyToStage = (
|
||||
|
||||
quest.Progress ??= [];
|
||||
|
||||
quest.Progress.splice(1 + ChainStage); // remove stages past the target
|
||||
|
||||
const questStage = quest.Progress[ChainStage];
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (questStage) {
|
||||
const run = quest.Progress[0].c;
|
||||
const run = quest.Progress[0]?.c ?? 0;
|
||||
if (run >= 0) {
|
||||
questStage.c = run - 1;
|
||||
for (let i = ChainStage; i < quest.Progress.length; ++i) {
|
||||
quest.Progress[i].c = run - 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user