diff options
Diffstat (limited to '')
-rw-r--r-- | source/Items/ItemHandler.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/Items/ItemHandler.h b/source/Items/ItemHandler.h index 0c141dea0..f7985327a 100644 --- a/source/Items/ItemHandler.h +++ b/source/Items/ItemHandler.h @@ -38,16 +38,17 @@ public: struct FoodInfo
{
- FoodInfo(short a_FoodLevel, float a_Saturation, char a_PoisionChance = 0)
+ int FoodLevel;
+ double Saturation;
+ int PoisonChance; // 0 - 100, in percent. 0 = no chance of poisoning, 100 = sure poisoning
+
+ FoodInfo(int a_FoodLevel, double a_Saturation, int a_PoisonChance = 0) :
+ FoodLevel(a_FoodLevel),
+ Saturation(a_Saturation),
+ PoisonChance(a_PoisonChance)
{
- FoodLevel = a_FoodLevel;
- Saturation = a_Saturation;
- PoisionChance = a_PoisionChance;
}
- short FoodLevel;
- float Saturation;
- char PoisionChance; //0 - 100
- };
+ } ;
/// Returns the FoodInfo for this item. (FoodRecovery, Saturation and PoisionChance)
virtual FoodInfo GetFoodInfo();
|