Do not set owner when adding items to a container, as opposed to NPC/creatures

This commit is contained in:
scrawl 2014-01-16 07:11:34 +01:00
parent fe66012bcd
commit 2836c7c927

View file

@ -149,7 +149,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
item.getCellRef().mPos.pos[1] = 0;
item.getCellRef().mPos.pos[2] = 0;
if (setOwner)
if (setOwner && actorPtr.getClass().isActor())
item.getCellRef().mOwner = actorPtr.getCellRef().mRefID;
std::string script = MWWorld::Class::get(item).getScript(item);