OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
spellstate.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_SPELLSTATE_H
2 #define OPENMW_ESM_SPELLSTATE_H
3 
4 #include <map>
5 #include <vector>
6 #include <string>
7 #include <set>
8 
9 #include "defs.hpp"
10 
11 namespace ESM
12 {
13  class ESMReader;
14  class ESMWriter;
15 
16  // NOTE: spell ids must be lower case
17  struct SpellState
18  {
19  struct CorprusStats
20  {
23  };
24 
26  {
27  int mId;
28  int mArg;
29  float mMagnitude;
30  };
31 
32  struct SpellParams {
33  std::map<int, float> mEffectRands;
34  std::set<int> mPurgedEffects;
35  };
36  typedef std::map<std::string, SpellParams> TContainer;
38 
39  std::map<std::string, std::vector<PermanentSpellEffectInfo> > mPermanentSpellEffects;
40 
41  std::map<std::string, CorprusStats> mCorprusSpells;
42 
43  std::map<std::string, TimeStamp> mUsedPowers;
44 
45  std::string mSelectedSpell;
46 
47  void load (ESMReader &esm);
48  void save (ESMWriter &esm) const;
49  };
50 
51 }
52 
53 #endif
std::map< std::string, SpellParams > TContainer
Definition: spellstate.hpp:36
std::string mSelectedSpell
Definition: spellstate.hpp:45
Definition: defs.hpp:11
Definition: esmreader.hpp:21
std::map< int, float > mEffectRands
Definition: spellstate.hpp:33
std::map< std::string, std::vector< PermanentSpellEffectInfo > > mPermanentSpellEffects
Definition: spellstate.hpp:39
void save(ESMWriter &esm) const
Definition: spellstate.cpp:76
std::map< std::string, TimeStamp > mUsedPowers
Definition: spellstate.hpp:43
int mWorsenings
Definition: spellstate.hpp:21
void load(ESMReader &esm)
Definition: spellstate.cpp:9
Definition: esmwriter.hpp:17
Definition: spellstate.hpp:19
TimeStamp mNextWorsening
Definition: spellstate.hpp:22
float mMagnitude
Definition: spellstate.hpp:29
std::map< std::string, CorprusStats > mCorprusSpells
Definition: spellstate.hpp:41
TContainer mSpells
Definition: spellstate.hpp:37
Definition: spellstate.hpp:25
Definition: spellstate.hpp:32
Definition: spellstate.hpp:17
int mArg
Definition: spellstate.hpp:28
std::set< int > mPurgedEffects
Definition: spellstate.hpp:34
int mId
Definition: spellstate.hpp:27