diff options
author | madmaxoft <github@xoft.cz> | 2013-07-28 19:15:03 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-07-28 19:15:03 +0200 |
commit | 4746d2251c6204118e710c818d78b89c356a7427 (patch) | |
tree | 2573e0b5e70b04aebc35d5da034c8449ff696f3d /source/Items/ItemHandler.h | |
parent | ProtoProxy now properly waits for both sides to establish encryption (diff) | |
download | cuberite-4746d2251c6204118e710c818d78b89c356a7427.tar cuberite-4746d2251c6204118e710c818d78b89c356a7427.tar.gz cuberite-4746d2251c6204118e710c818d78b89c356a7427.tar.bz2 cuberite-4746d2251c6204118e710c818d78b89c356a7427.tar.lz cuberite-4746d2251c6204118e710c818d78b89c356a7427.tar.xz cuberite-4746d2251c6204118e710c818d78b89c356a7427.tar.zst cuberite-4746d2251c6204118e710c818d78b89c356a7427.zip |
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();
|