2012-03-10 11:43:48 +00:00
|
|
|
#ifndef GAME_MWWORLD_INVENTORYSTORE_H
|
|
|
|
#define GAME_MWWORLD_INVENTORYSTORE_H
|
|
|
|
|
|
|
|
#include "containerstore.hpp"
|
|
|
|
|
2012-03-31 15:26:15 +00:00
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
struct NpcStats;
|
|
|
|
}
|
|
|
|
|
2012-03-10 11:43:48 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
///< \brief Variant of the ContainerStore for NPCs
|
|
|
|
class InventoryStore : public ContainerStore
|
|
|
|
{
|
2012-03-13 12:31:11 +00:00
|
|
|
public:
|
2012-03-10 11:43:48 +00:00
|
|
|
|
2012-03-13 12:31:11 +00:00
|
|
|
static const int Slot_Helmet = 0;
|
|
|
|
static const int Slot_Cuirass = 1;
|
|
|
|
static const int Slot_Greaves = 2;
|
|
|
|
static const int Slot_LeftPauldron = 3;
|
|
|
|
static const int Slot_RightPauldron = 4;
|
|
|
|
static const int Slot_LeftGauntlet = 5;
|
|
|
|
static const int Slot_RightGauntlet = 6;
|
|
|
|
static const int Slot_Boots = 7;
|
|
|
|
static const int Slot_Shirt = 8;
|
|
|
|
static const int Slot_Pants = 9;
|
|
|
|
static const int Slot_Skirt = 10;
|
|
|
|
static const int Slot_Robe = 11;
|
|
|
|
static const int Slot_LeftRing = 12;
|
|
|
|
static const int Slot_RightRing = 13;
|
|
|
|
static const int Slot_Amulet = 14;
|
|
|
|
static const int Slot_Belt = 15;
|
|
|
|
static const int Slot_CarriedRight = 16;
|
|
|
|
static const int Slot_CarriedLeft = 17;
|
|
|
|
static const int Slot_Ammunition = 18;
|
2012-03-10 11:43:48 +00:00
|
|
|
|
2012-03-13 12:31:11 +00:00
|
|
|
static const int Slots = 19;
|
|
|
|
|
|
|
|
static const int Slot_NoSlot = -1;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2012-03-31 15:26:15 +00:00
|
|
|
typedef std::vector<ContainerStoreIterator> TSlots;
|
|
|
|
|
|
|
|
mutable TSlots mSlots;
|
2012-03-13 12:31:11 +00:00
|
|
|
|
|
|
|
void copySlots (const InventoryStore& store);
|
|
|
|
|
2012-03-31 15:26:15 +00:00
|
|
|
void initSlots (TSlots& slots);
|
|
|
|
|
2012-03-13 12:31:11 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
InventoryStore();
|
|
|
|
|
|
|
|
InventoryStore (const InventoryStore& store);
|
|
|
|
|
|
|
|
InventoryStore& operator= (const InventoryStore& store);
|
|
|
|
|
|
|
|
void equip (int slot, const ContainerStoreIterator& iterator);
|
2012-03-13 13:04:19 +00:00
|
|
|
///< \note \a iteartor can be an end-iterator
|
2012-03-13 12:31:11 +00:00
|
|
|
|
|
|
|
ContainerStoreIterator getSlot (int slot);
|
2012-03-31 15:26:15 +00:00
|
|
|
|
2012-04-23 13:27:03 +00:00
|
|
|
void autoEquip (const MWMechanics::NpcStats& stats);
|
2012-03-31 15:26:15 +00:00
|
|
|
///< Auto equip items according to stats and item value.
|
2012-03-10 11:43:48 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|