1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 09:19:58 +00:00
openmw-tes3mp/apps/openmw/mwworld/failedaction.cpp

21 lines
542 B
C++
Raw Normal View History

2012-11-17 17:17:08 +00:00
#include "failedaction.hpp"
#include "../mwbase/world.hpp"
2012-11-19 20:04:49 +00:00
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
2015-08-21 09:12:39 +00:00
#include "../mwmechanics/actorutil.hpp"
2012-11-17 17:17:08 +00:00
namespace MWWorld
{
FailedAction::FailedAction(const std::string &msg, const Ptr& target)
: Action(false, target), mMessage(msg)
2012-11-19 20:04:49 +00:00
{ }
2012-11-22 16:24:28 +00:00
2013-08-09 05:34:53 +00:00
void FailedAction::executeImp(const Ptr &actor)
2012-11-17 17:17:08 +00:00
{
2015-08-21 09:12:39 +00:00
if(actor == MWMechanics::getPlayer() && !mMessage.empty())
2013-08-09 05:34:53 +00:00
MWBase::Environment::get().getWindowManager()->messageBox(mMessage);
2012-11-17 17:17:08 +00:00
}
}