summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffects.h
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-13 10:50:09 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:21 +0200
commit22761bb6ad4b121ae3b2319a9a2541a6bb8a982c (patch)
tree963f0f90cb29a2cbd4c201bcae06d3fb20965394 /src/Entities/EntityEffects.h
parentFixed MSVC compilation. (diff)
downloadcuberite-22761bb6ad4b121ae3b2319a9a2541a6bb8a982c.tar
cuberite-22761bb6ad4b121ae3b2319a9a2541a6bb8a982c.tar.gz
cuberite-22761bb6ad4b121ae3b2319a9a2541a6bb8a982c.tar.bz2
cuberite-22761bb6ad4b121ae3b2319a9a2541a6bb8a982c.tar.lz
cuberite-22761bb6ad4b121ae3b2319a9a2541a6bb8a982c.tar.xz
cuberite-22761bb6ad4b121ae3b2319a9a2541a6bb8a982c.tar.zst
cuberite-22761bb6ad4b121ae3b2319a9a2541a6bb8a982c.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/EntityEffects.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Entities/EntityEffects.h b/src/Entities/EntityEffects.h
index 26d2c92e5..6b2532aae 100644
--- a/src/Entities/EntityEffects.h
+++ b/src/Entities/EntityEffects.h
@@ -35,9 +35,12 @@ public:
effSaturation = 23,
} ;
- /** The duration of the effect */
+ /** How many ticks this effect has been active for */
int m_Ticks;
+ /** Returns the duration of the effect */
+ int GetDuration() { return m_Duration; }
+
/** Returns how strong the effect will be applied */
short GetIntensity() { return m_Intensity; }
@@ -47,6 +50,7 @@ public:
/** Returns the distance modifier for affecting potency */
double GetDistanceModifier() { return m_DistanceModifier; }
+ void SetDuration(int a_Duration) { m_Duration = a_Duration; }
void SetIntensity(short a_Intensity) { m_Intensity = a_Intensity; }
void SetUser(cPawn *a_User) { m_User = a_User; }
void SetDistanceModifier(double a_DistanceModifier) { m_DistanceModifier = a_DistanceModifier; }
@@ -58,14 +62,17 @@ public:
/**
* An entity effect
- * @param a_Ticks The duration of the effect
+ * @param a_Duration How long this effect will last
* @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, cPawn *a_User, double a_DistanceModifier = 1);
+ cEntityEffect(int a_Duration, short a_Intensity, cPawn *a_User, double a_DistanceModifier = 1);
private:
+ /** How long this effect will last */
+ int m_Duration;
+
/** How strong the effect will be applied */
short m_Intensity;