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

chore: limit legacy boosterpack data (#3882)

Fixes #3885 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3882 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

656f584d
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

3 个文件 +191 -19
Modified src/services/itemDataService.ts +25 -18
@@ -1653,14 +1653,17 @@ export const getBoosterPack = async (
1653 1653 "/Lotus/Types/BoosterPacks/GreaterRandomProjection"
1654 1654 ].includes(uniqueName)
1655 1655 ) {
1656 const target = "RandomProjection";
1657 const version = await getLegacyDataVersion(target, buildLabel);
1658 if (version) {
1659 const legacyData = await getLegacyBoosterPackData(target, version);
1660 return {
1661 ...ExportBoosterPacks[uniqueName],
1662 ...legacyData
1663 };
1656 // PE+ already have latest data - so there is no need to do anything
1657 if (buildLabel && version_compare(buildLabel, gameToBuildVersion["42.0.6"]) < 0) {
1658 const target = "RandomProjection";
1659 const version = await getLegacyDataVersion(target, buildLabel);
1660 if (version) {
1661 const legacyData = await getLegacyBoosterPackData(target, version);
1662 return {
1663 ...ExportBoosterPacks[uniqueName],
1664 ...legacyData
1665 };
1666 }
1664 1667 }
1665 1668 }
1666 1669 if (
@@ -1672,14 +1675,17 @@ export const getBoosterPack = async (
1672 1675 "/Lotus/Types/BoosterPacks/PremiumRareArtifactPack" // 90p
1673 1676 ].includes(uniqueName)
1674 1677 ) {
1675 const target = "LotusArtifactUpgradePackBase";
1676 const version = await getLegacyDataVersion(target, buildLabel);
1677 if (version) {
1678 const legacyData = await getLegacyBoosterPackData(target, version);
1679 return {
1680 ...ExportBoosterPacks[uniqueName],
1681 ...legacyData
1682 };
1678 // Mod packs retired in U25
1679 if (buildLabel && version_compare(buildLabel, gameToBuildVersion["25.0.0"]) < 0) {
1680 const target = "LotusArtifactUpgradePackBase";
1681 const version = await getLegacyDataVersion(target, buildLabel);
1682 if (version) {
1683 const legacyData = await getLegacyBoosterPackData(target, version);
1684 return {
1685 ...ExportBoosterPacks[uniqueName],
1686 ...legacyData
1687 };
1688 }
1683 1689 }
1684 1690 }
1685 1691
@@ -2003,8 +2009,9 @@ export const getPrice = (
2003 2009 };
2004 2010
2005 2011 export const getRegion = async (uniqueName: string, buildLabel: string | undefined): Promise<IRegion | undefined> => {
2006 if (buildLabel && version_compare(buildLabel, "2020.03.05.16.06") <= 0) {
2007 const target = version_compare(buildLabel, "2016.07.08.16.56") < 0 ? "OriginSloarMap" : "OriginSolarMapRedux";
2012 // after U27.2.0 OriginSolarMapRedux moved to binary format, so we don't have data for it
2013 if (buildLabel && version_compare(buildLabel, gameToBuildVersion["27.2.0"]) <= 0) {
2014 const target = version_compare(buildLabel, "2016.07.08.16.56") < 0 ? "OriginSolarMap" : "OriginSolarMapRedux";
2008 2015 const version = await getLegacyDataVersion(target, buildLabel);
2009 2016 if (version) {
2010 2017 const legacyData = await getLegacySolarMapData(target, version);
Added static/fixed_responses/data/RandomProjection/2026.04.07.14.59.json +164 -0
@@ -0,0 +1,164 @@
1 {
2 "components": [
3 {
4 "Item": "/Lotus/Types/Game/Projections/T1VoidProjectionCalibanPrimeFBronze",
5 "Amount": 1,
6 "Rarity": "COMMON"
7 },
8 {
9 "Item": "/Lotus/Types/Game/Projections/T1VoidProjectionCalibanPrimeDBronze",
10 "Amount": 1,
11 "Rarity": "COMMON"
12 },
13 {
14 "Item": "/Lotus/Types/Game/Projections/T1VoidProjectionGyrePrimeDBronze",
15 "Amount": 1,
16 "Rarity": "COMMON"
17 },
18 {
19 "Item": "/Lotus/Types/Game/Projections/T1VoidProjectionYareliPrimeDBronze",
20 "Amount": 1,
21 "Rarity": "COMMON"
22 },
23 {
24 "Item": "/Lotus/Types/Game/Projections/T1VoidProjectionGyrePrimeCBronze",
25 "Amount": 1,
26 "Rarity": "COMMON"
27 },
28 {
29 "Item": "/Lotus/Types/Game/Projections/T1VoidProjectionVorunaPrimeBBronze",
30 "Amount": 1,
31 "Rarity": "COMMON"
32 },
33 {
34 "Item": "/Lotus/Types/Game/Projections/T1VoidProjectionVorunaPrimeABronze",
35 "Amount": 1,
36 "Rarity": "COMMON"
37 },
38 {
39 "Item": "/Lotus/Types/Items/MiscItems/SchismKey",
40 "Amount": 1,
41 "Rarity": "COMMON"
42 },
43 {
44 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionVorunaPrimeCBronze",
45 "Amount": 1,
46 "Rarity": "COMMON"
47 },
48 {
49 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionGyrePrimeFBronze",
50 "Amount": 1,
51 "Rarity": "COMMON"
52 },
53 {
54 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionVorunaPrimeEBronze",
55 "Amount": 1,
56 "Rarity": "COMMON"
57 },
58 {
59 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionGyrePrimeABronze",
60 "Amount": 1,
61 "Rarity": "COMMON"
62 },
63 {
64 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionVorunaPrimeABronze",
65 "Amount": 1,
66 "Rarity": "COMMON"
67 },
68 {
69 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionVorunaPrimeDBronze",
70 "Amount": 1,
71 "Rarity": "COMMON"
72 },
73 {
74 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionVorunaPrimeBBronze",
75 "Amount": 1,
76 "Rarity": "COMMON"
77 },
78 {
79 "Item": "/Lotus/Types/Game/Projections/T2VoidProjectionGyrePrimeEBronze",
80 "Amount": 1,
81 "Rarity": "COMMON"
82 },
83 {
84 "Item": "/Lotus/Types/Game/Projections/T3VoidProjectionGyrePrimeCBronze",
85 "Amount": 1,
86 "Rarity": "UNCOMMON"
87 },
88 {
89 "Item": "/Lotus/Types/Game/Projections/T3VoidProjectionVorunaPrimeCBronze",
90 "Amount": 1,
91 "Rarity": "UNCOMMON"
92 },
93 {
94 "Item": "/Lotus/Types/Game/Projections/T3VoidProjectionVorunaPrimeABronze",
95 "Amount": 1,
96 "Rarity": "UNCOMMON"
97 },
98 {
99 "Item": "/Lotus/Types/Game/Projections/T3VoidProjectionVorunaPrimeDBronze",
100 "Amount": 1,
101 "Rarity": "UNCOMMON"
102 },
103 {
104 "Item": "/Lotus/Types/Game/Projections/T3VoidProjectionGyrePrimeABronze",
105 "Amount": 1,
106 "Rarity": "UNCOMMON"
107 },
108 {
109 "Item": "/Lotus/Types/Game/Projections/T3VoidProjectionVorunaPrimeBBronze",
110 "Amount": 1,
111 "Rarity": "UNCOMMON"
112 },
113 {
114 "Item": "/Lotus/Types/Game/Projections/T3VoidProjectionGyrePrimeEBronze",
115 "Amount": 1,
116 "Rarity": "UNCOMMON"
117 },
118 {
119 "Item": "/Lotus/Types/Items/MiscItems/SchismKey",
120 "Amount": 1,
121 "Rarity": "UNCOMMON"
122 },
123 {
124 "Item": "/Lotus/Types/Game/Projections/T4VoidProjectionVorunaPrimeDBronze",
125 "Amount": 1,
126 "Rarity": "RARE"
127 },
128 {
129 "Item": "/Lotus/Types/Game/Projections/T4VoidProjectionVorunaPrimeBBronze",
130 "Amount": 1,
131 "Rarity": "RARE"
132 },
133 {
134 "Item": "/Lotus/Types/Game/Projections/T4VoidProjectionVorunaPrimeEBronze",
135 "Amount": 1,
136 "Rarity": "RARE"
137 },
138 {
139 "Item": "/Lotus/Types/Game/Projections/T4VoidProjectionGyrePrimeBBronze",
140 "Amount": 1,
141 "Rarity": "RARE"
142 },
143 {
144 "Item": "/Lotus/Types/Game/Projections/T4VoidProjectionYareliPrimeCBronze",
145 "Amount": 1,
146 "Rarity": "RARE"
147 },
148 {
149 "Item": "/Lotus/Types/Game/Projections/T4VoidProjectionVorunaPrimeCBronze",
150 "Amount": 1,
151 "Rarity": "RARE"
152 },
153 {
154 "Item": "/Lotus/Types/Game/Projections/T4VoidProjectionVorunaPrimeABronze",
155 "Amount": 1,
156 "Rarity": "RARE"
157 },
158 {
159 "Item": "/Lotus/Types/Items/MiscItems/SchismKey",
160 "Amount": 1,
161 "Rarity": "RARE"
162 }
163 ]
164 }
Modified static/fixed_responses/data/RandomProjection/index.json +2 -1
@@ -41,5 +41,6 @@
41 41 "2025.05.20.10.18",
42 42 "2025.06.23.11.39",
43 43 "2025.10.14.16.10",
44 "2025.12.09.14.18"
44 "2025.12.09.14.18",
45 "2026.04.07.14.59"
45 46 ]