XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

chore: don't splice quest stages when backtracking (#2961)

Inbox messages and items likely should not be given again Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2961 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

167da9c5
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +4 -8
Modified src/services/questService.ts +4 -8
@@ -113,14 +113,10 @@ export const resetQuestKeyToStage = (
113 113
114 114 quest.Progress ??= [];
115 115
116 quest.Progress.splice(1 + ChainStage); // remove stages past the target
117
118 const questStage = quest.Progress[ChainStage];
119 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
120 if (questStage) {
121 const run = quest.Progress[0].c;
122 if (run >= 0) {
123 questStage.c = run - 1;
116 const run = quest.Progress[0]?.c ?? 0;
117 if (run >= 0) {
118 for (let i = ChainStage; i < quest.Progress.length; ++i) {
119 quest.Progress[i].c = run - 1;
124 120 }
125 121 }
126 122 };