返回提交历史
Modified
src/services/inventoryService.ts
+6
-7
XFEstudio/SpaceNinjaServer
fix: set BountyScore to 1 when earning first stratos emblem (#3067)
Some reading between the line on the wiki and profile page seems to indicate it's supposed to start 1 instead of 0. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3067 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
0074b15e
代码差异
1 个文件
+6
-7
@@ -1591,14 +1591,13 @@ export const addSkin = (
1591
1591
typeName: string,
1592
1592
inventoryChanges: IInventoryChanges = {}
1593
1593
): IInventoryChanges => {
1594
if (typeName == "/Lotus/Upgrades/Skins/Clan/BountyHunterBadgeItem") {
1595
logger.debug(`stratos emblem, increasing bounty score`);
1596
inventory.BountyScore ??= 0;
1597
inventory.BountyScore += 1;
1598
}
1594
1599
if (inventory.WeaponSkins.some(x => x.ItemType == typeName)) {
1595
if (typeName == "/Lotus/Upgrades/Skins/Clan/BountyHunterBadgeItem") {
1596
logger.debug(`account already owns stratos emblem, increasing bounty score instead`);
1597
inventory.BountyScore ??= 0;
1598
inventory.BountyScore += 1;
1599
} else {
1600
logger.debug(`refusing to add WeaponSkin ${typeName} because account already owns it`);
1601
}
1600
logger.debug(`refusing to add WeaponSkin ${typeName} because account already owns it`);
1602
1601
} else {
1603
1602
const index =
1604
1603
inventory.WeaponSkins.push({