~openmw/openmw/openmw-packaging2

« back to all changes in this revision

Viewing changes to apps/openmw/mwmechanics/spellcasting.hpp

  • Committer: Scott Howard
  • Date: 2015-11-27 08:01:08 UTC
  • Revision ID: showard@debian.org-20151127080108-vby93jqgdvxj8d6d
Cron update. Git hash: 37c8fea

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include "../mwworld/ptr.hpp"
5
5
 
6
 
#include <OgreVector3.h>
7
 
 
8
6
#include <components/esm/loadskil.hpp>
9
7
 
10
8
namespace ESM
19
17
{
20
18
    struct EffectKey;
21
19
    class MagicEffects;
 
20
    class CreatureStats;
22
21
 
23
22
    ESM::Skill::SkillEnum spellSchoolToSkill(int school);
24
23
 
62
61
 
63
62
    int getEffectiveEnchantmentCastCost (float castCost, const MWWorld::Ptr& actor);
64
63
 
 
64
    void effectTick(CreatureStats& creatureStats, const MWWorld::Ptr& actor, const MWMechanics::EffectKey& effectKey, float magnitude);
 
65
 
65
66
    class CastSpell
66
67
    {
67
68
    private:
71
72
        bool mStack;
72
73
        std::string mId; // ID of spell, potion, item etc
73
74
        std::string mSourceName; // Display name for spell, potion, etc
74
 
        Ogre::Vector3 mHitPosition; // Used for spawning area orb
 
75
        osg::Vec3f mHitPosition; // Used for spawning area orb
75
76
        bool mAlwaysSucceed; // Always succeed spells casted by NPCs/creatures regardless of their chance (default: false)
76
77
 
77
78
    public:
96
97
                      const ESM::EffectList& effects, ESM::RangeType range, bool reflected=false, bool exploded=false);
97
98
 
98
99
        /// @note \a caster can be any type of object, or even an empty object.
99
 
        void applyInstantEffect (const MWWorld::Ptr& target, const MWWorld::Ptr& caster, const MWMechanics::EffectKey& effect, float magnitude);
 
100
        /// @return was the target suitable for the effect?
 
101
        bool applyInstantEffect (const MWWorld::Ptr& target, const MWWorld::Ptr& caster, const MWMechanics::EffectKey& effect, float magnitude);
100
102
    };
101
103
 
102
104
}