2014-02-16 14:06:34 +00:00
|
|
|
#ifndef OPENMW_ESM_STATSTATE_H
|
|
|
|
#define OPENMW_ESM_STATSTATE_H
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
2015-07-07 17:16:32 +00:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
2014-02-16 14:06:34 +00:00
|
|
|
// format 0, saved games only
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
struct StatState
|
|
|
|
{
|
|
|
|
T mBase;
|
2014-06-19 15:17:26 +00:00
|
|
|
T mMod; // Note: can either be the modifier, or the modified value.
|
|
|
|
// A bit inconsistent, but we can't fix this without breaking compatibility.
|
2014-02-16 14:56:36 +00:00
|
|
|
T mCurrent;
|
2014-11-02 17:01:12 +00:00
|
|
|
float mDamage;
|
2014-02-16 14:06:34 +00:00
|
|
|
float mProgress;
|
|
|
|
|
|
|
|
StatState();
|
|
|
|
|
2018-12-23 11:18:33 +00:00
|
|
|
void load(ESMReader& esm, bool intFallback = false);
|
2014-02-16 14:06:34 +00:00
|
|
|
void save(ESMWriter& esm) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2014-06-19 15:17:26 +00:00
|
|
|
#endif
|