OpenMW
|
Effects currently affecting a NPC or creature. More...
#include <magiceffects.hpp>
Public Types | |
typedef std::map< EffectKey, EffectParam > | Collection |
Public Member Functions | |
Collection::const_iterator | begin () const |
Collection::const_iterator | end () const |
void | readState (const ESM::MagicEffects &state) |
void | writeState (ESM::MagicEffects &state) const |
void | add (const EffectKey &key, const EffectParam ¶m) |
void | remove (const EffectKey &key) |
void | modifyBase (const EffectKey &key, int diff) |
void | setModifiers (const MagicEffects &effects) |
Copy Modifier values from effects, but keep original mBase values. More... | |
MagicEffects & | operator+= (const MagicEffects &effects) |
EffectParam | get (const EffectKey &key) const |
This function can safely be used for keys that are not present. More... | |
Static Public Member Functions | |
static MagicEffects | diff (const MagicEffects &prev, const MagicEffects &now) |
Return changes from prev to now. More... | |
Private Attributes | |
Collection | mCollection |
Effects currently affecting a NPC or creature.
typedef std::map<EffectKey, EffectParam> MWMechanics::MagicEffects::Collection |
void MWMechanics::MagicEffects::add | ( | const EffectKey & | key, |
const EffectParam & | param | ||
) |
|
inline |
|
static |
Return changes from prev to now.
|
inline |
EffectParam MWMechanics::MagicEffects::get | ( | const EffectKey & | key | ) | const |
This function can safely be used for keys that are not present.
MagicEffects & MWMechanics::MagicEffects::operator+= | ( | const MagicEffects & | effects | ) |
void MWMechanics::MagicEffects::readState | ( | const ESM::MagicEffects & | state | ) |
void MWMechanics::MagicEffects::remove | ( | const EffectKey & | key | ) |
void MWMechanics::MagicEffects::setModifiers | ( | const MagicEffects & | effects | ) |
Copy Modifier values from effects, but keep original mBase values.
void MWMechanics::MagicEffects::writeState | ( | ESM::MagicEffects & | state | ) | const |
|
private |