1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 10:53:53 +00:00

Don't autoequip items when implicitely adding an item using equip

This commit is contained in:
Evil Eye 2021-02-13 20:55:24 +01:00
parent 382d458f9c
commit 879e66a043

View file

@ -308,7 +308,8 @@ namespace MWScript
} }
if (it == invStore.end()) if (it == invStore.end())
{ {
it = ptr.getClass().getContainerStore (ptr).add (item, 1, ptr); MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), item, 1);
it = ptr.getClass().getContainerStore (ptr).add (ref.getPtr(), 1, ptr, false);
Log(Debug::Warning) << "Implicitly adding one " << item << Log(Debug::Warning) << "Implicitly adding one " << item <<
" to the inventory store of " << ptr.getCellRef().getRefId() << " to the inventory store of " << ptr.getCellRef().getRefId() <<
" to fulfill the requirements of Equip instruction"; " to fulfill the requirements of Equip instruction";