From cc55056adf73f865b4480ba0617839e5a5a5ea12 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 4 Sep 2012 15:18:59 +0200 Subject: [PATCH] Issue #370: replaced custom target handling in apply action with base class implementation --- apps/openmw/mwworld/actionapply.cpp | 10 +++++----- apps/openmw/mwworld/actionapply.hpp | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwworld/actionapply.cpp b/apps/openmw/mwworld/actionapply.cpp index 595ee6cb3..f78b8f798 100644 --- a/apps/openmw/mwworld/actionapply.cpp +++ b/apps/openmw/mwworld/actionapply.cpp @@ -6,23 +6,23 @@ namespace MWWorld { ActionApply::ActionApply (const Ptr& target, const std::string& id) - : mTarget (target), mId (id) + : Action (false, target), mId (id) {} void ActionApply::executeImp (const Ptr& actor) { - MWWorld::Class::get (mTarget).apply (mTarget, mId, actor); + MWWorld::Class::get (getTarget()).apply (getTarget(), mId, actor); } ActionApplyWithSkill::ActionApplyWithSkill (const Ptr& target, const std::string& id, int skillIndex, int usageType) - : mTarget (target), mId (id), mSkillIndex (skillIndex), mUsageType (usageType) + : Action (false, target), mId (id), mSkillIndex (skillIndex), mUsageType (usageType) {} void ActionApplyWithSkill::executeImp (const Ptr& actor) { - if (MWWorld::Class::get (mTarget).apply (mTarget, mId, actor) && mUsageType!=-1) - MWWorld::Class::get (mTarget).skillUsageSucceeded (actor, mSkillIndex, mUsageType); + if (MWWorld::Class::get (getTarget()).apply (getTarget(), mId, actor) && mUsageType!=-1) + MWWorld::Class::get (getTarget()).skillUsageSucceeded (actor, mSkillIndex, mUsageType); } } diff --git a/apps/openmw/mwworld/actionapply.hpp b/apps/openmw/mwworld/actionapply.hpp index 523bf9373..3353ae0ee 100644 --- a/apps/openmw/mwworld/actionapply.hpp +++ b/apps/openmw/mwworld/actionapply.hpp @@ -11,7 +11,6 @@ namespace MWWorld { class ActionApply : public Action { - Ptr mTarget; std::string mId; virtual void executeImp (const Ptr& actor); @@ -23,7 +22,6 @@ namespace MWWorld class ActionApplyWithSkill : public Action { - Ptr mTarget; std::string mId; int mSkillIndex; int mUsageType;