OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
MWMechanics::CastSpell Class Reference

#include <spellcasting.hpp>

Collaboration diagram for MWMechanics::CastSpell:

Public Member Functions

 CastSpell (const MWWorld::Ptr &caster, const MWWorld::Ptr &target, const bool fromProjectile=false)
 
bool cast (const ESM::Spell *spell)
 
bool cast (const MWWorld::Ptr &item, bool launchProjectile=true)
 
bool cast (const ESM::Ingredient *ingredient)
 
bool cast (const ESM::Potion *potion)
 
bool cast (const std::string &id)
 
void playSpellCastingEffects (const std::string &spellid)
 
void launchMagicBolt (const ESM::EffectList &effects)
 Launch a bolt with the given effects. More...
 
void inflict (const MWWorld::Ptr &target, const MWWorld::Ptr &caster, const ESM::EffectList &effects, ESM::RangeType range, bool reflected=false, bool exploded=false)
 
bool applyInstantEffect (const MWWorld::Ptr &target, const MWWorld::Ptr &caster, const MWMechanics::EffectKey &effect, float magnitude)
 

Public Attributes

bool mStack
 
std::string mId
 
std::string mSourceName
 
osg::Vec3f mHitPosition
 
bool mAlwaysSucceed
 
bool mFromProjectile
 

Private Attributes

MWWorld::Ptr mCaster
 
MWWorld::Ptr mTarget
 

Constructor & Destructor Documentation

MWMechanics::CastSpell::CastSpell ( const MWWorld::Ptr caster,
const MWWorld::Ptr target,
const bool  fromProjectile = false 
)

Member Function Documentation

bool MWMechanics::CastSpell::applyInstantEffect ( const MWWorld::Ptr target,
const MWWorld::Ptr caster,
const MWMechanics::EffectKey effect,
float  magnitude 
)
Note
caster can be any type of object, or even an empty object.
Returns
was the target suitable for the effect?

Here is the call graph for this function:

Here is the caller graph for this function:

bool MWMechanics::CastSpell::cast ( const ESM::Spell spell)

Here is the call graph for this function:

Here is the caller graph for this function:

bool MWMechanics::CastSpell::cast ( const MWWorld::Ptr item,
bool  launchProjectile = true 
)
Note
mCaster must be an actor
Parameters
launchProjectileIf set to false, "on target" effects are directly applied instead of being launched as projectile originating from the caster.

Here is the call graph for this function:

bool MWMechanics::CastSpell::cast ( const ESM::Ingredient ingredient)
Note
mCaster must be an NPC

Here is the call graph for this function:

bool MWMechanics::CastSpell::cast ( const ESM::Potion potion)

Here is the call graph for this function:

bool MWMechanics::CastSpell::cast ( const std::string &  id)
Note
Auto detects if spell, ingredient or potion

Here is the call graph for this function:

void MWMechanics::CastSpell::inflict ( const MWWorld::Ptr target,
const MWWorld::Ptr caster,
const ESM::EffectList effects,
ESM::RangeType  range,
bool  reflected = false,
bool  exploded = false 
)
Note
target can be any type of object, not just actors.
caster can be any type of object, or even an empty object.

Here is the caller graph for this function:

void MWMechanics::CastSpell::launchMagicBolt ( const ESM::EffectList effects)

Launch a bolt with the given effects.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWMechanics::CastSpell::playSpellCastingEffects ( const std::string &  spellid)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool MWMechanics::CastSpell::mAlwaysSucceed
MWWorld::Ptr MWMechanics::CastSpell::mCaster
private
bool MWMechanics::CastSpell::mFromProjectile
osg::Vec3f MWMechanics::CastSpell::mHitPosition
std::string MWMechanics::CastSpell::mId
std::string MWMechanics::CastSpell::mSourceName
bool MWMechanics::CastSpell::mStack
MWWorld::Ptr MWMechanics::CastSpell::mTarget
private

The documentation for this class was generated from the following files: