From 8c2b4f996c044bc5b92a14f91b847c5759a29bb1 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 4 Sep 2012 15:27:10 +0200 Subject: [PATCH] Issue #370: replaced custom target handling in equip action with base class implementation --- apps/openmw/mwworld/actionequip.cpp | 6 +++--- apps/openmw/mwworld/actionequip.hpp | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwworld/actionequip.cpp b/apps/openmw/mwworld/actionequip.cpp index 20e0afb68..d8c019644 100644 --- a/apps/openmw/mwworld/actionequip.cpp +++ b/apps/openmw/mwworld/actionequip.cpp @@ -9,7 +9,7 @@ namespace MWWorld { - ActionEquip::ActionEquip (const MWWorld::Ptr& object) : mObject (object) + ActionEquip::ActionEquip (const MWWorld::Ptr& object) : Action (false, object) { } @@ -19,13 +19,13 @@ namespace MWWorld MWWorld::InventoryStore& invStore = MWWorld::Class::get(player).getInventoryStore(player); // slots that this item can be equipped in - std::pair, bool> slots = MWWorld::Class::get(mObject).getEquipmentSlots(mObject); + std::pair, bool> slots = MWWorld::Class::get(getTarget()).getEquipmentSlots(getTarget()); // retrieve ContainerStoreIterator to the item MWWorld::ContainerStoreIterator it = invStore.begin(); for (; it != invStore.end(); ++it) { - if (*it == mObject) + if (*it == getTarget()) { break; } diff --git a/apps/openmw/mwworld/actionequip.hpp b/apps/openmw/mwworld/actionequip.hpp index 5685a294a..3b56c7402 100644 --- a/apps/openmw/mwworld/actionequip.hpp +++ b/apps/openmw/mwworld/actionequip.hpp @@ -8,8 +8,6 @@ namespace MWWorld { class ActionEquip : public Action { - Ptr mObject; - virtual void executeImp (const Ptr& actor); public: