OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
loadalch.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_ALCH_H
2 #define OPENMW_ESM_ALCH_H
3 
4 #include <string>
5 
6 #include "effectlist.hpp"
7 
8 namespace ESM
9 {
10 
11 class ESMReader;
12 class ESMWriter;
13 
14 /*
15  * Alchemy item (potions)
16  */
17 
18 struct Potion
19 {
20  static unsigned int sRecordId;
21 
23  static std::string getRecordType() { return "Potion"; }
24 
25  struct ALDTstruct
26  {
27  float mWeight;
28  int mValue;
29  int mAutoCalc;
30  };
32 
33  std::string mId, mName, mModel, mIcon, mScript;
35 
36  void load(ESMReader &esm, bool &isDeleted);
37  void save(ESMWriter &esm, bool isDeleted = false) const;
38 
39  void blank();
41 
42  };
43 }
44 #endif
float mWeight
Definition: loadalch.hpp:27
void blank()
Set record to default state (does not touch the ID).
Definition: loadalch.cpp:80
Definition: esmreader.hpp:21
ALDTstruct mData
Definition: loadalch.hpp:31
std::string mScript
Definition: loadalch.hpp:33
int mAutoCalc
Definition: loadalch.hpp:29
Definition: esmwriter.hpp:17
int mValue
Definition: loadalch.hpp:28
static std::string getRecordType()
Return a string descriptor for this record type. Currently used for debugging / error logs only...
Definition: loadalch.hpp:23
Definition: loadalch.hpp:25
std::string mName
Definition: loadalch.hpp:33
std::string mIcon
Definition: loadalch.hpp:33
void save(ESMWriter &esm, bool isDeleted=false) const
Definition: loadalch.cpp:62
static unsigned int sRecordId
Definition: loadalch.hpp:20
EffectList mEffects
Definition: loadalch.hpp:34
std::string mId
Definition: loadalch.hpp:33
Definition: loadalch.hpp:18
void load(ESMReader &esm, bool &isDeleted)
Definition: loadalch.cpp:11
EffectList, ENAM subrecord.
Definition: effectlist.hpp:33
std::string mModel
Definition: loadalch.hpp:33