1 #ifndef GAME_MWMECHANICS_SPELLS_H
2 #define GAME_MWMECHANICS_SPELLS_H
10 #include "../mwworld/ptr.hpp"
11 #include "../mwworld/timestamp.hpp"
81 void purgeEffect(
int effectId,
const std::string & sourceId);
95 bool hasSpell(
const std::string& spell)
const;
98 void add (
const std::string& spell);
104 void remove (
const std::string& spell);
Definition: magiceffects.hpp:73
std::map< SpellKey, MagicEffects > mSourcedEffects
Definition: spells.hpp:67
void clear()
Remove all spells of al types.
Definition: spells.cpp:169
bool hasSpell(const std::string &spell) const
Definition: spells.cpp:76
bool canUsePower(const ESM::Spell *spell) const
Definition: spells.cpp:379
void purgeCurses()
Definition: spells.cpp:267
Effects currently affecting a NPC or creature.
Definition: magiceffects.hpp:83
void rebuildEffects() const
Definition: spells.cpp:38
static const int sWorseningPeriod
Definition: spells.hpp:46
MagicEffects getMagicEffects() const
Return sum of magic effects resulting from abilities, blights, deseases and curses.
Definition: spells.cpp:160
Definition: loadspel.hpp:14
int mWorsenings
Definition: spells.hpp:48
void purgeEffect(int effectId)
Definition: spells.cpp:343
const ESM::Spell * getSpell(const std::string &id) const
Get spell from ID, throws exception if not found.
Definition: spells.cpp:33
void purgeCorprusDisease()
Definition: spells.cpp:252
void writeState(ESM::SpellState &state) const
Definition: spells.cpp:444
std::map< SpellKey, CorprusStats > mCorprusSpells
Definition: spells.hpp:63
Definition: spells.hpp:44
std::map< SpellKey, MagicEffects > mPermanentSpellEffects
Definition: spells.hpp:56
void add(const std::string &spell)
Adding a spell that is already listed in *this is a no-op.
Definition: spells.cpp:119
void worsenCorprus(const ESM::Spell *spell)
Definition: spells.cpp:301
const ESM::Spell * SpellKey
Definition: spells.hpp:35
bool isSpellActive(const std::string &id) const
Are we under the effects of the given spell ID?
Definition: spells.cpp:185
bool mSpellsChanged
Definition: spells.hpp:65
std::string mSelectedSpell
Definition: spells.hpp:59
Spells()
Definition: spells.cpp:18
void purgeBlightDisease()
Definition: spells.cpp:237
void setSelectedSpell(const std::string &spellId)
This function does not verify, if the spell is available.
Definition: spells.cpp:175
const std::string getSelectedSpell() const
May return an empty string.
Definition: spells.cpp:180
bool hasCommonDisease() const
Definition: spells.cpp:198
const std::map< SpellKey, CorprusStats > & getCorprusSpells() const
Definition: spells.cpp:338
void visitEffectSources(MWMechanics::EffectSourceVisitor &visitor) const
Definition: spells.cpp:282
TIterator begin() const
Definition: spells.cpp:23
TContainer::const_iterator TIterator
Definition: spells.hpp:42
TIterator end() const
Definition: spells.cpp:28
bool hasBlightDisease() const
Definition: spells.cpp:210
std::set< int > mPurgedEffects
Definition: spells.hpp:38
In-game time stamp.
Definition: timestamp.hpp:14
Definition: spellstate.hpp:17
void readState(const ESM::SpellState &state)
Definition: spells.cpp:393
MWWorld::TimeStamp mNextWorsening
Definition: spells.hpp:49
std::map< SpellKey, SpellParams > TContainer
Definition: spells.hpp:41
void purgeCommonDisease()
Definition: spells.cpp:222
void usePower(const ESM::Spell *spell)
Definition: spells.cpp:388
std::map< int, float > mEffectRands
Definition: spells.hpp:37
TContainer mSpells
Definition: spells.hpp:53
Definition: spells.hpp:36
Spell list.
Definition: spells.hpp:31
static bool hasCorprusEffect(const ESM::Spell *spell)
Definition: spells.cpp:326
MagicEffects mEffects
Definition: spells.hpp:66
std::map< SpellKey, MWWorld::TimeStamp > mUsedPowers
Definition: spells.hpp:61