diff --git a/src/tasks/minions/monsterActivity.ts b/src/tasks/minions/monsterActivity.ts index 26ba111b13..bc85eca7d0 100644 --- a/src/tasks/minions/monsterActivity.ts +++ b/src/tasks/minions/monsterActivity.ts @@ -511,22 +511,22 @@ export const monsterTask: MinionTask = { messages.push(...rawResults.filter(r => typeof r === 'string')); const str = `${user}, ${user.minionName} finished killing ${quantity} ${monster.name} (${calcPerHour(data.q, data.duration).toFixed(1)}/hr), you now have ${newKC} KC.`; - announceLoot({ - user, - monsterID: monster.id, - loot: itemTransactionResult!.itemsAdded, - notifyDrops: monster.notifyDrops - }); + let image = undefined; - const image = - itemTransactionResult!.itemsAdded.length === 0 - ? undefined - : await makeBankImage({ - bank: itemTransactionResult!.itemsAdded, - title: `Loot From ${quantity} ${monster.name}:`, - user, - previousCL: itemTransactionResult?.previousCL - }); + if (itemTransactionResult && itemTransactionResult.itemsAdded.length > 0) { + announceLoot({ + user, + monsterID: monster.id, + loot: itemTransactionResult.itemsAdded, + notifyDrops: monster.notifyDrops + }); + image = await makeBankImage({ + bank: itemTransactionResult.itemsAdded, + title: `Loot From ${quantity} ${monster.name}:`, + user, + previousCL: itemTransactionResult?.previousCL + }); + } return handleTripFinish( user,