|
|
|
@ -366,8 +366,18 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
|
|
|
|
|
item.getRefData().getLocals().setVarByInt(script, "onpcadd", 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mListener)
|
|
|
|
|
mListener->itemAdded(item, count);
|
|
|
|
|
/*
|
|
|
|
|
Start of tes3mp change (major)
|
|
|
|
|
|
|
|
|
|
Disable the listener here because it keeps causing crashes; this should only be
|
|
|
|
|
a temporary solution that doesn't affect much anyway given that the listener is
|
|
|
|
|
only used in relation to light-emitting items
|
|
|
|
|
*/
|
|
|
|
|
//if (mListener)
|
|
|
|
|
// mListener->itemAdded(item, count);
|
|
|
|
|
/*
|
|
|
|
|
End of tes3mp change (major)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
return it;
|
|
|
|
|
}
|
|
|
|
@ -493,8 +503,18 @@ int MWWorld::ContainerStore::remove(const Ptr& item, int count, const Ptr& actor
|
|
|
|
|
|
|
|
|
|
flagAsModified();
|
|
|
|
|
|
|
|
|
|
if (mListener)
|
|
|
|
|
mListener->itemRemoved(item, count - toRemove);
|
|
|
|
|
/*
|
|
|
|
|
Start of tes3mp change (major)
|
|
|
|
|
|
|
|
|
|
Disable the listener here because it keeps causing crashes; this should only be
|
|
|
|
|
a temporary solution that doesn't affect much anyway given that the listener is
|
|
|
|
|
only used in relation to light-emitting items
|
|
|
|
|
*/
|
|
|
|
|
//if (mListener)
|
|
|
|
|
// mListener->itemRemoved(item, count - toRemove);
|
|
|
|
|
/*
|
|
|
|
|
End of tes3mp change (major)
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// number of removed items
|
|
|
|
|
return count - toRemove;
|
|
|
|
|