1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-24 13:09:43 +00:00
openmw/components/esm3/loadalch.hpp

46 lines
998 B
C++
Raw Normal View History

2012-09-23 18:11:08 +00:00
#ifndef OPENMW_ESM_ALCH_H
#define OPENMW_ESM_ALCH_H
2012-09-17 07:37:50 +00:00
#include <string>
2022-06-04 14:07:59 +00:00
#include "components/esm/defs.hpp"
2022-09-22 18:26:05 +00:00
#include "effectlist.hpp"
namespace ESM
{
2012-09-30 20:51:54 +00:00
2022-09-22 18:26:05 +00:00
class ESMReader;
class ESMWriter;
2022-09-22 18:26:05 +00:00
/*
* Alchemy item (potions)
*/
2022-09-22 18:26:05 +00:00
struct Potion
{
2022-09-22 18:26:05 +00:00
constexpr static RecNameInts sRecordId = REC_ALCH;
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
static std::string_view getRecordType() { return "Potion"; }
2022-09-22 18:26:05 +00:00
struct ALDTstruct
{
float mWeight;
int mValue;
int mAutoCalc;
};
ALDTstruct mData;
2022-09-22 18:26:05 +00:00
unsigned int mRecordFlags;
std::string mId, mName, mModel, mIcon, mScript;
EffectList mEffects;
2022-09-22 18:26:05 +00:00
void load(ESMReader& esm, bool& isDeleted);
void save(ESMWriter& esm, bool isDeleted = false) const;
2022-09-22 18:26:05 +00:00
void blank();
///< Set record to default state (does not touch the ID).
};
}
#endif