OpenMW
|
00001 #ifndef OPENMW_ESM_ARMO_H 00002 #define OPENMW_ESM_ARMO_H 00003 00004 #include <vector> 00005 #include <string> 00006 00007 namespace ESM 00008 { 00009 00010 class ESMReader; 00011 class ESMWriter; 00012 00013 enum PartReferenceType 00014 { 00015 PRT_Head = 0, 00016 PRT_Hair = 1, 00017 PRT_Neck = 2, 00018 PRT_Cuirass = 3, 00019 PRT_Groin = 4, 00020 PRT_Skirt = 5, 00021 PRT_RHand = 6, 00022 PRT_LHand = 7, 00023 PRT_RWrist = 8, 00024 PRT_LWrist = 9, 00025 PRT_Shield = 10, 00026 PRT_RForearm = 11, 00027 PRT_LForearm = 12, 00028 PRT_RUpperarm = 13, 00029 PRT_LUpperarm = 14, 00030 PRT_RFoot = 15, 00031 PRT_LFoot = 16, 00032 PRT_RAnkle = 17, 00033 PRT_LAnkle = 18, 00034 PRT_RKnee = 19, 00035 PRT_LKnee = 20, 00036 PRT_RLeg = 21, 00037 PRT_LLeg = 22, 00038 PRT_RPauldron = 23, 00039 PRT_LPauldron = 24, 00040 PRT_Weapon = 25, 00041 PRT_Tail = 26, 00042 00043 PRT_Count = 27 00044 }; 00045 00046 // Reference to body parts 00047 struct PartReference 00048 { 00049 char mPart; 00050 std::string mMale, mFemale; 00051 }; 00052 00053 // A list of references to body parts 00054 struct PartReferenceList 00055 { 00056 std::vector<PartReference> mParts; 00057 00058 void load(ESMReader &esm); 00059 void save(ESMWriter &esm) const; 00060 }; 00061 00062 struct Armor 00063 { 00064 static unsigned int sRecordId; 00065 00066 enum Type 00067 { 00068 Helmet = 0, 00069 Cuirass = 1, 00070 LPauldron = 2, 00071 RPauldron = 3, 00072 Greaves = 4, 00073 Boots = 5, 00074 LGauntlet = 6, 00075 RGauntlet = 7, 00076 Shield = 8, 00077 LBracer = 9, 00078 RBracer = 10 00079 }; 00080 00081 struct AODTstruct 00082 { 00083 int mType; 00084 float mWeight; 00085 int mValue, mHealth, mEnchant, mArmor; 00086 }; 00087 00088 AODTstruct mData; 00089 PartReferenceList mParts; 00090 00091 std::string mId, mName, mModel, mIcon, mScript, mEnchant; 00092 00093 void load(ESMReader &esm); 00094 void save(ESMWriter &esm) const; 00095 00096 void blank(); 00098 }; 00099 } 00100 #endif