2012-09-23 18:11:08 +00:00
|
|
|
#ifndef OPENMW_ESM_INGR_H
|
|
|
|
#define OPENMW_ESM_INGR_H
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
|
2012-09-17 07:37:50 +00:00
|
|
|
#include <string>
|
|
|
|
|
2011-04-08 13:58:21 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
2012-09-30 20:51:54 +00:00
|
|
|
|
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
/*
|
|
|
|
* Alchemy ingredient
|
|
|
|
*/
|
|
|
|
|
2012-09-30 19:34:53 +00:00
|
|
|
struct Ingredient
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
{
|
2013-09-24 11:17:28 +00:00
|
|
|
static unsigned int sRecordId;
|
2015-06-14 00:31:00 +00:00
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
static std::string getRecordType() { return "Ingredient"; }
|
2013-09-24 11:17:28 +00:00
|
|
|
|
2011-04-08 13:58:21 +00:00
|
|
|
struct IRDTstruct
|
|
|
|
{
|
2012-09-17 07:37:50 +00:00
|
|
|
float mWeight;
|
|
|
|
int mValue;
|
|
|
|
int mEffectID[4]; // Effect, 0 or -1 means none
|
|
|
|
int mSkills[4]; // SkillEnum related to effect
|
|
|
|
int mAttributes[4]; // Attribute related to effect
|
2011-04-08 13:58:21 +00:00
|
|
|
};
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
|
2012-09-17 07:37:50 +00:00
|
|
|
IRDTstruct mData;
|
2012-09-30 19:34:53 +00:00
|
|
|
std::string mId, mName, mModel, mIcon, mScript;
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
|
2015-07-20 14:23:14 +00:00
|
|
|
void load(ESMReader &esm, bool &isDeleted);
|
|
|
|
void save(ESMWriter &esm, bool isDeleted = false) const;
|
2013-05-06 12:10:43 +00:00
|
|
|
|
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID).
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 12:20:17 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|