forked from teamnwah/openmw-tes3coop
Failed action
parent
82ea547ce4
commit
4e4d15f8ac
@ -1,24 +1,21 @@
|
||||
#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;
|
||||
}
|
||||
FailedAction::FailedAction (const std::string& msg) : Action (false), message(msg)
|
||||
{ }
|
||||
|
||||
FailedAction::FailedAction () : Action (false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FailedAction::executeImp (const Ptr& actor)
|
||||
{
|
||||
if ( actor.getRefData().getHandle()=="player" and not(message.empty()))
|
||||
if ( actor.getRefData().getHandle()=="player" and !(message.empty()))
|
||||
{
|
||||
//return a message here
|
||||
MWBase::Environment::get().getWindowManager() ->messageBox(message, std::vector<std::string>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue