Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
FoodItem.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Item.hpp"
4 
8 class FoodItem : public Item
9 {
10 
11 public:
12  FoodItem(int id, std::string name, int healAmount, bool isStackable = false);
13 
14  FoodItem(const FoodItemStruct& foodItem);
15 
20  int getHealAmount();
21 
27  bool use(Entity* user) override;
28 
29 private:
31 };
Base pure virtual Entity class. Different types of enities inherit this.
Definition: Entity.hpp:17
Represents an item that can be eaten.
Definition: FoodItem.hpp:9
int getHealAmount()
Returns the amount of hp eating this item restores.
Definition: FoodItem.cpp:8
FoodItem(int id, std::string name, int healAmount, bool isStackable=false)
Definition: FoodItem.cpp:4
int healAmountM
Definition: FoodItem.hpp:30
bool use(Entity *user) override
Eats the item.
Definition: FoodItem.cpp:13
Base class for items.
Definition: Item.hpp:13
Definition: ItemReader.hpp:70