返回提交历史
Modified
src/constants/gameToBuildVersion.ts
+8
-0
Modified
src/services/worldStateService.ts
+180
-131
XFEstudio/XFESpaceNinjaServer
feat: push goals in corresponding game versions (#3215)
Closes #3213 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3215 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>
e3d4fa78
代码差异
2 个文件
+188
-131
@@ -20,17 +20,25 @@ const gameToBuildVersion = {
20
20
"31.0.0": "2021.12.15.00.15",
21
21
"30.5.0": "2021.07.05.17.03",
22
22
"30.0.0": "2021.04.13.19.58",
23
"29.10.0": "2021.03.19.10.30",
24
"29.6.8": "2021.01.25.08.49",
23
25
"29.3.1": "2020.11.04.18.58",
24
26
"28.0.0": "2020.06.12.16.46",
25
27
"27.2.0": "2020.03.05.16.06",
26
28
"26.0.0": "2019.10.31.22.42",
27
29
"25.7.0": "2019.08.29.20.01",
30
"25.0.0": "2019.05.22.23.12",
31
"24.5.1": "2019.03.15.18.11",
28
32
"24.4.0": "2019.03.07.20.21",
29
33
"24.0.0": "2018.11.08.14.45",
34
"23.2.0": "2018.08.01.08.09",
30
35
"22.13.4": "2018.02.22.14.34",
36
"22.8.2": "2018.01.04.13.12",
37
"22.7.0": "2017.12.12.12.15",
31
38
"22.0.0": "2017.10.12.17.04",
32
39
"20.4.0": "2017.05.05.15.41",
33
40
"19.5.0": "2016.12.21.19.13",
41
"18.22.1": "2016.09.30.12.04",
34
42
"18.18.0": "2016.08.19.17.12",
35
43
"18.16.0": "2016.07.08.16.56",
36
44
"18.13.3": "2016.06.02.12.11",
@@ -1611,11 +1611,6 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1611
1611
}
1612
1612
};
1613
1613
1614
// Old versions seem to really get hung up on not being able to load these.
1615
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["22.0.0"]) < 0) {
1616
worldState.PVPChallengeInstances = [];
1617
}
1618
1619
1614
if (config.worldState?.tennoLiveRelay) {
1620
1615
worldState.Goals.push({
1621
1616
_id: {
@@ -1832,7 +1827,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1832
1827
}
1833
1828
1834
1829
const isFebruary = date.getUTCMonth() == 1;
1835
if (config.worldState?.starDaysOverride ?? isFebruary) {
1830
if (
1831
(config.worldState?.starDaysOverride ?? isFebruary) &&
1832
buildLabel &&
1833
version_compare(buildLabel, gameToBuildVersion["29.10.0"]) >= 0
1834
) {
1836
1835
worldState.Goals.push({
1837
1836
_id: { $oid: "67a4dcce2a198564d62e1647" },
1838
1837
Activation: {
@@ -1860,76 +1859,80 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1860
1859
Node: "SolarisUnitedHub1"
1861
1860
});
1862
1861
}
1863
// The client gets kinda confused when multiple goals have the same tag, so considering these mutually exclusive.
1864
if (config.worldState?.galleonOfGhouls == 1) {
1865
worldState.Goals.push({
1866
_id: { $oid: "6814ddf00000000000000000" },
1867
Activation: { $date: { $numberLong: "1746198000000" } },
1868
Expiry: { $date: { $numberLong: "2000000000000" } },
1869
Count: 0,
1870
Goal: 1,
1871
Success: 0,
1872
Personal: true,
1873
Bounty: true,
1874
ClampNodeScores: true,
1875
Node: "EventNode19",
1876
MissionKeyName: "/Lotus/Types/Keys/GalleonRobberyAlert",
1877
Desc: "/Lotus/Language/Events/GalleonRobberyEventMissionTitle",
1878
Icon: "/Lotus/Interface/Icons/Player/GalleonRobberiesEvent.png",
1879
Tag: "GalleonRobbery",
1880
Reward: {
1881
items: [
1882
"/Lotus/StoreItems/Types/Recipes/Weapons/GrnChainSawTonfaBlueprint",
1883
"/Lotus/StoreItems/Upgrades/Skins/Clan/BountyHunterBadgeItem"
1884
]
1885
}
1886
});
1887
} else if (config.worldState?.galleonOfGhouls == 2) {
1888
worldState.Goals.push({
1889
_id: { $oid: "681e18700000000000000000" },
1890
Activation: { $date: { $numberLong: "1746802800000" } },
1891
Expiry: { $date: { $numberLong: "2000000000000" } },
1892
Count: 0,
1893
Goal: 1,
1894
Success: 0,
1895
Personal: true,
1896
Bounty: true,
1897
ClampNodeScores: true,
1898
Node: "EventNode28", // Incompatible with Wolf Hunt, Orphix Venom, Warframe Anniversary
1899
MissionKeyName: "/Lotus/Types/Keys/GalleonRobberyAlertB",
1900
Desc: "/Lotus/Language/Events/GalleonRobberyEventMissionTitle",
1901
Icon: "/Lotus/Interface/Icons/Player/GalleonRobberiesEvent.png",
1902
Tag: "GalleonRobbery",
1903
Reward: {
1904
items: [
1905
"/Lotus/StoreItems/Types/Recipes/Weapons/MortiforShieldAndSwordBlueprint",
1906
"/Lotus/StoreItems/Upgrades/Skins/Clan/BountyHunterBadgeItem"
1907
]
1908
}
1909
});
1910
} else if (config.worldState?.galleonOfGhouls == 3) {
1911
worldState.Goals.push({
1912
_id: { $oid: "682752f00000000000000000" },
1913
Activation: { $date: { $numberLong: "1747407600000" } },
1914
Expiry: { $date: { $numberLong: "2000000000000" } },
1915
Count: 0,
1916
Goal: 1,
1917
Success: 0,
1918
Personal: true,
1919
Bounty: true,
1920
ClampNodeScores: true,
1921
Node: "EventNode19",
1922
MissionKeyName: "/Lotus/Types/Keys/GalleonRobberyAlertC",
1923
Desc: "/Lotus/Language/Events/GalleonRobberyEventMissionTitle",
1924
Icon: "/Lotus/Interface/Icons/Player/GalleonRobberiesEvent.png",
1925
Tag: "GalleonRobbery",
1926
Reward: {
1927
items: [
1928
"/Lotus/Types/StoreItems/Packages/EventCatalystReactorBundle",
1929
"/Lotus/StoreItems/Upgrades/Skins/Clan/BountyHunterBadgeItem"
1930
]
1931
}
1932
});
1862
1863
// < U38.6.0
1864
if (buildLabel && version_compare(buildLabel, "2025.05.20.10.18") >= 0) {
1865
// The client gets kinda confused when multiple goals have the same tag, so considering these mutually exclusive.
1866
if (config.worldState?.galleonOfGhouls == 1) {
1867
worldState.Goals.push({
1868
_id: { $oid: "6814ddf00000000000000000" },
1869
Activation: { $date: { $numberLong: "1746198000000" } },
1870
Expiry: { $date: { $numberLong: "2000000000000" } },
1871
Count: 0,
1872
Goal: 1,
1873
Success: 0,
1874
Personal: true,
1875
Bounty: true,
1876
ClampNodeScores: true,
1877
Node: "EventNode19",
1878
MissionKeyName: "/Lotus/Types/Keys/GalleonRobberyAlert",
1879
Desc: "/Lotus/Language/Events/GalleonRobberyEventMissionTitle",
1880
Icon: "/Lotus/Interface/Icons/Player/GalleonRobberiesEvent.png",
1881
Tag: "GalleonRobbery",
1882
Reward: {
1883
items: [
1884
"/Lotus/StoreItems/Types/Recipes/Weapons/GrnChainSawTonfaBlueprint",
1885
"/Lotus/StoreItems/Upgrades/Skins/Clan/BountyHunterBadgeItem"
1886
]
1887
}
1888
});
1889
} else if (config.worldState?.galleonOfGhouls == 2) {
1890
worldState.Goals.push({
1891
_id: { $oid: "681e18700000000000000000" },
1892
Activation: { $date: { $numberLong: "1746802800000" } },
1893
Expiry: { $date: { $numberLong: "2000000000000" } },
1894
Count: 0,
1895
Goal: 1,
1896
Success: 0,
1897
Personal: true,
1898
Bounty: true,
1899
ClampNodeScores: true,
1900
Node: "EventNode28", // Incompatible with Wolf Hunt, Orphix Venom, Warframe Anniversary
1901
MissionKeyName: "/Lotus/Types/Keys/GalleonRobberyAlertB",
1902
Desc: "/Lotus/Language/Events/GalleonRobberyEventMissionTitle",
1903
Icon: "/Lotus/Interface/Icons/Player/GalleonRobberiesEvent.png",
1904
Tag: "GalleonRobbery",
1905
Reward: {
1906
items: [
1907
"/Lotus/StoreItems/Types/Recipes/Weapons/MortiforShieldAndSwordBlueprint",
1908
"/Lotus/StoreItems/Upgrades/Skins/Clan/BountyHunterBadgeItem"
1909
]
1910
}
1911
});
1912
} else if (config.worldState?.galleonOfGhouls == 3) {
1913
worldState.Goals.push({
1914
_id: { $oid: "682752f00000000000000000" },
1915
Activation: { $date: { $numberLong: "1747407600000" } },
1916
Expiry: { $date: { $numberLong: "2000000000000" } },
1917
Count: 0,
1918
Goal: 1,
1919
Success: 0,
1920
Personal: true,
1921
Bounty: true,
1922
ClampNodeScores: true,
1923
Node: "EventNode19",
1924
MissionKeyName: "/Lotus/Types/Keys/GalleonRobberyAlertC",
1925
Desc: "/Lotus/Language/Events/GalleonRobberyEventMissionTitle",
1926
Icon: "/Lotus/Interface/Icons/Player/GalleonRobberiesEvent.png",
1927
Tag: "GalleonRobbery",
1928
Reward: {
1929
items: [
1930
"/Lotus/Types/StoreItems/Packages/EventCatalystReactorBundle",
1931
"/Lotus/StoreItems/Upgrades/Skins/Clan/BountyHunterBadgeItem"
1932
]
1933
}
1934
});
1935
}
1933
1936
}
1934
1937
1935
1938
const firstNovemberWeekday = new Date(Date.UTC(date.getUTCFullYear(), 10, 1)).getUTCDay();
@@ -1939,7 +1942,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
1939
1942
const plagueStarEnd = Date.UTC(date.getUTCFullYear(), 10, firstNovemberMondayOffset + 15, 16);
1940
1943
1941
1944
const isPlagueStarActive = timeMs >= plagueStarStart && timeMs < plagueStarEnd;
1942
if (config.worldState?.plagueStarOverride ?? isPlagueStarActive) {
1945
if (
1946
(config.worldState?.plagueStarOverride ?? isPlagueStarActive) &&
1947
buildLabel &&
1948
version_compare(buildLabel, gameToBuildVersion["22.7.0"]) >= 0
1949
) {
1943
1950
worldState.Goals.push({
1944
1951
_id: { $oid: "654a5058c757487cdb11824f" },
1945
1952
Activation: {
@@ -2007,7 +2014,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2007
2014
const dogDaysEnd = Date.UTC(date.getUTCFullYear(), 8, 1 + firstSeptemberWednesdayOffset, 15);
2008
2015
2009
2016
const isDogDaysActive = timeMs >= dogDaysStart && timeMs < dogDaysEnd;
2010
if (config.worldState?.dogDaysOverride ?? isDogDaysActive) {
2017
if (
2018
(config.worldState?.dogDaysOverride ?? isDogDaysActive) &&
2019
buildLabel &&
2020
version_compare(buildLabel, gameToBuildVersion["25.7.0"]) >= 0
2021
) {
2011
2022
const activationTimeStamp = config.worldState?.dogDaysOverride ? "1699372800000" : dogDaysStart.toString();
2012
2023
const expiryTimeStamp = config.worldState?.dogDaysOverride ? "2000000000000" : dogDaysEnd.toString();
2013
2024
const rewards = [
@@ -2468,7 +2479,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2468
2479
});
2469
2480
}
2470
2481
2471
if (config.worldState?.wolfHunt != undefined) {
2482
if (
2483
config.worldState?.wolfHunt != undefined &&
2484
buildLabel &&
2485
version_compare(buildLabel, gameToBuildVersion["25.0.0"]) >= 0
2486
) {
2472
2487
if (config.worldState.wolfHunt == 0) {
2473
2488
worldState.Goals.push({
2474
2489
_id: {
@@ -2584,7 +2599,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2584
2599
"Anniversary2025TacAlertCMB"
2585
2600
];
2586
2601
2587
if (config.worldState?.hallowedFlame) {
2602
if (
2603
config.worldState?.hallowedFlame &&
2604
buildLabel &&
2605
version_compare(buildLabel, gameToBuildVersion["26.0.0"]) >= 0
2606
) {
2588
2607
worldState.Goals.push(
2589
2608
{
2590
2609
_id: { $oid: "5db305403d34b5158873519a" },
@@ -2649,7 +2668,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2649
2668
);
2650
2669
}
2651
2670
2652
if (config.worldState?.hallowedNightmares) {
2671
if (
2672
config.worldState?.hallowedNightmares &&
2673
buildLabel &&
2674
version_compare(buildLabel, gameToBuildVersion["18.0.2"]) >= 0
2675
) {
2653
2676
const rewards = [
2654
2677
// 2018
2655
2678
[
@@ -2743,7 +2766,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2743
2766
}
2744
2767
}
2745
2768
2746
if (config.worldState?.proxyRebellion) {
2769
if (
2770
config.worldState?.proxyRebellion &&
2771
buildLabel &&
2772
version_compare(buildLabel, gameToBuildVersion["23.2.0"]) >= 0
2773
) {
2747
2774
const rewards = [
2748
2775
// 2019
2749
2776
[
@@ -2821,7 +2848,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2821
2848
});
2822
2849
}
2823
2850
2824
if (config.worldState?.longShadow) {
2851
if (
2852
config.worldState?.longShadow &&
2853
buildLabel &&
2854
version_compare(buildLabel, gameToBuildVersion["18.22.1"]) >= 0
2855
) {
2825
2856
worldState.Goals.push({
2826
2857
_id: { $oid: "5bc9e8f7272d5d184c8398c9" },
2827
2858
Activation: { $date: { $numberLong: "1539972000000" } },
@@ -2866,7 +2897,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
2866
2897
}
2867
2898
2868
2899
const isOctober = date.getUTCMonth() == 9; // October = month index 9
2869
if (config.worldState?.naberusNightsOverride ?? isOctober) {
2900
if (
2901
(config.worldState?.naberusNightsOverride ?? isOctober) &&
2902
buildLabel &&
2903
version_compare(buildLabel, gameToBuildVersion["29.3.1"]) >= 0
2904
) {
2870
2905
const activationTimeStamp = config.worldState?.naberusNightsOverride
2871
2906
? "1727881200000"
2872
2907
: Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1).toString();
@@ -3066,32 +3101,32 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
3066
3101
}
3067
3102
}
3068
3103
3069
if (config.worldState?.bellyOfTheBeast) {
3070
if (buildLabel && version_compare(buildLabel, "2024.06.12.18.42") >= 0) {
3071
worldState.Goals.push({
3072
_id: { $oid: "67a5035c2a198564d62e165e" },
3073
Activation: { $date: { $numberLong: "1738868400000" } },
3074
Expiry: { $date: { $numberLong: "2000000000000" } },
3075
Count: config.worldState.bellyOfTheBeastProgressOverride ?? 0,
3076
HealthPct: (config.worldState.bellyOfTheBeastProgressOverride ?? 0) / 100,
3077
Goal: 0,
3078
Personal: true,
3079
Community: true,
3080
ClanGoal: [72, 216, 648, 1944, 5832],
3081
Tag: "JadeShadowsEvent",
3082
Faction: "FC_MITW",
3083
Desc: "/Lotus/Language/JadeShadows/JadeShadowsEventName",
3084
ToolTip: "/Lotus/Language/JadeShadows/JadeShadowsShortEventDesc",
3085
Icon: "/Lotus/Interface/Icons/WorldStatePanel/JadeShadowsEventBadge.png",
3086
ScoreLocTag: "/Lotus/Language/JadeShadows/JadeShadowsEventScore",
3087
Node: "SolNode723",
3088
MissionKeyName: "/Lotus/Types/Keys/JadeShadowsEventMission",
3089
ItemType: "/Lotus/Types/Gameplay/JadeShadows/Resources/AscensionEventResourceItem"
3090
});
3091
pushGoalAlerts(worldState, "JadeShadows", buildLabel);
3092
}
3104
if (config.worldState?.bellyOfTheBeast && buildLabel && version_compare(buildLabel, "2024.06.12.18.42") >= 0) {
3105
worldState.Goals.push({
3106
_id: { $oid: "67a5035c2a198564d62e165e" },
3107
Activation: { $date: { $numberLong: "1738868400000" } },
3108
Expiry: { $date: { $numberLong: "2000000000000" } },
3109
Count: config.worldState.bellyOfTheBeastProgressOverride ?? 0,
3110
HealthPct: (config.worldState.bellyOfTheBeastProgressOverride ?? 0) / 100,
3111
Goal: 0,
3112
Personal: true,
3113
Community: true,
3114
ClanGoal: [72, 216, 648, 1944, 5832],
3115
Tag: "JadeShadowsEvent",
3116
Faction: "FC_MITW",
3117
Desc: "/Lotus/Language/JadeShadows/JadeShadowsEventName",
3118
ToolTip: "/Lotus/Language/JadeShadows/JadeShadowsShortEventDesc",
3119
Icon: "/Lotus/Interface/Icons/WorldStatePanel/JadeShadowsEventBadge.png",
3120
ScoreLocTag: "/Lotus/Language/JadeShadows/JadeShadowsEventScore",
3121
Node: "SolNode723",
3122
MissionKeyName: "/Lotus/Types/Keys/JadeShadowsEventMission",
3123
ItemType: "/Lotus/Types/Gameplay/JadeShadows/Resources/AscensionEventResourceItem"
3124
});
3125
pushGoalAlerts(worldState, "JadeShadows", buildLabel);
3093
3126
}
3094
if (config.worldState?.eightClaw) {
3127
3128
// <U39
3129
if (config.worldState?.eightClaw && buildLabel && version_compare(buildLabel, "2025.06.23.11.39") >= 0) {
3095
3130
worldState.Goals.push({
3096
3131
_id: { $oid: "685c15f80000000000000000" },
3097
3132
Activation: { $date: { $numberLong: "1750865400000" } },
@@ -3113,7 +3148,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
3113
3148
});
3114
3149
}
3115
3150
3116
if (config.worldState?.orphixVenom) {
3151
if (
3152
config.worldState?.orphixVenom &&
3153
buildLabel &&
3154
version_compare(buildLabel, gameToBuildVersion["29.6.8"]) >= 0
3155
) {
3117
3156
worldState.Goals.push(
3118
3157
{
3119
3158
_id: { $oid: "5fdcccb875d5ad500dc477d0" },
@@ -3190,25 +3229,27 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
3190
3229
);
3191
3230
}
3192
3231
3193
if (config.worldState?.bloodOfPerita) {
3194
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["41.0.0"]) >= 0) {
3195
worldState.Goals.push({
3196
_id: { $oid: "694189080000000000000000" },
3197
Activation: { $date: { $numberLong: "1765902600000" } },
3198
Expiry: { $date: { $numberLong: "2000000000000" } },
3199
GracePeriod: { $date: { $numberLong: "2000000000000" } },
3200
Count: 0,
3201
Goal: 0,
3202
Success: 0,
3203
Personal: true,
3204
Desc: "/Lotus/Language/TauPrequel/TauPrequelFinal/TauPrequelEventName",
3205
ToolTip: "/Lotus/Language/TauPrequel/TauPrequelFinal/BloodOfPeritaDetails",
3206
Icon: "/Lotus/Interface/Icons/WorldStatePanel/BloodOfPeritaEventBadgeSmall.png",
3207
Tag: "12MinWarEvent",
3208
Node: "SolNode251"
3209
});
3210
pushGoalAlerts(worldState, "12MinWarEvent", buildLabel);
3211
}
3232
if (
3233
config.worldState?.bloodOfPerita &&
3234
buildLabel &&
3235
version_compare(buildLabel, gameToBuildVersion["41.0.0"]) >= 0
3236
) {
3237
worldState.Goals.push({
3238
_id: { $oid: "694189080000000000000000" },
3239
Activation: { $date: { $numberLong: "1765902600000" } },
3240
Expiry: { $date: { $numberLong: "2000000000000" } },
3241
GracePeriod: { $date: { $numberLong: "2000000000000" } },
3242
Count: 0,
3243
Goal: 0,
3244
Success: 0,
3245
Personal: true,
3246
Desc: "/Lotus/Language/TauPrequel/TauPrequelFinal/TauPrequelEventName",
3247
ToolTip: "/Lotus/Language/TauPrequel/TauPrequelFinal/BloodOfPeritaDetails",
3248
Icon: "/Lotus/Interface/Icons/WorldStatePanel/BloodOfPeritaEventBadgeSmall.png",
3249
Tag: "12MinWarEvent",
3250
Node: "SolNode251"
3251
});
3252
pushGoalAlerts(worldState, "12MinWarEvent", buildLabel);
3212
3253
}
3213
3254
3214
3255
// Thermia Fractures activates for 14 days, with alternating 4 and 3-day breaks
@@ -3218,7 +3259,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
3218
3259
const activeThermiaFracturesCycleDay =
3219
3260
thermiaFracturesCycleDay - (thermiaFracturesCycleDay < 14 ? 0 : thermiaFracturesCycleDay < 18 ? 14 : 32);
3220
3261
3221
if (config.worldState?.thermiaFracturesOverride ?? isThermiaFracturesActive) {
3262
if (
3263
(config.worldState?.thermiaFracturesOverride ?? isThermiaFracturesActive) &&
3264
buildLabel &&
3265
version_compare(buildLabel, gameToBuildVersion["24.5.1"]) >= 0
3266
) {
3222
3267
const activeStartDay = day - activeThermiaFracturesCycleDay;
3223
3268
3224
3269
const count = config.worldState?.thermiaFracturesProgressOverride ?? 0;
@@ -3372,7 +3417,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
3372
3417
3373
3418
const ghoulsCycleDay = day % 21;
3374
3419
const isGhoulEmergenceActive = ghoulsCycleDay >= 17 && ghoulsCycleDay <= 20; // 4 days for event and 17 days for break
3375
if (config.worldState?.ghoulEmergenceOverride ?? isGhoulEmergenceActive) {
3420
if (
3421
(config.worldState?.ghoulEmergenceOverride ?? isGhoulEmergenceActive) &&
3422
buildLabel &&
3423
version_compare(buildLabel, gameToBuildVersion["22.8.2"])
3424
) {
3376
3425
const ghoulPool = [...eidolonGhoulJobs];
3377
3426
const pastGhoulPool = [...eidolonGhoulJobs];
3378
3427