remove instances of HydratedDocument<IInventoryDatabase>
Some checks failed
Build / build (22) (push) Failing after 40s
Build / build (20) (push) Failing after 1m16s
Build / build (18) (push) Failing after 1m12s
Build / build (18) (pull_request) Failing after 43s
Build / build (20) (pull_request) Failing after 1m14s
Build / build (22) (pull_request) Failing after 1m16s
Some checks failed
Build / build (22) (push) Failing after 40s
Build / build (20) (push) Failing after 1m16s
Build / build (18) (push) Failing after 1m12s
Build / build (18) (pull_request) Failing after 43s
Build / build (20) (pull_request) Failing after 1m14s
Build / build (22) (pull_request) Failing after 1m16s
This commit is contained in:
parent
0a8f2b9559
commit
067b524af1
@ -1,10 +1,6 @@
|
||||
import {
|
||||
Inventory,
|
||||
InventoryDocumentProps,
|
||||
TInventoryDatabaseDocument
|
||||
} from "@/src/models/inventoryModels/inventoryModel";
|
||||
import { Inventory, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||
import { config } from "@/src/services/configService";
|
||||
import { HydratedDocument, Types } from "mongoose";
|
||||
import { Types } from "mongoose";
|
||||
import { SlotNames, IInventoryChanges, IBinChanges, slotNames } from "@/src/types/purchaseTypes";
|
||||
import {
|
||||
IChallengeProgress,
|
||||
@ -19,7 +15,6 @@ import {
|
||||
TEquipmentKey,
|
||||
IFusionTreasure,
|
||||
IDailyAffiliations,
|
||||
IInventoryDatabase,
|
||||
IKubrowPetEggDatabase,
|
||||
IKubrowPetEggClient,
|
||||
ILibraryDailyTaskInfo,
|
||||
@ -129,7 +124,7 @@ const awakeningRewards = [
|
||||
];
|
||||
|
||||
export const addStartingGear = async (
|
||||
inventory: HydratedDocument<IInventoryDatabase, InventoryDocumentProps>,
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
startingGear: TPartialStartingGear | undefined = undefined
|
||||
): Promise<IInventoryChanges> => {
|
||||
const { LongGuns, Pistols, Suits, Melee } = startingGear || {
|
||||
@ -1375,7 +1370,7 @@ export const addBooster = (ItemType: string, time: number, inventory: TInventory
|
||||
};
|
||||
|
||||
export const updateSyndicate = (
|
||||
inventory: HydratedDocument<IInventoryDatabase, InventoryDocumentProps>,
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
syndicateUpdate: IMissionInventoryUpdateRequest["AffiliationChanges"]
|
||||
): void => {
|
||||
syndicateUpdate?.forEach(affiliation => {
|
||||
|
@ -32,10 +32,10 @@ import {
|
||||
updateSyndicate
|
||||
} from "@/src/services/inventoryService";
|
||||
import { updateQuestKey } from "@/src/services/questService";
|
||||
import { HydratedDocument, Types } from "mongoose";
|
||||
import { Types } from "mongoose";
|
||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||
import { getLevelKeyRewards, toStoreItem } from "@/src/services/itemDataService";
|
||||
import { InventoryDocumentProps, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
|
||||
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||
import { handleStoreItemAcquisition } from "./purchaseService";
|
||||
@ -73,7 +73,7 @@ const getRandomRewardByChance = (pool: IReward[]): IRngResult | undefined => {
|
||||
//const knownUnhandledKeys: readonly string[] = ["test"] as const; // for unimplemented but important keys
|
||||
|
||||
export const addMissionInventoryUpdates = async (
|
||||
inventory: HydratedDocument<IInventoryDatabase, InventoryDocumentProps>,
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
inventoryUpdates: IMissionInventoryUpdateRequest
|
||||
): Promise<IInventoryChanges> => {
|
||||
const inventoryChanges: IInventoryChanges = {};
|
||||
@ -661,7 +661,7 @@ interface IMissionCredits {
|
||||
//creditBonus is not entirely accurate.
|
||||
//TODO: consider ActiveBoosters
|
||||
export const addCredits = (
|
||||
inventory: HydratedDocument<IInventoryDatabase>,
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
{
|
||||
missionDropCredits,
|
||||
missionCompletionCredits,
|
||||
|
@ -9,14 +9,9 @@ import {
|
||||
getLevelKeyRewards,
|
||||
getQuestCompletionItems
|
||||
} from "@/src/services/itemDataService";
|
||||
import {
|
||||
IInventoryDatabase,
|
||||
IQuestKeyClient,
|
||||
IQuestKeyDatabase,
|
||||
IQuestStage
|
||||
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||
import { IQuestKeyClient, IQuestKeyDatabase, IQuestStage } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||
import { logger } from "@/src/utils/logger";
|
||||
import { HydratedDocument, Types } from "mongoose";
|
||||
import { Types } from "mongoose";
|
||||
import { ExportKeys } from "warframe-public-export-plus";
|
||||
import { addFixedLevelRewards } from "./missionInventoryUpdateService";
|
||||
import { IInventoryChanges } from "../types/purchaseTypes";
|
||||
@ -31,7 +26,7 @@ export interface IUpdateQuestRequest {
|
||||
}
|
||||
|
||||
export const updateQuestKey = async (
|
||||
inventory: HydratedDocument<IInventoryDatabase>,
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
questKeyUpdate: IUpdateQuestRequest["QuestKeys"]
|
||||
): Promise<IInventoryChanges> => {
|
||||
if (questKeyUpdate.length > 1) {
|
||||
@ -45,7 +40,7 @@ export const updateQuestKey = async (
|
||||
throw new Error(`quest key ${questKeyUpdate[0].ItemType} not found`);
|
||||
}
|
||||
|
||||
inventory.QuestKeys[questKeyIndex] = questKeyUpdate[0];
|
||||
inventory.QuestKeys[questKeyIndex].overwrite(questKeyUpdate[0]);
|
||||
|
||||
let inventoryChanges: IInventoryChanges = {};
|
||||
if (questKeyUpdate[0].Completed) {
|
||||
@ -57,12 +52,12 @@ export const updateQuestKey = async (
|
||||
logger.debug(`quest completion items`, questCompletionItems);
|
||||
|
||||
if (questCompletionItems) {
|
||||
inventoryChanges = await addItems(inventory as TInventoryDatabaseDocument, questCompletionItems);
|
||||
inventoryChanges = await addItems(inventory, questCompletionItems);
|
||||
}
|
||||
inventory.ActiveQuest = "";
|
||||
|
||||
if (questKeyUpdate[0].ItemType == "/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain") {
|
||||
setupKahlSyndicate(inventory as TInventoryDatabaseDocument);
|
||||
setupKahlSyndicate(inventory);
|
||||
}
|
||||
}
|
||||
return inventoryChanges;
|
||||
|
Loading…
x
Reference in New Issue
Block a user