OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
inventorystate.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_ESM_INVENTORYSTATE_H
2 #define OPENMW_ESM_INVENTORYSTATE_H
3 
4 #include <map>
5 
6 #include "objectstate.hpp"
7 
8 namespace ESM
9 {
10  class ESMReader;
11  class ESMWriter;
12 
13  // format 0, saved games only
14 
17  {
18  std::vector<ObjectState> mItems;
19 
20  // <Index in mItems, equipment slot>
21  std::map<int, int> mEquipmentSlots;
22 
23  std::map<std::pair<std::string, std::string>, int> mLevelledItemMap;
24 
25  typedef std::map<std::string, std::vector<std::pair<float, float> > > TEffectMagnitudes;
27 
28  int mSelectedEnchantItem; // For inventories only
29 
31  virtual ~InventoryState() {}
32 
33  virtual void load (ESMReader &esm);
34  virtual void save (ESMWriter &esm) const;
35  };
36 }
37 
38 #endif
virtual void save(ESMWriter &esm) const
Definition: inventorystate.cpp:79
std::vector< ObjectState > mItems
Definition: inventorystate.hpp:18
Definition: esmreader.hpp:21
TEffectMagnitudes mPermanentMagicEffectMagnitudes
Definition: inventorystate.hpp:26
std::map< std::pair< std::string, std::string >, int > mLevelledItemMap
Definition: inventorystate.hpp:23
virtual ~InventoryState()
Definition: inventorystate.hpp:31
std::map< int, int > mEquipmentSlots
Definition: inventorystate.hpp:21
Definition: esmwriter.hpp:17
std::map< std::string, std::vector< std::pair< float, float > > > TEffectMagnitudes
Definition: inventorystate.hpp:25
State for inventories and containers.
Definition: inventorystate.hpp:16
InventoryState()
Definition: inventorystate.hpp:30
virtual void load(ESMReader &esm)
Definition: inventorystate.cpp:6
int mSelectedEnchantItem
Definition: inventorystate.hpp:28