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

fix: syndicate rank up from negative levels (#2156)

For level <= 0, SacrificeLevel is the current level. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2156 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

071ef528
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified src/controllers/api/syndicateSacrificeController.ts +2 -2
@@ -31,7 +31,7 @@ export const syndicateSacrificeController: RequestHandler = async (request, resp
31 31 AffiliationTag: data.AffiliationTag,
32 32 InventoryChanges: {},
33 33 Level: data.SacrificeLevel,
34 LevelIncrease: levelIncrease,
34 LevelIncrease: data.SacrificeLevel < 0 ? 1 : levelIncrease,
35 35 NewEpisodeReward: false
36 36 };
37 37
@@ -94,7 +94,7 @@ export const syndicateSacrificeController: RequestHandler = async (request, resp
94 94 }
95 95
96 96 // Commit
97 syndicate.Title = data.SacrificeLevel;
97 syndicate.Title = data.SacrificeLevel < 0 ? data.SacrificeLevel + 1 : data.SacrificeLevel;
98 98 await inventory.save();
99 99
100 100 response.json(res);