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

SpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/SpaceNinjaServer

fix: don't default a bad UpgradeFingerprint for post-U18.18 clients (#3801)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3801 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

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

代码差异

1 个文件 +3 -3
Modified src/services/missionInventoryUpdateService.ts +3 -3
@@ -533,18 +533,18 @@ export const addMissionInventoryUpdates = async (
533 533 case "Upgrades":
534 534 value.forEach(clientUpgrade => {
535 535 const id = fromOid(clientUpgrade.ItemId);
536 // Really old builds (tested U7-U8) do not have the UpgradeFingerprint set for unranked mod drops
537 clientUpgrade.UpgradeFingerprint ||= "lvl=0|";
538 536 // U11 and below also don't initialize ItemCount since RawUpgrade doesn't exist in them
539 537 clientUpgrade.ItemCount ??= 1;
540 538 if (account.BuildLabel && version_compare(account.BuildLabel, gameToBuildVersion["18.18.0"]) < 0) {
539 // Really old builds (tested U7-U8) do not have the UpgradeFingerprint set for unranked mod drops (https://onlyg.it/OpenWF/SpaceNinjaServer/issues/3361)
540 clientUpgrade.UpgradeFingerprint ||= "lvl=0|";
541 541 // Acquired Mods have a different UpgradeFingerprint format in pre-U18.18.0 builds, this converts them to the format the database expects
542 542 clientUpgrade.UpgradeFingerprint = convertFromLegacyFingerprint(
543 543 clientUpgrade.UpgradeFingerprint
544 544 );
545 545 }
546 546 // Handle Fusion Core drops
547 const parsedFingerprint = JSON.parse(clientUpgrade.UpgradeFingerprint) as { lvl?: number };
547 const parsedFingerprint = JSON.parse(clientUpgrade.UpgradeFingerprint || "{}") as { lvl?: number };
548 548 if (parsedFingerprint.lvl) {
549 549 inventory.Upgrades.push({
550 550 ItemType: clientUpgrade.ItemType,