|
|
|
@ -653,6 +653,9 @@ namespace MWGui
|
|
|
|
|
if (object.getClass().getName(object) == "") // objects without name presented to user can never be picked up
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!object.getRefData().activate())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
int count = object.getRefData().getCount();
|
|
|
|
|
|
|
|
|
|
MWWorld::Ptr player = MWMechanics::getPlayer();
|
|
|
|
@ -664,12 +667,6 @@ namespace MWGui
|
|
|
|
|
// can't use ActionTake here because we need an MWWorld::Ptr to the newly inserted object
|
|
|
|
|
MWWorld::Ptr newObject = *player.getClass().getContainerStore (player).add (object, object.getRefData().getCount(), player);
|
|
|
|
|
|
|
|
|
|
if (object.getRefData().hasSuppressActivate()) // if Flag_SuppressActivate is set, script that contains OnActivate is attached to the item
|
|
|
|
|
{
|
|
|
|
|
newObject.getRefData().onActivate(); // set the flag_SuppressActivate flag for the new item
|
|
|
|
|
newObject.getRefData().activate();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// remove from world
|
|
|
|
|
MWBase::Environment::get().getWorld()->deleteObject (object);
|
|
|
|
|
|
|
|
|
|