forked from liza/ARDiscard
Add an option to never discard items crafted manually
This commit is contained in:
parent
24b76b1b49
commit
0d7f9f4aa4
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<Version>4.5</Version>
|
||||
<Version>4.6</Version>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
|
@ -15,6 +15,7 @@ internal sealed class Configuration : IPluginConfiguration
|
||||
public ContextMenuConfiguration ContextMenu { get; set; } = new();
|
||||
public PreviewConfiguration Preview { get; set; } = new();
|
||||
public uint IgnoreItemCountWhenAbove { get; set; } = 50;
|
||||
public bool IgnoreItemWithSignature { get; set; }
|
||||
|
||||
public sealed class CharacterInfo
|
||||
{
|
||||
|
@ -133,6 +133,9 @@ internal sealed class InventoryUtils
|
||||
itemInfo.ILvl >= _configuration.Armoury.MaximumGearItemLevel)
|
||||
continue;
|
||||
|
||||
if (_configuration.IgnoreItemWithSignature && item->CrafterContentID != 0)
|
||||
continue;
|
||||
|
||||
//PluginLog.Verbose($"{i} → {item->ItemID}");
|
||||
if (_configuration.DiscardingItems.Contains(item->ItemID))
|
||||
{
|
||||
|
@ -284,7 +284,8 @@ internal sealed class ConfigWindow : LImGui.LWindow
|
||||
ImGui.Indent(30);
|
||||
|
||||
bool mainHandOffHand = _configuration.Armoury.CheckMainHandOffHand;
|
||||
if (ImGui.Checkbox("Discard when items are found in Main Hand/Off Hand (Weapons and Tools)", ref mainHandOffHand))
|
||||
if (ImGui.Checkbox("Discard when items are found in Main Hand/Off Hand (Weapons and Tools)",
|
||||
ref mainHandOffHand))
|
||||
{
|
||||
_configuration.Armoury.CheckMainHandOffHand = mainHandOffHand;
|
||||
Save();
|
||||
@ -348,6 +349,15 @@ internal sealed class ConfigWindow : LImGui.LWindow
|
||||
Save();
|
||||
}
|
||||
|
||||
bool ignoreItemWithSignature = _configuration.IgnoreItemWithSignature;
|
||||
if (ImGui.Checkbox(
|
||||
"Ignore items with a 'crafted by' signature (manually crafted by yourself or someone else)",
|
||||
ref ignoreItemWithSignature))
|
||||
{
|
||||
_configuration.IgnoreItemWithSignature = ignoreItemWithSignature;
|
||||
Save();
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
bool groupPreviewByCategory = _configuration.Preview.GroupByCategory;
|
||||
|
Loading…
Reference in New Issue
Block a user