1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:49:56 +00:00
openmw-tes3mp/apps/openmw/mwworld/actionalchemy.cpp

30 lines
711 B
C++
Raw Normal View History

#include "actionalchemy.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
2015-09-10 06:48:34 +00:00
#include "../mwmechanics/actorutil.hpp"
namespace MWWorld
{
ActionAlchemy::ActionAlchemy(bool force)
: Action (false)
, mForce(force)
{
}
2012-07-27 10:00:10 +00:00
void ActionAlchemy::executeImp (const Ptr& actor)
{
2015-09-10 06:48:34 +00:00
if (actor != MWMechanics::getPlayer())
return;
if(!mForce && MWMechanics::isPlayerInCombat())
{ //Ensure we're not in combat
MWBase::Environment::get().getWindowManager()->messageBox("#{sInventoryMessage3}");
return;
}
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Alchemy);
}
}