|
Public Member Functions |
| | ItemClass (int id, int type) |
| bool | use (Being *itemUser) |
| | The function called to use an item applying only the modifiers (for simple items...).
|
| int | getType () const |
| | Gets item type.
|
| int | getWeight () const |
| | Gets item weight.
|
| void | setWeight (int weight) |
| | Sets item weight.
|
| int | getCost () const |
| | Gets unit cost of these items.
|
| void | setCost (int cost) |
| | Sets unit cost of these items.
|
| int | getMaxPerSlot () const |
| | Gets max item per slot.
|
| void | setMaxPerSlot (int perSlot) |
| | Sets max item per slot.
|
| Modifiers const & | getModifiers () const |
| | Gets item modifiers.
|
| void | setModifiers (Modifiers const &modifiers) |
| | Sets item modifiers.
|
| void | setScriptName (std::string const &name) |
| | Sets associated script name.
|
| int | getDatabaseID () |
| | Gets database ID.
|
| void | setSpriteID (unsigned short spriteID) |
| | Sets the sprite ID.
|
| unsigned short | getSpriteID () |
| | Gets the sprite ID.
|
Private Member Functions |
| bool | runScript (Being *itemUser) |
| | Runs the associated script when using the item, if any.
|
Private Attributes |
| unsigned short | mDatabaseID |
| unsigned short | mSpriteID |
| | The sprite that should be shown to the character.
|
| unsigned char | mType |
| | Type: usable, equipment.
|
| unsigned short | mWeight |
| | Weight of the item.
|
| unsigned short | mCost |
| | Unit cost the item.
|
| unsigned short | mMaxPerSlot |
| | Max item amount per slot in inventory.
|
| std::string | mScriptName |
| | Item script.
|
| Modifiers | mModifiers |
| | Item modifiers.
|