1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwworld/actiontake.cpp
scrawl 67bd6cd708 Remove empty line at the beginning of files
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
2015-08-18 23:06:12 +02:00

23 lines
750 B
C++

#include "actiontake.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/mechanicsmanager.hpp"
#include "class.hpp"
#include "containerstore.hpp"
namespace MWWorld
{
ActionTake::ActionTake (const MWWorld::Ptr& object) : Action (true, object) {}
void ActionTake::executeImp (const Ptr& actor)
{
MWBase::Environment::get().getMechanicsManager()->itemTaken(
actor, getTarget(), MWWorld::Ptr(), getTarget().getRefData().getCount());
actor.getClass().getContainerStore (actor).add (getTarget(), getTarget().getRefData().getCount(), actor);
MWBase::Environment::get().getWorld()->deleteObject (getTarget());
}
}