feat: handle EmailItems received during mission
All checks were successful
Build / build (22) (push) Successful in 36s
Build / build (18) (push) Successful in 1m3s
Build / build (20) (push) Successful in 53s
Build / build (18) (pull_request) Successful in 40s
Build / build (20) (pull_request) Successful in 1m1s
Build / build (22) (pull_request) Successful in 53s
All checks were successful
Build / build (22) (push) Successful in 36s
Build / build (18) (push) Successful in 1m3s
Build / build (20) (push) Successful in 53s
Build / build (18) (pull_request) Successful in 40s
Build / build (20) (pull_request) Successful in 1m1s
Build / build (22) (pull_request) Successful in 53s
This commit is contained in:
parent
97b61b51b7
commit
1341b71177
@ -1,4 +1,5 @@
|
||||
import {
|
||||
ExportEmailItems,
|
||||
ExportFusionBundles,
|
||||
ExportRegions,
|
||||
ExportRewards,
|
||||
@ -27,7 +28,7 @@ import {
|
||||
import { updateQuestKey } from "@/src/services/questService";
|
||||
import { HydratedDocument } from "mongoose";
|
||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||
import { getLevelKeyRewards, getNode } from "@/src/services/itemDataService";
|
||||
import { convertInboxMessage, getLevelKeyRewards, getNode } from "@/src/services/itemDataService";
|
||||
import { InventoryDocumentProps, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
|
||||
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||
@ -156,6 +157,13 @@ export const addMissionInventoryUpdates = (
|
||||
inventoryChanges.FusionPoints = fusionPoints;
|
||||
break;
|
||||
}
|
||||
case "EmailItems": {
|
||||
value.forEach(tc => {
|
||||
const emailItem = ExportEmailItems[tc.ItemType];
|
||||
void createMessage(inventory.accountOwnerId.toString(), [convertInboxMessage(emailItem.message)]);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "FocusXpIncreases": {
|
||||
addFocusXpIncreases(inventory, value);
|
||||
break;
|
||||
|
@ -46,6 +46,7 @@ export type IMissionInventoryUpdateRequest = {
|
||||
CrewShipRawSalvage?: ITypeCount[];
|
||||
CrewShipAmmo?: ITypeCount[];
|
||||
BonusMiscItems?: ITypeCount[];
|
||||
EmailItems?: ITypeCount[];
|
||||
|
||||
SyndicateId?: string;
|
||||
SortieId?: string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user