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

21 lines
482 B
C++

#include "failedaction.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
namespace MWWorld
{
FailedAction::FailedAction (const std::string& msg) : Action (false), message(msg)
{ }
void FailedAction::executeImp (const Ptr& actor)
{
if ( actor.getRefData().getHandle()=="player" && !(message.empty()))
{
MWBase::Environment::get().getWindowManager() ->messageBox(message);
}
}
}