From 066b0d528a08d7df1a35f0707c70ec8984ef263d Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Sun, 10 Mar 2024 14:34:56 +0530 Subject: [PATCH] Don't equip items with zero count --- SPID/src/Distribute.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SPID/src/Distribute.cpp b/SPID/src/Distribute.cpp index 601738c..bbabfb3 100644 --- a/SPID/src/Distribute.cpp +++ b/SPID/src/Distribute.cpp @@ -179,7 +179,8 @@ namespace Distribute return item.Is(RE::FormType::Weapon, RE::FormType::Armor); }); for (auto& [item, data] : inv_after) { - if (!inv_before.contains(item) && item->Is(RE::FormType::Weapon, RE::FormType::Armor)) { + auto& [count, extra] = data; + if (!inv_before.contains(item) && count > 0 && !extra->IsWorn()) { RE::ActorEquipManager::GetSingleton()->EquipObject(actor, item); } }