1 #ifndef GAME_MWMECHANICS_ACTIVESPELLS_H
2 #define GAME_MWMECHANICS_ACTIVESPELLS_H
11 #include "../mwworld/timestamp.hpp"
37 typedef std::multimap<std::string, ActiveSpellParams >
TContainer;
59 void mergeEffects(std::vector<ActiveEffect>& addTo,
const std::vector<ActiveEffect>& from);
79 void addSpell (
const std::string&
id,
bool stack, std::vector<ActiveEffect> effects,
80 const std::string& displayName,
int casterActorId);
89 void purgeEffect (
short effectId,
const std::string& sourceId);
95 void purge (
int casterActorId);
Definition: magiceffects.hpp:73
void writeState(ESM::ActiveSpells &state) const
Definition: activespells.cpp:291
const MagicEffects & getMagicEffects() const
Definition: activespells.cpp:94
std::vector< ActiveEffect > mEffects
Definition: activespells.hpp:29
bool mSpellsChanged
Definition: activespells.hpp:51
Definition: activespells.hpp:18
void readState(const ESM::ActiveSpells &state)
Definition: activespells.cpp:306
void clear()
Remove all spells.
Definition: activespells.cpp:285
Effects currently affecting a NPC or creature.
Definition: magiceffects.hpp:83
ESM::ActiveEffect ActiveEffect
Definition: activespells.hpp:25
const TContainer & getActiveSpells() const
Definition: activespells.cpp:144
Definition: activespells.hpp:27
void purge(int casterActorId)
Remove all effects with CASTER_LINKED flag that were cast by casterActorId.
Definition: activespells.cpp:269
TIterator end() const
Definition: activespells.cpp:105
void visitEffectSources(MWMechanics::EffectSourceVisitor &visitor) const
Definition: activespells.cpp:204
MWWorld::TimeStamp mLastUpdate
Definition: activespells.hpp:52
void addSpell(const std::string &id, bool stack, std::vector< ActiveEffect > effects, const std::string &displayName, int casterActorId)
addSpell
Definition: activespells.cpp:149
ActiveSpells()
Definition: activespells.cpp:89
std::string mDisplayName
Definition: activespells.hpp:31
bool isSpellActive(const std::string &id) const
case insensitive
Definition: activespells.cpp:134
void purgeAll(float chance)
Remove all active effects, if roll succeeds (for each effect)
Definition: activespells.cpp:225
void mergeEffects(std::vector< ActiveEffect > &addTo, const std::vector< ActiveEffect > &from)
Add any effects that are in "from" and not in "addTo" to "addTo".
Definition: activespells.cpp:177
TContainer::const_iterator TIterator
Definition: activespells.hpp:38
void purgeEffect(short effectId)
Remove all active effects with this effect id.
Definition: activespells.cpp:237
void update() const
Definition: activespells.cpp:15
MWWorld::TimeStamp mTimeStamp
Definition: activespells.hpp:30
TContainer mSpells
Definition: activespells.hpp:49
void removeEffects(const std::string &id)
Removes the active effects from this spell/potion/.. with id.
Definition: activespells.cpp:198
Definition: activespells.hpp:27
In-game time stamp.
Definition: timestamp.hpp:14
MagicEffects mEffects
Definition: activespells.hpp:50
int mCasterActorId
Definition: activespells.hpp:34
TIterator begin() const
Definition: activespells.cpp:100
void rebuildEffects() const
Definition: activespells.cpp:64
Lasting spell effects.
Definition: activespells.hpp:21
double timeToExpire(const TIterator &iterator) const
Definition: activespells.cpp:110
std::multimap< std::string, ActiveSpellParams > TContainer
Definition: activespells.hpp:37