You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwworld/failedaction.cpp

21 lines
542 B
C++

12 years ago
#include "failedaction.hpp"
#include "../mwbase/world.hpp"
12 years ago
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwmechanics/actorutil.hpp"
12 years ago
namespace MWWorld
{
FailedAction::FailedAction(const std::string &msg, const Ptr& target)
: Action(false, target), mMessage(msg)
12 years ago
{ }
12 years ago
void FailedAction::executeImp(const Ptr &actor)
12 years ago
{
if(actor == MWMechanics::getPlayer() && !mMessage.empty())
MWBase::Environment::get().getWindowManager()->messageBox(mMessage);
12 years ago
}
}