feat: infested lich rewards #1898
@ -1,5 +1,5 @@
 | 
				
			|||||||
import { ExportRegions, ExportWarframes } from "warframe-public-export-plus";
 | 
					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 { getRewardAtPercentage, SRng } from "@/src/services/rngService";
 | 
				
			||||||
import { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel";
 | 
					import { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel";
 | 
				
			||||||
import { logger } from "../utils/logger";
 | 
					import { logger } from "../utils/logger";
 | 
				
			||||||
@ -353,6 +353,16 @@ export const sendCodaFinishedMessage = async (
 | 
				
			|||||||
    att.push(fromStoreItem(rotAReward));
 | 
					    att.push(fromStoreItem(rotAReward));
 | 
				
			||||||
    att.push(fromStoreItem(rotBReward));
 | 
					    att.push(fromStoreItem(rotBReward));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    let countedAtt: ITypeCount[] | undefined;
 | 
				
			||||||
 | 
					    if (killed) {
 | 
				
			||||||
 | 
					        countedAtt = [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                ItemType: "/Lotus/Types/Items/MiscItems/CodaWeaponBucks",
 | 
				
			||||||
 | 
					                ItemCount: getKillTokenRewardCount(fp)
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    await createMessage(inventory.accountOwnerId, [
 | 
					    await createMessage(inventory.accountOwnerId, [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            sndr: "/Lotus/Language/Bosses/Ordis",
 | 
					            sndr: "/Lotus/Language/Bosses/Ordis",
 | 
				
			||||||
@ -364,12 +374,7 @@ export const sendCodaFinishedMessage = async (
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
            att: att,
 | 
					            att: att,
 | 
				
			||||||
            countedAtt: [
 | 
					            countedAtt: countedAtt,
 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    ItemType: "/Lotus/Types/Items/MiscItems/CodaWeaponBucks",
 | 
					 | 
				
			||||||
                    ItemCount: getKillTokenRewardCount(fp)
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            sub: "/Lotus/Language/Inbox/VanquishBandMsgTitle",
 | 
					            sub: "/Lotus/Language/Inbox/VanquishBandMsgTitle",
 | 
				
			||||||
            icon: "/Lotus/Interface/Icons/Npcs/Ordis.png",
 | 
					            icon: "/Lotus/Interface/Icons/Npcs/Ordis.png",
 | 
				
			||||||
            highPriority: true
 | 
					            highPriority: true
 | 
				
			||||||
 | 
				
			|||||||
@ -658,15 +658,10 @@ export const addMissionInventoryUpdates = async (
 | 
				
			|||||||
                        if (value.petLoc) {
 | 
					                        if (value.petLoc) {
 | 
				
			||||||
                            giveNemesisPetRecipe(inventory);
 | 
					                            giveNemesisPetRecipe(inventory);
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        if (inventory.Nemesis.Faction == "FC_INFESTATION") {
 | 
					                    if (inventory.Nemesis.Faction == "FC_INFESTATION") {
 | 
				
			||||||
                            await sendCodaFinishedMessage(
 | 
					                        await sendCodaFinishedMessage(inventory, inventory.Nemesis.fp, value.nemesisName, value.killed);
 | 
				
			||||||
                                inventory,
 | 
					 | 
				
			||||||
                                inventory.Nemesis.fp,
 | 
					 | 
				
			||||||
                                value.nemesisName,
 | 
					 | 
				
			||||||
                                value.killed
 | 
					 | 
				
			||||||
                            );
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    inventory.Nemesis = undefined;
 | 
					                    inventory.Nemesis = undefined;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user