Merge pull request #1488 from akortunov/equipfix

AI: Autoequip armor when bound armor spell expires
This commit is contained in:
scrawl 2017-10-01 16:06:26 +00:00 committed by GitHub
commit b24fd77ea2

View file

@ -71,7 +71,9 @@ void adjustBoundItem (const std::string& item, bool bound, const MWWorld::Ptr& a
}
else
{
actor.getClass().getContainerStore(actor).remove(item, 1, actor);
MWWorld::Ptr itemPtr = actor.getClass().getInventoryStore(actor).search(item);
if (!itemPtr.isEmpty())
actor.getClass().getInventoryStore(actor).remove(itemPtr, 1, actor, true);
}
}