diff --git a/OrderbotTags/LLDiscardItem.cs b/OrderbotTags/LLDiscardItem.cs index 89b6caa..d0c0f14 100644 --- a/OrderbotTags/LLDiscardItem.cs +++ b/OrderbotTags/LLDiscardItem.cs @@ -1,4 +1,4 @@ -using System.ComponentModel; +using System.ComponentModel; using System.Linq; using System.Threading.Tasks; using Buddy.Coroutines; @@ -20,6 +20,10 @@ public class LLDiscardItem : LLProfileBehavior [DefaultValue(new int[0])] private int[] ItemIds { get; set; } + [XmlAttribute("Armory")] + [DefaultValue(false)] + public bool IncludeArmory { get; set; } + private bool _isDone; public override bool HighPriority => true; @@ -54,7 +58,10 @@ private async Task DiscardItems() return; } - var slots = InventoryManager.FilledSlots.Where(x => ItemIds.Contains((int)x.RawItemId)).ToList(); + // Use FilledInventoryAndArmory if Armory is true, otherwise just FilledSlots + var slots = (IncludeArmory ? InventoryManager.FilledInventoryAndArmory : InventoryManager.FilledSlots) + .Where(x => ItemIds.Contains((int)x.RawItemId)) + .ToList(); if (!slots.Any()) { @@ -82,4 +89,4 @@ private async Task DiscardItems() _isDone = true; } } -} \ No newline at end of file +}