diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index dcb5a536..f3c8f0d8 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -1688,9 +1688,9 @@ const inventorySchema = new Schema( //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 }, diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 66328a0d..18073ce8 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -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 }); diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index 976c48f5..e47b5b86 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -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