ManaPlus
|
#include <complexitem.h>
Public Member Functions | |
ComplexItem (const int id, const ItemTypeT type, const int quantity, const uint8_t refine, const ItemColor color, const Identified identified, const Damaged damaged, const Favorite favorite, const Equipm equipment, const Equipped equipped) | |
virtual | ~ComplexItem () |
void | addChild (const Item *const item, const int amount) |
const std::vector< Item * > & | getChilds () const |
Public Member Functions inherited from Item | |
Item (const int id, const ItemTypeT type, const int quantity, const uint8_t refine, const ItemColor color, const Identified identified, const Damaged damaged, const Favorite favorite, const Equipm equipment, const Equipped equipped) | |
virtual | ~Item () |
void | setId (const int id, const ItemColor color) |
int | getId () const |
Image * | getImage () const |
void | setQuantity (const int quantity) |
void | increaseQuantity (const int amount) |
int | getQuantity () const |
void | setEquipment (const Equipm equipment) |
Equipm | isEquipment () const |
void | setEquipped (const Equipped equipped) |
Equipped | isEquipped () const |
void | setRefine (const uint8_t refine) |
uint8_t | getRefine () const |
void | setInEquipment (const bool inEquipment) |
bool | isInEquipment () const |
void | setInvIndex (const int index) |
int | getInvIndex () const |
const ItemInfo & | getInfo () const |
std::string | getName () const |
bool | isHaveTag (const int tagId) const |
ItemColor | getColor () const |
void | setColor (const ItemColor color) |
const std::string & | getDescription () const |
void | setIdentified (const Identified b) |
Identified | getIdentified () const |
void | setDamaged (const Damaged b) |
Damaged | getDamaged () const |
void | setFavorite (const Favorite b) |
Favorite | getFavorite () const |
void | setCard (const int index, const int id) |
int | getCard (const int index) const |
void | setCards (const int *const cards, const int size) |
const int * | getCards () const |
void | setOptions (const ItemOptionsList *const options) |
const ItemOptionsList * | getOptions () const |
void | setType (const ItemTypeT type) |
ItemTypeT | getType () const |
void | setTag (const int tag) |
int | getTag () const |
void | addCard (const int card) |
void | updateColor () |
Protected Attributes | |
std::vector< Item * > | mChildItems |
Protected Attributes inherited from Item | |
Image * | mImage |
std::string | mDescription |
std::map< int, int > | mTags |
int | mCards [4] |
const ItemOptionsList * | mOptions |
uint8_t | mRefine |
int | mInvIndex |
ItemTypeT | mType |
Equipm | mEquipment |
Equipped | mEquipped |
bool | mInEquipment |
Identified | mIdentified |
Damaged | mDamaged |
Favorite | mFavorite |
Additional Inherited Members | |
Static Public Member Functions inherited from Item | |
static Image * | getImage (const int id, const ItemColor color) |
static bool | isItem (const int id) |
Data Fields inherited from Item | |
int | mId |
ItemColor | mColor |
int | mQuantity |
int | mTag |
Represents one or more instances of a certain item type.
Definition at line 32 of file complexitem.h.
ComplexItem::ComplexItem | ( | const int | id, |
const ItemTypeT | type, | ||
const int | quantity, | ||
const uint8_t | refine, | ||
const ItemColor | color, | ||
const Identified | identified, | ||
const Damaged | damaged, | ||
const Favorite | favorite, | ||
const Equipm | equipment, | ||
const Equipped | equipped | ||
) |
Constructor.
Definition at line 29 of file complexitem.cpp.
Referenced by addChild().
|
virtual |
Destructor.
Definition at line 53 of file complexitem.cpp.
References delete_all(), and mChildItems.
void ComplexItem::addChild | ( | const Item *const | item, |
const int | amount | ||
) |
Definition at line 59 of file complexitem.cpp.
References ComplexItem(), Equipm_false, Equipped_false, FOR_EACH, Item::getColor(), Item::getDamaged(), Item::getFavorite(), Item::getId(), Item::getIdentified(), Item::getInvIndex(), Item::getRefine(), Item::getTag(), Item::getType(), Item::increaseQuantity(), mChildItems, Item::setInvIndex(), and Item::setTag().
Referenced by ComplexInventory::addVirtualItem(), and ComplexInventory::setItem().
|
inline |
Definition at line 59 of file complexitem.h.
References mChildItems.
Referenced by NpcDialog::complexItemToStr().
|
protected |
Definition at line 63 of file complexitem.h.
Referenced by addChild(), getChilds(), and ~ComplexItem().