mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-04 04:26:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			542 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			542 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "failedaction.hpp"
 | 
						|
#include "../mwbase/world.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);
 | 
						|
    }
 | 
						|
}
 |