From a4a53b56a97902028c88e444899628fb3a24865d Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 28 Apr 2025 01:35:12 +0200 Subject: [PATCH] somewhat handle converting of the lich --- src/helpers/nemesisHelpers.ts | 19 ++++++++++++------- src/services/missionInventoryUpdateService.ts | 11 +++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/helpers/nemesisHelpers.ts b/src/helpers/nemesisHelpers.ts index f90cf3b7..2c3347ac 100644 --- a/src/helpers/nemesisHelpers.ts +++ b/src/helpers/nemesisHelpers.ts @@ -1,5 +1,5 @@ import { ExportRegions, ExportWarframes } from "warframe-public-export-plus"; -import { IInfNode } from "@/src/types/inventoryTypes/inventoryTypes"; +import { IInfNode, ITypeCount } from "@/src/types/inventoryTypes/inventoryTypes"; import { getRewardAtPercentage, SRng } from "@/src/services/rngService"; import { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel"; import { logger } from "../utils/logger"; @@ -353,6 +353,16 @@ export const sendCodaFinishedMessage = async ( att.push(fromStoreItem(rotAReward)); att.push(fromStoreItem(rotBReward)); + let countedAtt: ITypeCount[] | undefined; + if (killed) { + countedAtt = [ + { + ItemType: "/Lotus/Types/Items/MiscItems/CodaWeaponBucks", + ItemCount: getKillTokenRewardCount(fp) + } + ]; + } + await createMessage(inventory.accountOwnerId, [ { sndr: "/Lotus/Language/Bosses/Ordis", @@ -364,12 +374,7 @@ export const sendCodaFinishedMessage = async ( } ], att: att, - countedAtt: [ - { - ItemType: "/Lotus/Types/Items/MiscItems/CodaWeaponBucks", - ItemCount: getKillTokenRewardCount(fp) - } - ], + countedAtt: countedAtt, sub: "/Lotus/Language/Inbox/VanquishBandMsgTitle", icon: "/Lotus/Interface/Icons/Npcs/Ordis.png", highPriority: true diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 4e6c5246..cbc44e17 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -658,15 +658,10 @@ export const addMissionInventoryUpdates = async ( if (value.petLoc) { giveNemesisPetRecipe(inventory); } + } - if (inventory.Nemesis.Faction == "FC_INFESTATION") { - await sendCodaFinishedMessage( - inventory, - inventory.Nemesis.fp, - value.nemesisName, - value.killed - ); - } + if (inventory.Nemesis.Faction == "FC_INFESTATION") { + await sendCodaFinishedMessage(inventory, inventory.Nemesis.fp, value.nemesisName, value.killed); } inventory.Nemesis = undefined;