返回提交历史
Modified
src/services/inventoryService.ts
+3
-0
XFEstudio/XFESpaceNinjaServer
fix: fill upgrades array with empty strings (#1023)
Otherwise the client will "LogBug: (Invalid UpgradeId)" and may crash/raise an interrupt Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1023 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
8fea608b
代码差异
1 个文件
+3
-0
@@ -544,6 +544,9 @@ export const applyDefaultUpgrades = (
544
544
for (const defaultUpgrade of defaultUpgrades) {
545
545
modsToGive.push({ ItemType: defaultUpgrade.ItemType, ItemCount: 1 });
546
546
if (defaultUpgrade.Slot != -1) {
547
while (upgrades.length < defaultUpgrade.Slot) {
548
upgrades.push("");
549
}
547
550
upgrades[defaultUpgrade.Slot] = defaultUpgrade.ItemType;
548
551
}
549
552
}