|
OpenMW
|
#include <inventorystore.hpp>
Classes | |
| struct | EffectParams |
Public Member Functions | |
| InventoryStore () | |
| InventoryStore (const InventoryStore &store) | |
| InventoryStore & | operator= (const InventoryStore &store) |
| virtual ContainerStoreIterator | add (const Ptr &itemPtr, const Ptr &actorPtr) |
| void | equip (int slot, const ContainerStoreIterator &iterator, const Ptr &actor) |
| void | setSelectedEnchantItem (const ContainerStoreIterator &iterator) |
| ContainerStoreIterator | getSelectedEnchantItem () |
| ContainerStoreIterator | getSlot (int slot) |
| void | unequipAll (const MWWorld::Ptr &actor) |
| Unequip all currently equipped items. | |
| void | autoEquip (const MWWorld::Ptr &actor) |
| Auto equip items according to stats and item value. | |
| const MWMechanics::MagicEffects & | getMagicEffects () const |
| Return magic effects from worn items. | |
| virtual void | flagAsModified () |
| virtual bool | stacks (const Ptr &ptr1, const Ptr &ptr2) |
| virtual int | remove (const Ptr &item, int count, const Ptr &actor) |
| ContainerStoreIterator | unequipSlot (int slot, const Ptr &actor, bool restack=true) |
| ContainerStoreIterator | unequipItem (const Ptr &item, const Ptr &actor) |
| void | setListener (InventoryStoreListener *listener, const Ptr &actor) |
| Set a listener for various events, see InventoryStoreListener. | |
| void | visitEffectSources (MWMechanics::EffectSourceVisitor &visitor) |
| void | rechargeItems (float duration) |
| Restore charge on enchanted items. Note this should only be done for the player. | |
| void | purgeEffect (short effectId) |
| Remove a magic effect. | |
Static Public Attributes | |
| 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 |
| static const int | Slots = 19 |
| static const int | Slot_NoSlot = -1 |
Private Types | |
| typedef std::map< std::string, std::vector< EffectParams > > | TEffectMagnitudes |
| typedef std::vector < ContainerStoreIterator > | TSlots |
| typedef std::vector< std::pair < ContainerStoreIterator, float > > | TRechargingItems |
Private Member Functions | |
| void | copySlots (const InventoryStore &store) |
| void | initSlots (TSlots &slots_) |
| void | updateMagicEffects (const Ptr &actor) |
| void | updateRechargingItems () |
| void | fireEquipmentChangedEvent () |
Private Attributes | |
| MWMechanics::MagicEffects | mMagicEffects |
| InventoryStoreListener * | mListener |
| bool | mUpdatesEnabled |
| bool | mFirstAutoEquip |
| TEffectMagnitudes | mPermanentMagicEffectMagnitudes |
| TSlots | mSlots |
| ContainerStoreIterator | mSelectedEnchantItem |
| TRechargingItems | mRechargingItems |
typedef std::map<std::string, std::vector<EffectParams> > MWWorld::InventoryStore::TEffectMagnitudes [private] |
typedef std::vector<std::pair<ContainerStoreIterator, float> > MWWorld::InventoryStore::TRechargingItems [private] |
typedef std::vector<ContainerStoreIterator> MWWorld::InventoryStore::TSlots [private] |
| MWWorld::InventoryStore::InventoryStore | ( | const InventoryStore & | store | ) |
| MWWorld::ContainerStoreIterator MWWorld::InventoryStore::add | ( | const Ptr & | itemPtr, |
| const Ptr & | actorPtr | ||
| ) | [virtual] |
Add the item pointed to by ptr to this container. (Stacks automatically if needed) Auto-equip items if specific conditions are fulfilled (see the implementation).
Reimplemented from MWWorld::ContainerStore.
| void MWWorld::InventoryStore::autoEquip | ( | const MWWorld::Ptr & | actor | ) |
Auto equip items according to stats and item value.
| void MWWorld::InventoryStore::copySlots | ( | const InventoryStore & | store | ) | [private] |
| void MWWorld::InventoryStore::equip | ( | int | slot, |
| const ContainerStoreIterator & | iterator, | ||
| const Ptr & | actor | ||
| ) |
| void MWWorld::InventoryStore::fireEquipmentChangedEvent | ( | ) | [private] |
| void MWWorld::InventoryStore::flagAsModified | ( | ) | [virtual] |
Reimplemented from MWWorld::ContainerStore.
| const MWMechanics::MagicEffects & MWWorld::InventoryStore::getMagicEffects | ( | ) | const |
Return magic effects from worn items.
| void MWWorld::InventoryStore::initSlots | ( | TSlots & | slots_ | ) | [private] |
| MWWorld::InventoryStore & MWWorld::InventoryStore::operator= | ( | const InventoryStore & | store | ) |
| void MWWorld::InventoryStore::purgeEffect | ( | short | effectId | ) |
Remove a magic effect.
| void MWWorld::InventoryStore::rechargeItems | ( | float | duration | ) |
Restore charge on enchanted items. Note this should only be done for the player.
| int MWWorld::InventoryStore::remove | ( | const Ptr & | item, |
| int | count, | ||
| const Ptr & | actor | ||
| ) | [virtual] |
Remove count item(s) designated by item from this inventory.
Reimplemented from MWWorld::ContainerStore.
| void MWWorld::InventoryStore::setListener | ( | InventoryStoreListener * | listener, |
| const Ptr & | actor | ||
| ) |
Set a listener for various events, see InventoryStoreListener.
| void MWWorld::InventoryStore::setSelectedEnchantItem | ( | const ContainerStoreIterator & | iterator | ) |
set the selected magic item (for using enchantments of type "Cast once" or "Cast when used")
| bool MWWorld::InventoryStore::stacks | ( | const Ptr & | ptr1, |
| const Ptr & | ptr2 | ||
| ) | [virtual] |
Reimplemented from MWWorld::ContainerStore.
| void MWWorld::InventoryStore::unequipAll | ( | const MWWorld::Ptr & | actor | ) |
Unequip all currently equipped items.
| MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipItem | ( | const Ptr & | item, |
| const Ptr & | actor | ||
| ) |
Unequip an item identified by its Ptr. An exception is thrown if the item is not currently equipped.
| MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot | ( | int | slot, |
| const Ptr & | actor, | ||
| bool | restack = true |
||
| ) |
Unequip slot.
| void MWWorld::InventoryStore::updateMagicEffects | ( | const Ptr & | actor | ) | [private] |
| void MWWorld::InventoryStore::updateRechargingItems | ( | ) | [private] |
| void MWWorld::InventoryStore::visitEffectSources | ( | MWMechanics::EffectSourceVisitor & | visitor | ) |
bool MWWorld::InventoryStore::mFirstAutoEquip [private] |
TSlots MWWorld::InventoryStore::mSlots [private] |
bool MWWorld::InventoryStore::mUpdatesEnabled [private] |
const int MWWorld::InventoryStore::Slot_Ammunition = 18 [static] |
const int MWWorld::InventoryStore::Slot_Amulet = 14 [static] |
const int MWWorld::InventoryStore::Slot_Belt = 15 [static] |
const int MWWorld::InventoryStore::Slot_Boots = 7 [static] |
const int MWWorld::InventoryStore::Slot_CarriedLeft = 17 [static] |
const int MWWorld::InventoryStore::Slot_CarriedRight = 16 [static] |
const int MWWorld::InventoryStore::Slot_Cuirass = 1 [static] |
const int MWWorld::InventoryStore::Slot_Greaves = 2 [static] |
const int MWWorld::InventoryStore::Slot_Helmet = 0 [static] |
const int MWWorld::InventoryStore::Slot_LeftGauntlet = 5 [static] |
const int MWWorld::InventoryStore::Slot_LeftPauldron = 3 [static] |
const int MWWorld::InventoryStore::Slot_LeftRing = 12 [static] |
const int MWWorld::InventoryStore::Slot_NoSlot = -1 [static] |
const int MWWorld::InventoryStore::Slot_Pants = 9 [static] |
const int MWWorld::InventoryStore::Slot_RightGauntlet = 6 [static] |
const int MWWorld::InventoryStore::Slot_RightPauldron = 4 [static] |
const int MWWorld::InventoryStore::Slot_RightRing = 13 [static] |
const int MWWorld::InventoryStore::Slot_Robe = 11 [static] |
const int MWWorld::InventoryStore::Slot_Shirt = 8 [static] |
const int MWWorld::InventoryStore::Slot_Skirt = 10 [static] |
const int MWWorld::InventoryStore::Slots = 19 [static] |
1.7.6.1