OpenMW
|
00001 #ifndef OPENMW_ESM_ENCH_H 00002 #define OPENMW_ESM_ENCH_H 00003 00004 #include <string> 00005 00006 #include "effectlist.hpp" 00007 00008 namespace ESM 00009 { 00010 00011 class ESMReader; 00012 class ESMWriter; 00013 00014 /* 00015 * Enchantments 00016 */ 00017 00018 struct Enchantment 00019 { 00020 static unsigned int sRecordId; 00021 00022 enum Type 00023 { 00024 CastOnce = 0, 00025 WhenStrikes = 1, 00026 WhenUsed = 2, 00027 ConstantEffect = 3 00028 }; 00029 00030 struct ENDTstruct 00031 { 00032 int mType; 00033 int mCost; 00034 int mCharge; 00035 int mAutocalc; // Guessing this is 1 if we are supposed to auto 00036 // calculate 00037 }; 00038 00039 std::string mId; 00040 ENDTstruct mData; 00041 EffectList mEffects; 00042 00043 void load(ESMReader &esm); 00044 void save(ESMWriter &esm) const; 00045 }; 00046 } 00047 #endif