feat: handle acquisition of EmailItems
All checks were successful
Build / build (18) (push) Successful in 52s
Build / build (22) (push) Successful in 1m0s
Build / build (20) (push) Successful in 58s
Build / build (18) (pull_request) Successful in 52s
Build / build (20) (pull_request) Successful in 54s
Build / build (22) (pull_request) Successful in 57s
All checks were successful
Build / build (18) (push) Successful in 52s
Build / build (22) (push) Successful in 1m0s
Build / build (20) (push) Successful in 58s
Build / build (18) (pull_request) Successful in 52s
Build / build (20) (pull_request) Successful in 54s
Build / build (22) (pull_request) Successful in 57s
This commit is contained in:
parent
839ddd6a40
commit
60cae3d5de
@ -35,7 +35,7 @@ import {
|
|||||||
IUpdateChallengeProgressRequest
|
IUpdateChallengeProgressRequest
|
||||||
} from "../types/requestTypes";
|
} from "../types/requestTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { getExalted, getKeyChainItems } from "@/src/services/itemDataService";
|
import { convertInboxMessage, getExalted, getKeyChainItems } from "@/src/services/itemDataService";
|
||||||
import {
|
import {
|
||||||
EquipmentFeatures,
|
EquipmentFeatures,
|
||||||
IEquipmentClient,
|
IEquipmentClient,
|
||||||
@ -47,6 +47,7 @@ import {
|
|||||||
ExportBundles,
|
ExportBundles,
|
||||||
ExportCustoms,
|
ExportCustoms,
|
||||||
ExportDrones,
|
ExportDrones,
|
||||||
|
ExportEmailItems,
|
||||||
ExportEnemies,
|
ExportEnemies,
|
||||||
ExportFlavour,
|
ExportFlavour,
|
||||||
ExportFusionBundles,
|
ExportFusionBundles,
|
||||||
@ -71,6 +72,7 @@ import { addQuestKey, completeQuest } from "@/src/services/questService";
|
|||||||
import { handleBundleAcqusition } from "./purchaseService";
|
import { handleBundleAcqusition } from "./purchaseService";
|
||||||
import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json";
|
import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json";
|
||||||
import { getRandomElement, getRandomInt } from "./rngService";
|
import { getRandomElement, getRandomInt } from "./rngService";
|
||||||
|
import { createMessage } from "./inboxService";
|
||||||
|
|
||||||
export const createInventory = async (
|
export const createInventory = async (
|
||||||
accountOwnerId: Types.ObjectId,
|
accountOwnerId: Types.ObjectId,
|
||||||
@ -425,6 +427,13 @@ export const addItem = async (
|
|||||||
InventoryChanges: inventoryChanges
|
InventoryChanges: inventoryChanges
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (typeName in ExportEmailItems) {
|
||||||
|
const emailItem = ExportEmailItems[typeName];
|
||||||
|
await createMessage(inventory.accountOwnerId.toString(), [convertInboxMessage(emailItem.message)]);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Path-based duck typing
|
// Path-based duck typing
|
||||||
switch (typeName.substr(1).split("/")[1]) {
|
switch (typeName.substr(1).split("/")[1]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user