|
Rehti MMORPG
1.0.0
Rehti MMORPG is a free and open source MMORPG game.
|
Represents an item that can be equipped. More...
#include <EquippableItem.hpp>


Public Member Functions | |
| EquippableItem (int id, std::string name, Slot equippableToSlot, ItemStats stats=ItemStats(), bool isStackable=false) | |
| EquippableItem (const EquippableItemStruct &equippableItem) | |
| Slot | getEquippableSlot () |
| Returns the slot that the item can be equipped to. More... | |
| ItemStats & | getStats () |
| Returns the stats of the item. More... | |
| bool | use (Entity *user) override |
| Equips the item. More... | |
Public Member Functions inherited from Item | |
| Item (int id, std::string name, bool isStackable=false) | |
| Item (const GeneralItemStruct &generalItem) | |
| const int & | getId () |
| Get the type id of the item. More... | |
| const int & | getInstanceId () |
| Get the instance id of the item. More... | |
| const unsigned int & | getStackSize () |
| Get the stack size of the item. More... | |
| const std::string & | getName () |
| Get the name of the item. More... | |
| const bool & | IsStackable () |
| Get whether the item is stackable or not. More... | |
Protected Attributes | |
| Slot | equippableToSlotM |
| ItemStats | statsM |
Protected Attributes inherited from Item | |
| int | idM |
| int | instanceIdM |
| const unsigned int | stackSizeM = 1 |
| TODO: Implement amount functionality for stackable items. More... | |
| std::string | nameM |
| bool | isStackableM |
Additional Inherited Members | |
Static Protected Attributes inherited from Item | |
| static int | nextInstanceIdM = 0 |
Represents an item that can be equipped.
| EquippableItem::EquippableItem | ( | int | id, |
| std::string | name, | ||
| Slot | equippableToSlot, | ||
| ItemStats | stats = ItemStats(), |
||
| bool | isStackable = false |
||
| ) |
| EquippableItem::EquippableItem | ( | const EquippableItemStruct & | equippableItem | ) |
| Slot EquippableItem::getEquippableSlot | ( | ) |
Returns the slot that the item can be equipped to.
|
overridevirtual |
Equips the item.
| user |
Reimplemented from Item.

|
protected |
|
protected |