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

feat: handle acquisition of arm & leg armour in ~U16 (#3943)

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

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

代码差异

2 个文件 +16 -1
Modified src/services/inventoryService.ts +10 -0
@@ -1933,6 +1933,16 @@ export const addSkin = (
1933 1933 inventory.BountyScore ??= 0;
1934 1934 inventory.BountyScore += 1;
1935 1935 }
1936
1937 // https://onlyg.it/OpenWF/SpaceNinjaServer/issues/3941
1938 if (typeName.endsWith("LeftArmor")) {
1939 addSkin(
1940 inventory,
1941 typeName.substring(0, typeName.length - "LeftArmor".length) + "RightArmor",
1942 inventoryChanges
1943 );
1944 }
1945
1936 1946 if (inventory.WeaponSkins.some(x => x.ItemType == typeName)) {
1937 1947 logger.debug(`refusing to add WeaponSkin ${typeName} because account already owns it`);
1938 1948 } else {
Modified src/services/itemDataService.ts +6 -1
@@ -1934,7 +1934,7 @@ export const getPrice = (
1934 1934 buildLabel: string
1935 1935 ): number => {
1936 1936 const isBundle = storeItemName in ExportBundles;
1937 const internalName = isBundle ? storeItemName : fromStoreItem(storeItemName);
1937 let internalName = isBundle ? storeItemName : fromStoreItem(storeItemName);
1938 1938
1939 1939 {
1940 1940 const { FlashSales } = getWorldState(buildLabel);
@@ -1980,6 +1980,11 @@ export const getPrice = (
1980 1980 } else if (internalName in ExportBoosterPacks) {
1981 1981 if (usePremium) price = ExportBoosterPacks[internalName].platinumCost;
1982 1982 } else {
1983 // https://onlyg.it/OpenWF/SpaceNinjaServer/issues/3941
1984 if (internalName.endsWith("LeftArmor")) {
1985 internalName = internalName.substring(0, internalName.length - "LeftArmor".length) + "Armor";
1986 }
1987
1983 1988 const categories = [
1984 1989 ExportBundles,
1985 1990 ExportCreditBundles,