summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-14 22:23:20 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-14 22:23:20 +0100
commit71250b275f2c1b16ff81c74c6e3f5bc2794ebb97 (patch)
tree7ceedd7d9357d5e7b32f05e1d2e3848934bb6089 /src
parentForgot to commit the ClientHandle. (diff)
downloadcuberite-71250b275f2c1b16ff81c74c6e3f5bc2794ebb97.tar
cuberite-71250b275f2c1b16ff81c74c6e3f5bc2794ebb97.tar.gz
cuberite-71250b275f2c1b16ff81c74c6e3f5bc2794ebb97.tar.bz2
cuberite-71250b275f2c1b16ff81c74c6e3f5bc2794ebb97.tar.lz
cuberite-71250b275f2c1b16ff81c74c6e3f5bc2794ebb97.tar.xz
cuberite-71250b275f2c1b16ff81c74c6e3f5bc2794ebb97.tar.zst
cuberite-71250b275f2c1b16ff81c74c6e3f5bc2794ebb97.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Effects.h29
-rw-r--r--src/Entities/Player.cpp6
2 files changed, 32 insertions, 3 deletions
diff --git a/src/Entities/Effects.h b/src/Entities/Effects.h
new file mode 100644
index 000000000..4fb867e65
--- /dev/null
+++ b/src/Entities/Effects.h
@@ -0,0 +1,29 @@
+#pragma once
+
+// tolua_begin
+enum ENUM_ENTITY_EFFECT
+{
+ E_EFFECT_SPEED = 1,
+ E_EFFECT_SLOWNESS = 2,
+ E_EFFECT_HASTE = 3,
+ E_EFFECT_MINING_FATIGUE = 4,
+ E_EFFECT_STENGTH = 5,
+ E_EFFECT_INSTANT_HEALTH = 6,
+ E_EFFECT_INSTANT_DAMAGE = 7,
+ E_EFFECT_JUMP_BOOST = 8,
+ E_EFFECT_NAUSEA = 9,
+ E_EFFECT_REGENERATION = 10,
+ E_EFFECT_RESISTANCE = 11,
+ E_EFFECT_FIRE_RESISTANCE = 12,
+ E_EFFECT_WATER_BREATHING = 13,
+ E_EFFECT_INVISIBILITY = 14,
+ E_EFFECT_BLINDNESS = 15,
+ E_EFFECT_NIGHT_VISION = 16,
+ E_EFFECT_HUNGER = 17,
+ E_EFFECT_WEAKNESS = 18,
+ E_EFFECT_POISON = 19,
+ E_EFFECT_WITHER = 20,
+ E_EFFECT_HEALTH_BOOST = 21,
+ E_EFFECT_ABSORPTION = 22,
+ E_EFFECT_SATURATION = 23,
+} ; \ No newline at end of file
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 20c4818b2..b2485a8e2 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -557,12 +557,12 @@ void cPlayer::FoodPoison(int a_NumTicks)
m_FoodPoisonedTicksRemaining = std::max(m_FoodPoisonedTicksRemaining, a_NumTicks);
if (!HasBeenFoodPoisoned)
{
- m_ClientHandle->SendRemoveEntityEffect(*this, 17);
+ m_ClientHandle->SendRemoveEntityEffect(*this, E_EFFECT_HUNGER);
SendHealth();
}
else
{
- m_ClientHandle->SendEntityEffect(*this, 17, 0, 20);
+ m_ClientHandle->SendEntityEffect(*this, E_EFFECT_HUNGER, 0, 20);
}
}
@@ -1710,7 +1710,7 @@ void cPlayer::HandleFood(void)
}
else
{
- m_ClientHandle->SendRemoveEntityEffect(*this, 17); // remove the "Hunger" effect.
+ m_ClientHandle->SendRemoveEntityEffect(*this, E_EFFECT_HUNGER); // remove the "Hunger" effect.
}
// Apply food exhaustion that has accumulated: