2014-01-31 13:25:32 +01:00
|
|
|
#ifndef OPENMW_ESM_INVENTORYSTATE_H
|
|
|
|
#define OPENMW_ESM_INVENTORYSTATE_H
|
|
|
|
|
2014-05-18 12:53:21 +02:00
|
|
|
#include <map>
|
|
|
|
|
2014-01-31 13:25:32 +01: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 15:31:44 +01:00
|
|
|
/// <ObjectState, relative equipment slot>
|
2015-01-19 10:34:49 +01:00
|
|
|
std::vector<std::pair<ObjectState, int> > mItems;
|
2014-01-31 13:25:32 +01:00
|
|
|
|
2014-05-18 12:53:21 +02:00
|
|
|
std::map<std::string, int> mLevelledItemMap;
|
|
|
|
|
2014-12-30 01:36:31 +01:00
|
|
|
typedef std::map<std::string, std::vector<std::pair<float, float> > > TEffectMagnitudes;
|
|
|
|
TEffectMagnitudes mPermanentMagicEffectMagnitudes;
|
|
|
|
|
2014-05-14 20:12:52 -05:00
|
|
|
virtual ~InventoryState() {}
|
|
|
|
|
2014-01-31 13:25:32 +01:00
|
|
|
virtual void load (ESMReader &esm);
|
|
|
|
virtual void save (ESMWriter &esm) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|