summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffect.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/EntityEffect.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/Entities/EntityEffect.h b/src/Entities/EntityEffect.h
index ebd611ff0..f9c1e4eb2 100644
--- a/src/Entities/EntityEffect.h
+++ b/src/Entities/EntityEffect.h
@@ -36,6 +36,24 @@ public:
effSaturation = 23,
} ;
+ /** Returns the potion color (used by the client for visuals), based on the potion's damage value */
+ static int GetPotionColor(short a_ItemDamage);
+
+
+ /** Translates the potion's damage value into the entity effect that the potion gives */
+ static cEntityEffect::eType GetPotionEffectType(short a_ItemDamage);
+
+
+ /** Retrieves the intensity level from the potion's damage value. Returns 0 for level I potions, 1 for level II potions. */
+ static short GetPotionEffectIntensity(short a_ItemDamage);
+
+
+ /** Returns the effect duration, in ticks, based on the potion's damage value */
+ static int GetPotionEffectDuration(short a_ItemDamage);
+
+ /** Returns true if the potion with the given damage is drinkable */
+ static bool IsPotionDrinkable(short a_ItemDamage);
+
// tolua_end
/** Creates an empty entity effect */
@@ -55,7 +73,7 @@ public:
@param a_OtherEffect The other effect to copy */
cEntityEffect & operator=(cEntityEffect a_OtherEffect);
- virtual ~cEntityEffect(void) {};
+ virtual ~cEntityEffect(void) {}
/** Creates a pointer to the proper entity effect from the effect type
@warning This function creates raw pointers that must be manually managed.