feat: grustrag bolt
All checks were successful
Build / build (22) (push) Successful in 37s
Build / build (18) (push) Successful in 1m15s
Build / build (20) (push) Successful in 1m12s
Build / build (18) (pull_request) Successful in 40s
Build / build (22) (pull_request) Successful in 1m14s
Build / build (20) (pull_request) Successful in 1m10s
All checks were successful
Build / build (22) (push) Successful in 37s
Build / build (18) (push) Successful in 1m15s
Build / build (20) (push) Successful in 1m12s
Build / build (18) (pull_request) Successful in 40s
Build / build (22) (pull_request) Successful in 1m14s
Build / build (20) (pull_request) Successful in 1m10s
This commit is contained in:
parent
516f822e43
commit
b8e1038d35
@ -99,6 +99,11 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
|
|||||||
inventory.SpectreLoadouts.push(inventory.PendingSpectreLoadouts[pendingLoadoutIndex]);
|
inventory.SpectreLoadouts.push(inventory.PendingSpectreLoadouts[pendingLoadoutIndex]);
|
||||||
inventory.PendingSpectreLoadouts.splice(pendingLoadoutIndex, 1);
|
inventory.PendingSpectreLoadouts.splice(pendingLoadoutIndex, 1);
|
||||||
}
|
}
|
||||||
|
} else if (recipe.secretIngredientAction == "SIA_UNBRAND") {
|
||||||
|
inventory.BrandedSuits!.splice(
|
||||||
|
inventory.BrandedSuits!.findIndex(x => x.equals(pendingRecipe.SuitToUnbrand)),
|
||||||
|
1
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let InventoryChanges = {};
|
let InventoryChanges = {};
|
||||||
@ -116,10 +121,12 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
|
|||||||
...updateCurrency(inventory, recipe.skipBuildTimePrice, true)
|
...updateCurrency(inventory, recipe.skipBuildTimePrice, true)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (recipe.secretIngredientAction != "SIA_UNBRAND") {
|
||||||
InventoryChanges = {
|
InventoryChanges = {
|
||||||
...InventoryChanges,
|
...InventoryChanges,
|
||||||
...(await addItem(inventory, recipe.resultType, recipe.num, false))
|
...(await addItem(inventory, recipe.resultType, recipe.num, false))
|
||||||
};
|
};
|
||||||
|
}
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.json({ InventoryChanges });
|
res.json({ InventoryChanges });
|
||||||
}
|
}
|
||||||
|
@ -111,6 +111,8 @@ export const startRecipeController: RequestHandler = async (req, res) => {
|
|||||||
inventory.PendingSpectreLoadouts.push(spectreLoadout);
|
inventory.PendingSpectreLoadouts.push(spectreLoadout);
|
||||||
logger.debug("pending spectre loadout", spectreLoadout);
|
logger.debug("pending spectre loadout", spectreLoadout);
|
||||||
}
|
}
|
||||||
|
} else if (recipe.secretIngredientAction == "SIA_UNBRAND") {
|
||||||
|
pr.SuitToUnbrand = new Types.ObjectId(startRecipeRequest.Ids[recipe.ingredients.length + 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
@ -903,7 +903,8 @@ const pendingRecipeSchema = new Schema<IPendingRecipeDatabase>(
|
|||||||
CompletionDate: Date,
|
CompletionDate: Date,
|
||||||
LongGuns: { type: [EquipmentSchema], default: undefined },
|
LongGuns: { type: [EquipmentSchema], default: undefined },
|
||||||
Pistols: { type: [EquipmentSchema], default: undefined },
|
Pistols: { type: [EquipmentSchema], default: undefined },
|
||||||
Melee: { type: [EquipmentSchema], default: undefined }
|
Melee: { type: [EquipmentSchema], default: undefined },
|
||||||
|
SuitToUnbrand: { type: Schema.Types.ObjectId, default: undefined }
|
||||||
},
|
},
|
||||||
{ id: false }
|
{ id: false }
|
||||||
);
|
);
|
||||||
@ -1484,7 +1485,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
EchoesHexConquestHardModeStatus: { type: Number, default: undefined },
|
EchoesHexConquestHardModeStatus: { type: Number, default: undefined },
|
||||||
EchoesHexConquestCacheScoreMission: { type: Number, default: undefined },
|
EchoesHexConquestCacheScoreMission: { type: Number, default: undefined },
|
||||||
EchoesHexConquestActiveFrameVariants: { type: [String], default: undefined },
|
EchoesHexConquestActiveFrameVariants: { type: [String], default: undefined },
|
||||||
EchoesHexConquestActiveStickers: { type: [String], default: undefined }
|
EchoesHexConquestActiveStickers: { type: [String], default: undefined },
|
||||||
|
|
||||||
|
BrandedSuits: { type: [Schema.Types.ObjectId], default: undefined }
|
||||||
},
|
},
|
||||||
{ timestamps: { createdAt: "Created", updatedAt: false } }
|
{ timestamps: { createdAt: "Created", updatedAt: false } }
|
||||||
);
|
);
|
||||||
@ -1516,6 +1519,9 @@ inventorySchema.set("toJSON", {
|
|||||||
if (inventoryDatabase.EntratiVaultCountResetDate) {
|
if (inventoryDatabase.EntratiVaultCountResetDate) {
|
||||||
inventoryResponse.EntratiVaultCountResetDate = toMongoDate(inventoryDatabase.EntratiVaultCountResetDate);
|
inventoryResponse.EntratiVaultCountResetDate = toMongoDate(inventoryDatabase.EntratiVaultCountResetDate);
|
||||||
}
|
}
|
||||||
|
if (inventoryDatabase.BrandedSuits) {
|
||||||
|
inventoryResponse.BrandedSuits = inventoryDatabase.BrandedSuits.map(toOid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ import {
|
|||||||
updateSyndicate
|
updateSyndicate
|
||||||
} from "@/src/services/inventoryService";
|
} from "@/src/services/inventoryService";
|
||||||
import { updateQuestKey } from "@/src/services/questService";
|
import { updateQuestKey } from "@/src/services/questService";
|
||||||
import { HydratedDocument } from "mongoose";
|
import { HydratedDocument, Types } from "mongoose";
|
||||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { getLevelKeyRewards, getNode, toStoreItem } from "@/src/services/itemDataService";
|
import { getLevelKeyRewards, getNode, toStoreItem } from "@/src/services/itemDataService";
|
||||||
import { InventoryDocumentProps, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
import { InventoryDocumentProps, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
@ -45,6 +45,7 @@ import kuriaMessage75 from "@/static/fixed_responses/kuriaMessages/seventyFivePe
|
|||||||
import kuriaMessage100 from "@/static/fixed_responses/kuriaMessages/oneHundredPercent.json";
|
import kuriaMessage100 from "@/static/fixed_responses/kuriaMessages/oneHundredPercent.json";
|
||||||
import conservationAnimals from "@/static/fixed_responses/conservationAnimals.json";
|
import conservationAnimals from "@/static/fixed_responses/conservationAnimals.json";
|
||||||
import { getInfNodes } from "@/src/helpers/nemesisHelpers";
|
import { getInfNodes } from "@/src/helpers/nemesisHelpers";
|
||||||
|
import { Loadout } from "../models/inventoryModels/loadoutModel";
|
||||||
|
|
||||||
const getRotations = (rotationCount: number): number[] => {
|
const getRotations = (rotationCount: number): number[] => {
|
||||||
if (rotationCount === 0) return [0];
|
if (rotationCount === 0) return [0];
|
||||||
@ -89,6 +90,31 @@ export const addMissionInventoryUpdates = async (
|
|||||||
if (inventoryUpdates.RewardInfo && inventoryUpdates.RewardInfo.NemesisAbandonedRewards) {
|
if (inventoryUpdates.RewardInfo && inventoryUpdates.RewardInfo.NemesisAbandonedRewards) {
|
||||||
inventory.NemesisAbandonedRewards = inventoryUpdates.RewardInfo.NemesisAbandonedRewards;
|
inventory.NemesisAbandonedRewards = inventoryUpdates.RewardInfo.NemesisAbandonedRewards;
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
inventoryUpdates.MissionFailed &&
|
||||||
|
inventoryUpdates.MissionStatus == "GS_FAILURE" &&
|
||||||
|
inventoryUpdates.EndOfMatchUpload &&
|
||||||
|
inventoryUpdates.ObjectiveReached
|
||||||
|
) {
|
||||||
|
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.toString(), [
|
||||||
|
{
|
||||||
|
sndr: "/Lotus/Language/Menu/Mailbox_WarframeSender",
|
||||||
|
msg: "/Lotus/Language/G1Quests/BrandedMessage",
|
||||||
|
sub: "/Lotus/Language/G1Quests/BrandedTitle",
|
||||||
|
att: ["/Lotus/Types/Recipes/Components/BrandRemovalBlueprint"],
|
||||||
|
highPriority: true // 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.
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (const [key, value] of getEntriesUnsafe(inventoryUpdates)) {
|
for (const [key, value] of getEntriesUnsafe(inventoryUpdates)) {
|
||||||
if (value === undefined) {
|
if (value === undefined) {
|
||||||
logger.error(`Inventory update key ${key} has no value `);
|
logger.error(`Inventory update key ${key} has no value `);
|
||||||
|
@ -44,6 +44,7 @@ export interface IInventoryDatabase
|
|||||||
| "NextRefill"
|
| "NextRefill"
|
||||||
| "Nemesis"
|
| "Nemesis"
|
||||||
| "EntratiVaultCountResetDate"
|
| "EntratiVaultCountResetDate"
|
||||||
|
| "BrandedSuits"
|
||||||
| TEquipmentKey
|
| TEquipmentKey
|
||||||
>,
|
>,
|
||||||
InventoryDatabaseEquipment {
|
InventoryDatabaseEquipment {
|
||||||
@ -73,6 +74,7 @@ export interface IInventoryDatabase
|
|||||||
NextRefill?: Date;
|
NextRefill?: Date;
|
||||||
Nemesis?: INemesisDatabase;
|
Nemesis?: INemesisDatabase;
|
||||||
EntratiVaultCountResetDate?: Date;
|
EntratiVaultCountResetDate?: Date;
|
||||||
|
BrandedSuits?: Types.ObjectId[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IQuestKeyDatabase {
|
export interface IQuestKeyDatabase {
|
||||||
@ -346,6 +348,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
|
|||||||
EchoesHexConquestCacheScoreMission?: number;
|
EchoesHexConquestCacheScoreMission?: number;
|
||||||
EchoesHexConquestActiveFrameVariants?: string[];
|
EchoesHexConquestActiveFrameVariants?: string[];
|
||||||
EchoesHexConquestActiveStickers?: string[];
|
EchoesHexConquestActiveStickers?: string[];
|
||||||
|
BrandedSuits?: IOid[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAffiliation {
|
export interface IAffiliation {
|
||||||
@ -857,10 +860,11 @@ export interface IPendingRecipeDatabase {
|
|||||||
LongGuns?: IEquipmentDatabase[];
|
LongGuns?: IEquipmentDatabase[];
|
||||||
Pistols?: IEquipmentDatabase[];
|
Pistols?: IEquipmentDatabase[];
|
||||||
Melee?: IEquipmentDatabase[];
|
Melee?: IEquipmentDatabase[];
|
||||||
|
SuitToUnbrand?: Types.ObjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPendingRecipeClient
|
export interface IPendingRecipeClient
|
||||||
extends Omit<IPendingRecipeDatabase, "CompletionDate" | "LongGuns" | "Pistols" | "Melee"> {
|
extends Omit<IPendingRecipeDatabase, "CompletionDate" | "LongGuns" | "Pistols" | "Melee" | "SuitToUnbrand"> {
|
||||||
CompletionDate: IMongoDate;
|
CompletionDate: IMongoDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user