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


Public Member Functions | |
| FoodItem (int id, std::string name, int healAmount, bool isStackable=false) | |
| FoodItem (const FoodItemStruct &foodItem) | |
| int | getHealAmount () |
| Returns the amount of hp eating this item restores. More... | |
| bool | use (Entity *user) override |
| Eats 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... | |
Private Attributes | |
| int | healAmountM |
Additional Inherited Members | |
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 |
Static Protected Attributes inherited from Item | |
| static int | nextInstanceIdM = 0 |
Represents an item that can be eaten.
| FoodItem::FoodItem | ( | int | id, |
| std::string | name, | ||
| int | healAmount, | ||
| bool | isStackable = false |
||
| ) |
| FoodItem::FoodItem | ( | const FoodItemStruct & | foodItem | ) |
| int FoodItem::getHealAmount | ( | ) |
Returns the amount of hp eating this item restores.
|
overridevirtual |
Eats the item.
| user |
Reimplemented from Item.

|
private |