diff --git a/dGame/dComponents/InventoryComponent.cpp b/dGame/dComponents/InventoryComponent.cpp index f1bd8db..c5b4bec 100644 --- a/dGame/dComponents/InventoryComponent.cpp +++ b/dGame/dComponents/InventoryComponent.cpp @@ -1043,7 +1043,7 @@ void InventoryComponent::EquipItem(Item* item, const bool skipChecks) UpdateSlot(item->GetInfo().equipLocation, { item->GetId(), item->GetLot(), item->GetCount(), item->GetSlot() }); - ApplyBuff(item->GetLot()); + if (item->GetParent() == LWOOBJID_EMPTY) ApplyBuff(item->GetLot()); AddItemSkills(item->GetLot()); @@ -1071,7 +1071,7 @@ void InventoryComponent::UnEquipItem(Item* item) set->OnUnEquip(lot); } - RemoveBuff(item->GetLot()); + if (item->GetParent() == LWOOBJID_EMPTY) RemoveBuff(item->GetLot()); RemoveItemSkills(item->GetLot()); @@ -1531,7 +1531,7 @@ std::vector InventoryComponent::GenerateProxies(Item* parent) auto* inventory = GetInventory(ITEM_SETS); - auto* proxy = new Item(lot, inventory, inventory->FindEmptySlot(), 1, {}, parent->GetId(), false); + auto* proxy = new Item(lot, inventory, inventory->FindEmptySlot(), 1, {}, parent->GetId(), false, parent->GetId()); EquipItem(proxy); diff --git a/dGame/dComponents/InventoryComponent.h b/dGame/dComponents/InventoryComponent.h index 7c62170..2214380 100644 --- a/dGame/dComponents/InventoryComponent.h +++ b/dGame/dComponents/InventoryComponent.h @@ -407,8 +407,8 @@ private: std::vector FindProxies(LWOOBJID parent); /** - * Returns if the provided ID is a valid proxy item (e.g. we have children for it) - * @param parent the parent item to check for + * Returns true if the provided LWOOBJID is the parent of this Item. + * @param parent the parent item to check for proxies * @return if the provided ID is a valid proxy item */ bool IsValidProxy(LWOOBJID parent);