2013-11-13 13:02:15 +00:00
|
|
|
#include "actiontrap.hpp"
|
|
|
|
|
2013-11-17 22:15:57 +00:00
|
|
|
#include "../mwmechanics/spellcasting.hpp"
|
2013-11-13 13:02:15 +00:00
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
|
|
|
|
void ActionTrap::executeImp(const Ptr &actor)
|
|
|
|
{
|
2013-11-17 22:15:57 +00:00
|
|
|
MWMechanics::CastSpell cast(mTrapSource, actor);
|
2014-01-20 14:48:06 +00:00
|
|
|
cast.mHitPosition = Ogre::Vector3(actor.getRefData().getPosition().pos);
|
2013-11-17 22:15:57 +00:00
|
|
|
cast.cast(mSpellId);
|
2013-11-13 13:02:15 +00:00
|
|
|
|
2014-05-25 12:13:07 +00:00
|
|
|
mTrapSource.getCellRef().setTrap("");
|
2013-11-13 13:02:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|