Lasting spell effects.
More...
#include <activespells.hpp>
Lasting spell effects.
- Note
- The name of this class is slightly misleading, since it also handels lasting potion effects.
| MWMechanics::ActiveSpells::ActiveSpells |
( |
| ) |
|
| void MWMechanics::ActiveSpells::addSpell |
( |
const std::string & |
id, |
|
|
bool |
stack, |
|
|
std::vector< ActiveEffect > |
effects, |
|
|
const std::string & |
displayName, |
|
|
int |
casterActorId |
|
) |
| |
addSpell
Add lasting effects
- Parameters
-
| id | ID for stacking purposes. |
| stack | If false, the spell is not added if one with the same ID exists already. |
| effects | |
| displayName | Name for display in magic menu. |
| void MWMechanics::ActiveSpells::clear |
( |
| ) |
|
| const MagicEffects & MWMechanics::ActiveSpells::getMagicEffects |
( |
| ) |
const |
| bool MWMechanics::ActiveSpells::isSpellActive |
( |
const std::string & |
id | ) |
const |
| void MWMechanics::ActiveSpells::mergeEffects |
( |
std::vector< ActiveEffect > & |
addTo, |
|
|
const std::vector< ActiveEffect > & |
from |
|
) |
| |
|
private |
Add any effects that are in "from" and not in "addTo" to "addTo".
| void MWMechanics::ActiveSpells::purge |
( |
int |
casterActorId | ) |
|
Remove all effects with CASTER_LINKED flag that were cast by casterActorId.
| void MWMechanics::ActiveSpells::purgeAll |
( |
float |
chance | ) |
|
Remove all active effects, if roll succeeds (for each effect)
| void MWMechanics::ActiveSpells::purgeEffect |
( |
short |
effectId | ) |
|
Remove all active effects with this effect id.
| void MWMechanics::ActiveSpells::purgeEffect |
( |
short |
effectId, |
|
|
const std::string & |
sourceId |
|
) |
| |
Remove all active effects with this effect id and source id.
| void MWMechanics::ActiveSpells::rebuildEffects |
( |
| ) |
const |
|
private |
| void MWMechanics::ActiveSpells::removeEffects |
( |
const std::string & |
id | ) |
|
Removes the active effects from this spell/potion/.. with id.
| double MWMechanics::ActiveSpells::timeToExpire |
( |
const TIterator & |
iterator | ) |
const |
|
private |
Returns time (in in-game hours) until the spell pointed to by iterator expires.
| void MWMechanics::ActiveSpells::update |
( |
| ) |
const |
|
private |
| bool MWMechanics::ActiveSpells::mSpellsChanged |
|
mutableprivate |
The documentation for this class was generated from the following files: