mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.0 KiB
C++
48 lines
1.0 KiB
C++
12 years ago
|
#ifndef OPENMW_ESM_EFFECTLIST_H
|
||
|
#define OPENMW_ESM_EFFECTLIST_H
|
||
|
|
||
|
#include <vector>
|
||
|
|
||
|
namespace ESM
|
||
|
{
|
||
|
class ESMReader;
|
||
|
class ESMWriter;
|
||
|
|
||
|
#pragma pack(push)
|
||
|
#pragma pack(1)
|
||
|
|
||
|
/** Defines a spell effect. Shared between SPEL (Spells), ALCH
|
||
|
(Potions) and ENCH (Item enchantments) records
|
||
|
*/
|
||
|
struct ENAMstruct
|
||
|
{
|
||
|
// Magical effect, hard-coded ID
|
||
|
short mEffectID;
|
||
|
|
||
|
// Which skills/attributes are affected (for restore/drain spells
|
||
|
// etc.)
|
||
|
signed char mSkill, mAttribute; // -1 if N/A
|
||
|
|
||
|
// Other spell parameters
|
||
|
int mRange; // 0 - self, 1 - touch, 2 - target (RangeType enum)
|
||
|
int mArea, mDuration, mMagnMin, mMagnMax;
|
||
|
};
|
||
|
#pragma pack(pop)
|
||
|
|
||
10 years ago
|
/// EffectList, ENAM subrecord
|
||
12 years ago
|
struct EffectList
|
||
|
{
|
||
|
std::vector<ENAMstruct> mList;
|
||
|
|
||
10 years ago
|
/// Load one effect, assumes subrecord name was already read
|
||
|
void add(ESMReader &esm);
|
||
|
|
||
|
/// Load all effects
|
||
12 years ago
|
void load(ESMReader &esm);
|
||
11 years ago
|
void save(ESMWriter &esm) const;
|
||
12 years ago
|
};
|
||
11 years ago
|
|
||
12 years ago
|
}
|
||
|
|
||
|
#endif
|