|
|
|
@ -471,16 +471,18 @@ namespace MWGui
|
|
|
|
|
MWBase::Environment::get().getScriptManager()->run (script, interpreterContext);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (script.empty() || ptr.getRefData().getLocals().getIntVar(script, "pcskipequip") == 0)
|
|
|
|
|
mSkippedToEquip = MWWorld::Ptr();
|
|
|
|
|
if (ptr.getRefData().getCount()) // make sure the item is still there, the script might have removed it
|
|
|
|
|
{
|
|
|
|
|
boost::shared_ptr<MWWorld::Action> action = ptr.getClass().use(ptr);
|
|
|
|
|
|
|
|
|
|
action->execute (player);
|
|
|
|
|
if (script.empty() || ptr.getRefData().getLocals().getIntVar(script, "pcskipequip") == 0)
|
|
|
|
|
{
|
|
|
|
|
boost::shared_ptr<MWWorld::Action> action = ptr.getClass().use(ptr);
|
|
|
|
|
|
|
|
|
|
mSkippedToEquip = MWWorld::Ptr();
|
|
|
|
|
action->execute (player);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
mSkippedToEquip = ptr;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
mSkippedToEquip = ptr;
|
|
|
|
|
|
|
|
|
|
if (isVisible())
|
|
|
|
|
{
|
|
|
|
|