Public Member Functions | |
InventoryItems (Character *character, ItemCategory category) | |
void | clear () |
InventoryItems & | operator= (const InventoryItems &src) |
bool | passRestrictions (int itemId, bool suppressError=false) const |
Common::String | getName (int itemIndex) |
virtual Common::String | getFullDescription (int itemIndex, int displayNum=15)=0 |
Common::String | getIdentifiedDetails (int itemIndex) |
bool | discardItem (int itemIndex) |
virtual void | equipItem (int itemIndex) |
void | removeItem (int itemIndex) |
void | sort () |
virtual void | enchantItem (int itemIndex, int amount) |
bool | isFull () const |
Public Member Functions inherited from Common::Array< XeenItem > | |
Array (size_type count) | |
Array (size_type count, const XeenItem &value) | |
Array (const Array< XeenItem > &array) | |
Array (Array< XeenItem > &&old) | |
Array (std::initializer_list< XeenItem > list) | |
Array (const T2 *array, size_type n) | |
void | emplace (const_iterator pos, TArgs &&... args) |
void | emplace_back (TArgs &&...args) |
void | push_back (const XeenItem &element) |
void | push_back (XeenItem &&element) |
void | push_back (const Array< XeenItem > &array) |
void | pop_back () |
const XeenItem * | data () const |
XeenItem * | data () |
XeenItem & | front () |
const XeenItem & | front () const |
XeenItem & | back () |
const XeenItem & | back () const |
void | insert_at (size_type idx, const XeenItem &element) |
void | insert_at (size_type idx, const Array< XeenItem > &array) |
void | insert (iterator pos, const XeenItem &element) |
XeenItem | remove_at (size_type idx) |
XeenItem & | operator[] (size_type idx) |
const XeenItem & | operator[] (size_type idx) const |
Array< XeenItem > & | operator= (const Array< XeenItem > &array) |
Array & | operator= (Array< XeenItem > &&old) |
size_type | size () const |
void | clear () |
iterator | erase (iterator pos) |
iterator | erase (iterator first, iterator last) |
bool | empty () const |
bool | operator== (const Array< XeenItem > &other) const |
bool | operator!= (const Array< XeenItem > &other) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
void | reserve (size_type newCapacity) |
void | resize (size_type newSize) |
void | resize (size_type newSize, const XeenItem value) |
void | assign (const_iterator first, const_iterator last) |
void | swap (Array &arr) |
Protected Member Functions | |
XeenEngine * | getVm () |
void | equipError (int itemIndex1, ItemCategory category1, int itemIndex2, ItemCategory category2) |
virtual Common::String | getAttributes (XeenItem &item, const Common::String &classes)=0 |
void | capitalizeItem (Common::String &name) |
const char * | getMaeName (int material) |
Protected Member Functions inherited from Common::Array< XeenItem > | |
void | allocCapacity (size_type capacity) |
void | freeStorage (XeenItem *storage, const size_type elements) |
iterator | insert_aux (iterator pos, const_iterator first, const_iterator last) |
Protected Attributes | |
Character * | _character |
ItemCategory | _category |
const char ** | _names |
Protected Attributes inherited from Common::Array< XeenItem > | |
size_type | _capacity |
size_type | _size |
XeenItem * | _storage |
Additional Inherited Members | |
Public Types inherited from Common::Array< XeenItem > | |
typedef XeenItem * | iterator |
typedef const XeenItem * | const_iterator |
typedef XeenItem | value_type |
typedef uint | size_type |
Static Protected Member Functions inherited from Common::Array< XeenItem > | |
static size_type | roundUpCapacity (size_type capacity) |
|
protectedpure virtual |
Returns a text string listing all the stats/attributes of a given item
Implemented in MM::Xeen::MiscItems, MM::Xeen::AccessoryItems, MM::Xeen::ArmorItems, and MM::Xeen::WeaponItems.
|
protected |
Capitalizes a passed description string that includes embedded formatting for the Items dialog
|
protected |
Get Material Name
void MM::Xeen::InventoryItems::clear | ( | ) |
Clears the set of items
InventoryItems& MM::Xeen::InventoryItems::operator= | ( | const InventoryItems & | src | ) |
Handles copying items from one character to another
bool MM::Xeen::InventoryItems::passRestrictions | ( | int | itemId, |
bool | suppressError = false |
||
) | const |
Return whether a given item passes class-based usage restrictions
itemId | Item Index |
suppressError | If true, no dialog is shown if the item doesn't pass restrictions |
Common::String MM::Xeen::InventoryItems::getName | ( | int | itemIndex | ) |
Return the bare name of a given inventory item
Common::String MM::Xeen::InventoryItems::getIdentifiedDetails | ( | int | itemIndex | ) |
Returns the identified details for an item
bool MM::Xeen::InventoryItems::discardItem | ( | int | itemIndex | ) |
Discard an item from the inventory
|
inlinevirtual |
Equips an item
Reimplemented in MM::Xeen::AccessoryItems, MM::Xeen::ArmorItems, and MM::Xeen::WeaponItems.
void MM::Xeen::InventoryItems::removeItem | ( | int | itemIndex | ) |
Un-equips the given item
void MM::Xeen::InventoryItems::sort | ( | ) |
Sorts the items list, removing any empty item slots to the end of the array
|
virtual |
Enchants an item
Reimplemented in MM::Xeen::ArmorItems, and MM::Xeen::WeaponItems.
bool MM::Xeen::InventoryItems::isFull | ( | ) | const |
Return if the given inventory items list is full