Skip to content

Commit

Permalink
Don't equip items with zero count
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Mar 10, 2024
1 parent 8ce120e commit 066b0d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SPID/src/Distribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 066b0d5

Please sign in to comment.