forked from OpenWF/SpaceNinjaServer
fix: don't trigger G3 capture when LevelKeyName is present (#1699)
Reviewed-on: OpenWF/SpaceNinjaServer#1699 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
f94ecbfbfc
commit
41d976d362
@ -128,11 +128,16 @@ export const addMissionInventoryUpdates = async (
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Somewhat heuristically detect G3 capture:
|
||||||
|
// - https://onlyg.it/OpenWF/SpaceNinjaServer/issues/1365
|
||||||
|
// - https://onlyg.it/OpenWF/SpaceNinjaServer/issues/1694
|
||||||
if (
|
if (
|
||||||
inventoryUpdates.MissionFailed &&
|
inventoryUpdates.MissionFailed &&
|
||||||
inventoryUpdates.MissionStatus == "GS_FAILURE" &&
|
inventoryUpdates.MissionStatus == "GS_FAILURE" &&
|
||||||
inventoryUpdates.ObjectiveReached &&
|
inventoryUpdates.ObjectiveReached &&
|
||||||
!inventoryUpdates.LockedWeaponGroup
|
!inventoryUpdates.LockedWeaponGroup &&
|
||||||
|
!inventoryUpdates.LevelKeyName
|
||||||
) {
|
) {
|
||||||
const loadout = (await Loadout.findById(inventory.LoadOutPresets, "NORMAL"))!;
|
const loadout = (await Loadout.findById(inventory.LoadOutPresets, "NORMAL"))!;
|
||||||
const config = loadout.NORMAL.id(inventory.CurrentLoadOutIds[0].$oid)!;
|
const config = loadout.NORMAL.id(inventory.CurrentLoadOutIds[0].$oid)!;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user