|
|
|
@ -654,7 +654,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);
|
|
|
|
|
|
|
|
|
@ -676,8 +676,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();
|
|
|
|
|