1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-01 07:13:22 +00:00
OpenMW/components/esm3/loadalch.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
998 B
C++
Raw Normal View History

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