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: 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
Sainan <sainan@calamity.inc>
提交于

代码差异

1 个文件 +3 -0
Modified src/services/inventoryService.ts +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 }