2014-01-31 12:25:32 +00:00
|
|
|
#ifndef OPENMW_ESM_INVENTORYSTATE_H
|
|
|
|
#define OPENMW_ESM_INVENTORYSTATE_H
|
|
|
|
|
2014-05-18 10:53:21 +00:00
|
|
|
#include <map>
|
|
|
|
|
2014-01-31 12:25:32 +00:00
|
|
|
#include "objectstate.hpp"
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
|
|
|
// format 0, saved games only
|
|
|
|
|
|
|
|
/// \brief State for inventories and containers
|
|
|
|
struct InventoryState
|
|
|
|
{
|
2015-01-23 14:31:44 +00:00
|
|
|
/// <ObjectState, relative equipment slot>
|
2015-01-19 09:34:49 +00:00
|
|
|
std::vector<std::pair<ObjectState, int> > mItems;
|
2014-01-31 12:25:32 +00:00
|
|
|
|
2014-05-18 10:53:21 +00:00
|
|
|
std::map<std::string, int> mLevelledItemMap;
|
|
|
|
|
2014-12-30 00:36:31 +00:00
|
|
|
typedef std::map<std::string, std::vector<std::pair<float, float> > > TEffectMagnitudes;
|
|
|
|
TEffectMagnitudes mPermanentMagicEffectMagnitudes;
|
|
|
|
|
2014-05-15 01:12:52 +00:00
|
|
|
virtual ~InventoryState() {}
|
|
|
|
|
2014-01-31 12:25:32 +00:00
|
|
|
virtual void load (ESMReader &esm);
|
|
|
|
virtual void save (ESMWriter &esm) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|