Compare commits

..

2 Commits
main ... g3-fix

Author SHA1 Message Date
4660b6cce0 manage Harvestable field
All checks were successful
Build / build (push) Successful in 1m34s
Build / build (pull_request) Successful in 1m29s
2025-04-29 21:44:55 +02:00
fe11ee4663 fix: properly handle G3
The DeathSquadable field seems to be needed for the client to report the BrandedSuits value.
2025-04-29 21:43:10 +02:00
3 changed files with 25 additions and 34 deletions

View File

@ -1688,9 +1688,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//Like BossAladV,BossCaptainVor come for you on missions % chance
DeathMarks: { type: [String], default: [] },
//Zanuka
Harvestable: Boolean,
Harvestable: { type: Boolean, default: true },
//Grustag three
DeathSquadable: Boolean,
DeathSquadable: { type: Boolean, default: true },
EndlessXP: { type: [endlessXpProgressSchema], default: undefined },

View File

@ -143,38 +143,6 @@ export const addMissionInventoryUpdates = async (
]);
}
}
// Somewhat heuristically detect G3 capture:
// - https://onlyg.it/OpenWF/SpaceNinjaServer/issues/1365
// - https://onlyg.it/OpenWF/SpaceNinjaServer/issues/1694
// - https://onlyg.it/OpenWF/SpaceNinjaServer/issues/1724
if (
inventoryUpdates.MissionFailed &&
inventoryUpdates.MissionStatus == "GS_FAILURE" &&
inventoryUpdates.ObjectiveReached &&
!inventoryUpdates.LockedWeaponGroup &&
!inventory.LockedWeaponGroup &&
!inventoryUpdates.LevelKeyName
) {
const loadout = (await Loadout.findById(inventory.LoadOutPresets, "NORMAL"))!;
const config = loadout.NORMAL.id(inventory.CurrentLoadOutIds[0].$oid)!;
const SuitId = new Types.ObjectId(config.s!.ItemId.$oid);
inventory.BrandedSuits ??= [];
if (!inventory.BrandedSuits.find(x => x.equals(SuitId))) {
inventory.BrandedSuits.push(SuitId);
await createMessage(inventory.accountOwnerId, [
{
sndr: "/Lotus/Language/Menu/Mailbox_WarframeSender",
msg: "/Lotus/Language/G1Quests/BrandedMessage",
sub: "/Lotus/Language/G1Quests/BrandedTitle",
att: ["/Lotus/Types/Recipes/Components/BrandRemovalBlueprint"],
highPriority: true // TOVERIFY: I cannot find any content of this within the last 10 years so I can only assume that highPriority is set (it certainly would make sense), but I just don't know for sure that it is so on live.
}
]);
}
}
}
if (inventoryUpdates.RewardInfo) {
if (inventoryUpdates.RewardInfo.periodicMissionTag) {
@ -537,6 +505,23 @@ export const addMissionInventoryUpdates = async (
}
break;
}
case "BrandedSuits": {
inventory.BrandedSuits ??= [];
if (!inventory.BrandedSuits.find(x => x.equals(value.$oid))) {
inventory.BrandedSuits.push(new Types.ObjectId(value.$oid));
await createMessage(inventory.accountOwnerId, [
{
sndr: "/Lotus/Language/Menu/Mailbox_WarframeSender",
msg: "/Lotus/Language/G1Quests/BrandedMessage",
sub: "/Lotus/Language/G1Quests/BrandedTitle",
att: ["/Lotus/Types/Recipes/Components/BrandRemovalBlueprint"],
highPriority: true // TOVERIFY: I cannot find any content of this within the last 10 years so I can only assume that highPriority is set (it certainly would make sense), but I just don't know for sure that it is so on live.
}
]);
}
break;
}
case "LockedWeaponGroup": {
inventory.LockedWeaponGroup = {
s: new Types.ObjectId(value.s.$oid),
@ -545,12 +530,17 @@ export const addMissionInventoryUpdates = async (
m: value.m ? new Types.ObjectId(value.m.$oid) : undefined,
sn: value.sn ? new Types.ObjectId(value.sn.$oid) : undefined
};
inventory.Harvestable = false;
break;
}
case "UnlockWeapons": {
inventory.LockedWeaponGroup = undefined;
break;
}
case "IncHarvester": {
inventory.Harvestable = true;
break;
}
case "CurrentLoadOutIds": {
if (value.LoadOuts) {
const loadout = await Loadout.findOne({ loadoutOwnerId: inventory.accountOwnerId });

View File

@ -130,6 +130,7 @@ export type IMissionInventoryUpdateRequest = {
}[];
KubrowPetEggs?: IKubrowPetEggClient[];
DiscoveredMarkers?: IDiscoveredMarker[];
BrandedSuits?: IOid; // sent when captured by g3
LockedWeaponGroup?: ILockedWeaponGroupClient; // sent when captured by zanuka
UnlockWeapons?: boolean; // sent when recovered weapons from zanuka capture
IncHarvester?: boolean; // sent when recovered weapons from zanuka capture