summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffects.h
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-07 08:05:29 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:19 +0200
commita9a4c9c6b25438aaebdeef03c323e9aa4a0348c2 (patch)
treeac30c249763e1b1c62dbfda585c62ecb56212adb /src/Entities/EntityEffects.h
parentPlayer: Removed food-poisoning-specific code, set duration to 30 seconds (diff)
downloadcuberite-a9a4c9c6b25438aaebdeef03c323e9aa4a0348c2.tar
cuberite-a9a4c9c6b25438aaebdeef03c323e9aa4a0348c2.tar.gz
cuberite-a9a4c9c6b25438aaebdeef03c323e9aa4a0348c2.tar.bz2
cuberite-a9a4c9c6b25438aaebdeef03c323e9aa4a0348c2.tar.lz
cuberite-a9a4c9c6b25438aaebdeef03c323e9aa4a0348c2.tar.xz
cuberite-a9a4c9c6b25438aaebdeef03c323e9aa4a0348c2.tar.zst
cuberite-a9a4c9c6b25438aaebdeef03c323e9aa4a0348c2.zip
Diffstat (limited to 'src/Entities/EntityEffects.h')
-rw-r--r--src/Entities/EntityEffects.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/Entities/EntityEffects.h b/src/Entities/EntityEffects.h
index 6ddd86b01..2bda2e104 100644
--- a/src/Entities/EntityEffects.h
+++ b/src/Entities/EntityEffects.h
@@ -1,5 +1,7 @@
#pragma once
+class cPawn;
+
// tolua_begin
class cEntityEffect {
public:
@@ -35,8 +37,14 @@ public:
/** The duration of the effect */
int m_Ticks;
- /** How strong the effect will be applied */
- short m_Intensity;
+ /** Returns how strong the effect will be applied */
+ short GetIntensity() { return m_Intensity; }
+
+ /** Returns the pawn that used this entity effect */
+ cPawn *GetUser() { return m_User; }
+
+ /** Returns the distance modifier for affecting potency */
+ double GetDistanceModifier() { return m_DistanceModifier; }
/**
* An empty entity effect
@@ -45,9 +53,21 @@ public:
/**
* An entity effect
- * @param a_Ticks The duration of the effect
- * @param a_Intensity How strong the effect will be applied
+ * @param a_Ticks The duration of the effect
+ * @param a_Intensity How strong the effect will be applied
+ * @param a_User The pawn that used this entity effect
+ * @param a_DistanceModifier The distance modifier for affecting potency, defaults to 1
*/
- cEntityEffect(int a_Ticks, short a_Intensity);
+ cEntityEffect(int a_Ticks, short a_Intensity, cPawn *a_User, double a_DistanceModifier = 1);
+
+private:
+ /** How strong the effect will be applied */
+ short m_Intensity;
+
+ /** The pawn that used this entity effect */
+ cPawn *m_User;
+
+ /** The distance modifier for affecting potency */
+ double m_DistanceModifier;
};
// tolua_end