2013-03-23 07:16:46 +00:00
|
|
|
#include "actionrepair.hpp"
|
|
|
|
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
#include "../mwbase/windowmanager.hpp"
|
2014-04-25 02:47:45 +00:00
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
#include "../mwworld/player.hpp"
|
2013-03-23 07:16:46 +00:00
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
ActionRepair::ActionRepair(const Ptr &item)
|
|
|
|
: Action(false, item)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ActionRepair::executeImp (const Ptr& actor)
|
|
|
|
{
|
2014-04-25 02:47:45 +00:00
|
|
|
if(MWBase::Environment::get().getWorld()->getPlayer().isInCombat()) {
|
|
|
|
MWBase::Environment::get().getWindowManager()->messageBox("#{sInventoryMessage2}");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-03-23 07:16:46 +00:00
|
|
|
MWBase::Environment::get().getWindowManager()->startRepairItem(getTarget());
|
|
|
|
}
|
|
|
|
}
|