|
|
|
@ -3,6 +3,9 @@
|
|
|
|
|
|
|
|
|
|
#include "class.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
ActionApply::ActionApply (const Ptr& target, const std::string& id)
|
|
|
|
@ -11,6 +14,8 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
void ActionApply::executeImp (const Ptr& actor)
|
|
|
|
|
{
|
|
|
|
|
MWBase::Environment::get().getWorld()->breakInvisibility(actor);
|
|
|
|
|
|
|
|
|
|
MWWorld::Class::get (getTarget()).apply (getTarget(), mId, actor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -22,6 +27,8 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
void ActionApplyWithSkill::executeImp (const Ptr& actor)
|
|
|
|
|
{
|
|
|
|
|
MWBase::Environment::get().getWorld()->breakInvisibility(actor);
|
|
|
|
|
|
|
|
|
|
if (MWWorld::Class::get (getTarget()).apply (getTarget(), mId, actor) && mUsageType!=-1)
|
|
|
|
|
MWWorld::Class::get (getTarget()).skillUsageSucceeded (actor, mSkillIndex, mUsageType);
|
|
|
|
|
}
|
|
|
|
|