summaryrefslogtreecommitdiffstats
path: root/source/Items/ItemHandler.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-07-28 19:15:03 +0200
committermadmaxoft <github@xoft.cz>2013-07-28 19:15:03 +0200
commit4746d2251c6204118e710c818d78b89c356a7427 (patch)
tree2573e0b5e70b04aebc35d5da034c8449ff696f3d /source/Items/ItemHandler.h
parentProtoProxy now properly waits for both sides to establish encryption (diff)
downloadcuberite-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 'source/Items/ItemHandler.h')
-rw-r--r--source/Items/ItemHandler.h17
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();