|
|
|
@ -660,7 +660,7 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::getSelectedEnchantItem(
|
|
|
|
|
return mSelectedEnchantItem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int MWWorld::InventoryStore::remove(const Ptr& item, int count, const Ptr& actor)
|
|
|
|
|
int MWWorld::InventoryStore::remove(const Ptr& item, int count, const Ptr& actor, bool equipReplacement)
|
|
|
|
|
{
|
|
|
|
|
int retCount = ContainerStore::remove(item, count, actor);
|
|
|
|
|
|
|
|
|
@ -682,8 +682,9 @@ int MWWorld::InventoryStore::remove(const Ptr& item, int count, const Ptr& actor
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If an armor/clothing item is removed, try to find a replacement,
|
|
|
|
|
// but not for the player nor werewolves.
|
|
|
|
|
if (wasEquipped && (actor != MWMechanics::getPlayer())
|
|
|
|
|
// but not for the player nor werewolves, and not if the RemoveItem script command
|
|
|
|
|
// was used (equipReplacement is false)
|
|
|
|
|
if (equipReplacement && wasEquipped && (actor != MWMechanics::getPlayer())
|
|
|
|
|
&& actor.getClass().isNpc() && !actor.getClass().getNpcStats(actor).isWerewolf())
|
|
|
|
|
{
|
|
|
|
|
std::string type = item.getTypeName();
|
|
|
|
|