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: CrewShipFusion bug with SubroutineIndex (#2714)

Crewship fusion didn't agree with player's choice. Expected results: ![image.png](/attachments/a61c96c7-1624-4dd4-9e4c-c6199d5af95a) What I actually get: ![image.png](/attachments/cf58aed4-18d9-4d97-8894-6c53762f366d) ``` export interface ICrewShipComponentFingerprint extends IInnateDamageFingerprint { SubroutineIndex?: number; } ``` The interface already demand SubroutineIndex to exist, so it would be unnecessary to check. Meanwhile, inferiorFingerprint.SubroutineIndex could be 0, 1, 2... and might be handled incorrectly as true/ false. Co-authored-by: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2714 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AlexisinGit <alexisingit@noreply.localhost> Co-committed-by: AlexisinGit <alexisingit@noreply.localhost>

a2171c80
AlexisinGit <alexisingit@noreply.localhost>
提交于

代码差异

1 个文件 +1 -1
Modified src/controllers/api/crewShipFusionController.ts +1 -1
@@ -81,7 +81,7 @@ export const crewShipFusionController: RequestHandler = async (req, res) => {
81 81 const newFval = (newPerc - rangeA[0]) / (rangeA[1] - rangeA[0]);
82 82 buffA.Value = Math.trunc(newFval * 0x3fffffff);
83 83 }
84 if (inferiorFingerprint.SubroutineIndex) {
84 if (inferiorFingerprint.SubroutineIndex !== undefined) {
85 85 const useSuperiorSubroutine = tierA < tierB ? !payload.UseSubroutineA : payload.UseSubroutineA;
86 86 if (!useSuperiorSubroutine) {
87 87 fingerprint.SubroutineIndex = inferiorFingerprint.SubroutineIndex;