返回提交历史
Modified
src/services/itemDataService.ts
+28
-0
Modified
src/services/worldStateService.ts
+4
-4
XFEstudio/XFESpaceNinjaServer
chore: check game version before using zeipel and apollo for sorties (#4264)
Closes #4260 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4264 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
54cb0701
代码差异
2 个文件
+32
-4
@@ -3409,6 +3409,34 @@ export const getRegion = async (uniqueName: string, buildLabel: string): Promise
3409
3409
return ExportRegions[uniqueName];
3410
3410
};
3411
3411
3412
export const isRegionAvailableIn = (key: string, value: IRegion, buildLabel: string): boolean => {
3413
// Zeipel, Lua (Rescue)
3414
if (version_compare(buildLabel, gameToBuildVersion["32.2.0"]) >= 0) {
3415
return true;
3416
}
3417
if (key == "SolNode307") {
3418
return false;
3419
}
3420
3421
// Apollo, Lua (Disruption)
3422
if (version_compare(buildLabel, gameToBuildVersion["25.7.0"]) >= 0) {
3423
return true;
3424
}
3425
if (key == "SolNode308") {
3426
return false;
3427
}
3428
3429
// Kuva Fortress
3430
if (version_compare(buildLabel, gameToBuildVersion["19.0.1"]) >= 0) {
3431
return true;
3432
}
3433
if (value.systemIndex == 18) {
3434
return false;
3435
}
3436
3437
return true;
3438
};
3439
3412
3440
// For prex cards
3413
3441
export const getShipDecoByNameTag = (name: string): string => {
3414
3442
for (const [uniqueName, data] of Object.entries(ExportResources)) {
@@ -50,6 +50,7 @@ import { catBreadHash } from "../helpers/stringHelpers.ts";
50
50
import { Guild } from "../models/guildModel.ts";
51
51
import { libraryTargetToAvatar } from "../constants/synthesis.ts";
52
52
import { BL_LATEST } from "../constants/gameVersions.ts";
53
import { isRegionAvailableIn } from "./itemDataService.ts";
53
54
54
55
const sortieBosses = [
55
56
"SORTIE_BOSS_HYENA",
@@ -613,14 +614,13 @@ export const getSortie = (day: number, buildLabel: string): ISortie => {
613
614
const enemyFaction = sortieBossToFaction[boss];
614
615
615
616
const nodes: string[] = [];
616
const canUseKuvaFortress = version_compare(buildLabel, gameToBuildVersion["19.0.1"]) >= 0;
617
617
for (const [key, value] of Object.entries(ExportRegions)) {
618
618
if (
619
(canUseKuvaFortress || value.systemIndex != 18) &&
619
key in sortieTilesets &&
620
(key != "SolNode228" || enemyFaction == "FC_GRINEER") && // PoE only works for grineer enemies
620
621
sortieFactionToSystemIndexes[enemyFaction].includes(value.systemIndex) &&
621
622
sortieFactionToFactions[enemyFaction].includes(value.faction!) &&
622
key in sortieTilesets &&
623
(key != "SolNode228" || enemyFaction == "FC_GRINEER") // PoE only works for grineer enemies
623
isRegionAvailableIn(key, value, buildLabel)
624
624
) {
625
625
nodes.push(key);
626
626
}