OpenMW
components/esm/effectlist.hpp
Go to the documentation of this file.
00001 #ifndef OPENMW_ESM_EFFECTLIST_H
00002 #define OPENMW_ESM_EFFECTLIST_H
00003 
00004 #include <vector>
00005 
00006 namespace ESM
00007 {
00008     class ESMReader;
00009     class ESMWriter;
00010 
00011     #pragma pack(push)
00012     #pragma pack(1)
00013 
00017     struct ENAMstruct
00018     {
00019         // Magical effect, hard-coded ID
00020         short mEffectID;
00021 
00022         // Which skills/attributes are affected (for restore/drain spells
00023         // etc.)
00024         signed char mSkill, mAttribute; // -1 if N/A
00025 
00026         // Other spell parameters
00027         int mRange; // 0 - self, 1 - touch, 2 - target (RangeType enum)
00028         int mArea, mDuration, mMagnMin, mMagnMax;
00029     };
00030     #pragma pack(pop)
00031 
00032     struct EffectList
00033     {
00034 
00035         std::vector<ENAMstruct> mList;
00036 
00037         void load(ESMReader &esm);
00038         void save(ESMWriter &esm) const;
00039     };
00040 
00041 }
00042 
00043 #endif