mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
AI: Autoequip armor when bound armor spell expires
This commit is contained in:
parent
3c62a8c5c2
commit
21b6bd176f
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue