2012-09-13 13:02:26 +02:00
|
|
|
#include "actioneat.hpp"
|
|
|
|
|
2022-01-22 15:58:41 +01:00
|
|
|
#include <components/esm3/loadskil.hpp>
|
2014-02-23 20:11:05 +01:00
|
|
|
|
2015-09-10 18:48:34 +12:00
|
|
|
#include "../mwmechanics/actorutil.hpp"
|
|
|
|
|
2012-09-13 13:02:26 +02:00
|
|
|
#include "class.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
void ActionEat::executeImp(const Ptr& actor)
|
|
|
|
{
|
2022-05-12 17:29:12 +02:00
|
|
|
if (actor.getClass().consume(getTarget(), actor) && actor == MWMechanics::getPlayer())
|
2014-05-22 20:37:22 +02:00
|
|
|
actor.getClass().skillUsageSucceeded(actor, ESM::Skill::Alchemy, 1);
|
2014-02-23 20:11:05 +01:00
|
|
|
}
|
2012-09-13 13:02:26 +02:00
|
|
|
|
|
|
|
ActionEat::ActionEat(const MWWorld::Ptr& object)
|
|
|
|
: Action(false, object)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|