OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
loadingr.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_INGR_H
2 #define OPENMW_ESM_INGR_H
3 
4 #include <string>
5 
6 namespace ESM
7 {
8 
9 class ESMReader;
10 class ESMWriter;
11 
12 /*
13  * Alchemy ingredient
14  */
15 
16 struct Ingredient
17 {
18  static unsigned int sRecordId;
20  static std::string getRecordType() { return "Ingredient"; }
21 
22  struct IRDTstruct
23  {
24  float mWeight;
25  int mValue;
26  int mEffectID[4]; // Effect, 0 or -1 means none
27  int mSkills[4]; // SkillEnum related to effect
28  int mAttributes[4]; // Attribute related to effect
29  };
30 
32  std::string mId, mName, mModel, mIcon, mScript;
33 
34  void load(ESMReader &esm, bool &isDeleted);
35  void save(ESMWriter &esm, bool isDeleted = false) const;
36 
37  void blank();
39 };
40 }
41 #endif
float mWeight
Definition: loadingr.hpp:24
std::string mModel
Definition: loadingr.hpp:32
void load(ESMReader &esm, bool &isDeleted)
Definition: loadingr.cpp:11
std::string mScript
Definition: loadingr.hpp:32
std::string mIcon
Definition: loadingr.hpp:32
void blank()
Set record to default state (does not touch the ID).
Definition: loadingr.cpp:98
Definition: loadingr.hpp:16
Definition: esmreader.hpp:21
int mAttributes[4]
Definition: loadingr.hpp:28
int mEffectID[4]
Definition: loadingr.hpp:26
static std::string getRecordType()
Return a string descriptor for this record type. Currently used for debugging / error logs only...
Definition: loadingr.hpp:20
std::string mName
Definition: loadingr.hpp:32
int mSkills[4]
Definition: loadingr.hpp:27
std::string mId
Definition: loadingr.hpp:32
Definition: esmwriter.hpp:17
static unsigned int sRecordId
Definition: loadingr.hpp:18
int mValue
Definition: loadingr.hpp:25
void save(ESMWriter &esm, bool isDeleted=false) const
Definition: loadingr.cpp:81
Definition: loadingr.hpp:22
IRDTstruct mData
Definition: loadingr.hpp:31