OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
effectlist.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_EFFECTLIST_H
2 #define OPENMW_ESM_EFFECTLIST_H
3 
4 #include <vector>
5 
6 namespace ESM
7 {
8  class ESMReader;
9  class ESMWriter;
10 
11  #pragma pack(push)
12  #pragma pack(1)
13 
17  struct ENAMstruct
18  {
19  // Magical effect, hard-coded ID
20  short mEffectID;
21 
22  // Which skills/attributes are affected (for restore/drain spells
23  // etc.)
24  signed char mSkill, mAttribute; // -1 if N/A
25 
26  // Other spell parameters
27  int mRange; // 0 - self, 1 - touch, 2 - target (RangeType enum)
29  };
30  #pragma pack(pop)
31 
33  struct EffectList
34  {
35  std::vector<ENAMstruct> mList;
36 
38  void add(ESMReader &esm);
39 
41  void load(ESMReader &esm);
42  void save(ESMWriter &esm) const;
43  };
44 
45 }
46 
47 #endif
int mMagnMax
Definition: effectlist.hpp:28
void save(ESMWriter &esm) const
Definition: effectlist.cpp:23
Definition: esmreader.hpp:21
signed char mSkill
Definition: effectlist.hpp:24
Definition: effectlist.hpp:17
short mEffectID
Definition: effectlist.hpp:20
void load(ESMReader &esm)
Load all effects.
Definition: effectlist.cpp:8
Definition: esmwriter.hpp:17
int mMagnMin
Definition: effectlist.hpp:28
int mArea
Definition: effectlist.hpp:28
void add(ESMReader &esm)
Load one effect, assumes subrecord name was already read.
Definition: effectlist.cpp:16
int mRange
Definition: effectlist.hpp:27
signed char mAttribute
Definition: effectlist.hpp:24
int mDuration
Definition: effectlist.hpp:28
std::vector< ENAMstruct > mList
Definition: effectlist.hpp:35
EffectList, ENAM subrecord.
Definition: effectlist.hpp:33