OpenMW
Public Types | Public Member Functions | Private Attributes
MWMechanics::Spells Class Reference

Spell list. More...

#include <spells.hpp>

List of all members.

Public Types

typedef std::map< std::string,
std::vector< float > > 
TContainer
typedef TContainer::const_iterator TIterator

Public Member Functions

void purgeCommonDisease ()
void purgeBlightDisease ()
void purgeCorprusDisease ()
void purgeCurses ()
TIterator begin () const
TIterator end () const
void add (const std::string &spell)
 Adding a spell that is already listed in *this is a no-op.
void remove (const std::string &spell)
MagicEffects getMagicEffects () const
 Return sum of magic effects resulting from abilities, blights, deseases and curses.
void clear ()
 Remove all spells of al types.
void setSelectedSpell (const std::string &spellId)
 This function does not verify, if the spell is available.
const std::string getSelectedSpell () const
 May return an empty string.
bool hasCommonDisease () const
bool hasBlightDisease () const
void visitEffectSources (MWMechanics::EffectSourceVisitor &visitor) const

Private Attributes

TContainer mSpells
std::string mSelectedSpell

Detailed Description

Spell list.

This class manages known spells as well as abilities, powers and permanent negative effects like diseaes.


Member Typedef Documentation

typedef std::map<std::string, std::vector<float> > MWMechanics::Spells::TContainer
typedef TContainer::const_iterator MWMechanics::Spells::TIterator

Member Function Documentation

void MWMechanics::Spells::add ( const std::string &  spell)

Adding a spell that is already listed in *this is a no-op.

Remove all spells of al types.

Return sum of magic effects resulting from abilities, blights, deseases and curses.

const std::string MWMechanics::Spells::getSelectedSpell ( ) const

May return an empty string.

void MWMechanics::Spells::remove ( const std::string &  spell)

If the spell to be removed is the selected spell, the selected spell will be changed to no spell (empty string).

void MWMechanics::Spells::setSelectedSpell ( const std::string &  spellId)

This function does not verify, if the spell is available.


Member Data Documentation

std::string MWMechanics::Spells::mSelectedSpell [private]

The documentation for this class was generated from the following files: