(dc8407cf2) Properly remove reported targets when they are done. Fix get item completing when it shouldn't if the target item was supposed to be equipped.
This commit is contained in:
@@ -271,10 +271,13 @@ namespace Barotrauma
|
||||
{
|
||||
bool isEquipped = !equip || character.HasEquippedItem(item);
|
||||
if (character.Inventory.Items.Contains(item) && isEquipped) { return true; }
|
||||
Item rootContainer = item.GetRootContainer();
|
||||
if (rootContainer != null && rootContainer.ParentInventory is CharacterInventory)
|
||||
if (!equip)
|
||||
{
|
||||
return rootContainer.ParentInventory.Owner == character;
|
||||
Item rootContainer = item.GetRootContainer();
|
||||
if (rootContainer != null && rootContainer.ParentInventory is CharacterInventory)
|
||||
{
|
||||
return rootContainer.ParentInventory.Owner == character;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user