1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/apps/openmw/mwworld/failedaction.cpp
2021-04-30 20:49:22 +02:00

20 lines
511 B
C++

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