2014-05-12 19:04:02 +00:00
|
|
|
#ifndef OPENMW_ESM_SPELLSTATE_H
|
|
|
|
#define OPENMW_ESM_SPELLSTATE_H
|
|
|
|
|
|
|
|
#include <map>
|
2014-08-21 01:11:49 +00:00
|
|
|
#include <vector>
|
2014-05-12 19:04:02 +00:00
|
|
|
#include <string>
|
2016-07-01 16:50:28 +00:00
|
|
|
#include <set>
|
2014-05-12 19:04:02 +00:00
|
|
|
|
|
|
|
#include "defs.hpp"
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
2015-01-21 20:24:25 +00:00
|
|
|
// NOTE: spell ids must be lower case
|
2014-05-12 19:04:02 +00:00
|
|
|
struct SpellState
|
|
|
|
{
|
2014-08-19 01:17:31 +00:00
|
|
|
struct CorprusStats
|
|
|
|
{
|
|
|
|
int mWorsenings;
|
|
|
|
TimeStamp mNextWorsening;
|
|
|
|
};
|
|
|
|
|
2014-08-21 01:11:49 +00:00
|
|
|
struct PermanentSpellEffectInfo
|
|
|
|
{
|
|
|
|
int mId;
|
|
|
|
int mArg;
|
|
|
|
float mMagnitude;
|
|
|
|
};
|
|
|
|
|
2016-07-01 16:50:28 +00:00
|
|
|
struct SpellParams {
|
|
|
|
std::map<int, float> mEffectRands;
|
|
|
|
std::set<int> mPurgedEffects;
|
|
|
|
};
|
|
|
|
typedef std::map<std::string, SpellParams> TContainer;
|
2014-05-12 19:04:02 +00:00
|
|
|
TContainer mSpells;
|
|
|
|
|
2014-08-21 01:11:49 +00:00
|
|
|
std::map<std::string, std::vector<PermanentSpellEffectInfo> > mPermanentSpellEffects;
|
|
|
|
|
2014-08-19 01:17:31 +00:00
|
|
|
std::map<std::string, CorprusStats> mCorprusSpells;
|
|
|
|
|
2014-05-12 19:04:02 +00:00
|
|
|
std::map<std::string, TimeStamp> mUsedPowers;
|
|
|
|
|
|
|
|
std::string mSelectedSpell;
|
|
|
|
|
|
|
|
void load (ESMReader &esm);
|
|
|
|
void save (ESMWriter &esm) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|