1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 12:39:55 +00:00
OpenMW/components/esm3/spellstate.hpp

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

55 lines
1.2 KiB
C++
Raw Normal View History

2014-05-12 21:04:02 +02:00
#ifndef OPENMW_ESM_SPELLSTATE_H
#define OPENMW_ESM_SPELLSTATE_H
#include <map>
#include <set>
2014-05-12 21:04:02 +02:00
#include <string>
2014-08-21 03:11:49 +02:00
#include <vector>
2014-05-12 21:04:02 +02:00
#include "components/esm/defs.hpp"
2014-05-12 21:04:02 +02:00
namespace ESM
{
class ESMReader;
class ESMWriter;
// NOTE: spell ids must be lower case
2014-05-12 21:04:02 +02:00
struct SpellState
{
struct CorprusStats
{
int mWorsenings;
TimeStamp mNextWorsening;
};
2014-08-21 03:11:49 +02:00
struct PermanentSpellEffectInfo
{
int mId;
int mArg;
float mMagnitude;
};
struct SpellParams
{
std::map<int, float> mEffectRands; // <effect index, normalised random magnitude>
std::set<int> mPurgedEffects; // indices of purged effects
};
std::vector<std::string> mSpells;
2014-05-12 21:04:02 +02:00
// FIXME: obsolete, used only for old saves
std::map<std::string, SpellParams> mSpellParams;
2014-08-21 03:11:49 +02:00
std::map<std::string, std::vector<PermanentSpellEffectInfo>> mPermanentSpellEffects;
std::map<std::string, CorprusStats> mCorprusSpells;
2014-05-12 21:04:02 +02:00
std::map<std::string, TimeStamp> mUsedPowers;
std::string mSelectedSpell;
void load(ESMReader& esm);
void save(ESMWriter& esm) const;
};
}
#endif