1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwworld/actionrepair.cpp

25 lines
638 B
C++
Raw Normal View History

2013-03-23 07:16:46 +00:00
#include "actionrepair.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
#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)
{
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());
}
}