summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffect.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/EntityEffect.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Entities/EntityEffect.h b/src/Entities/EntityEffect.h
index aa18b500e..dd126c20d 100644
--- a/src/Entities/EntityEffect.h
+++ b/src/Entities/EntityEffect.h
@@ -81,7 +81,7 @@ public:
@param a_Duration How long this effect will last, in ticks
@param a_Intensity How strong the effect will be applied
@param a_DistanceModifier The distance modifier for affecting potency, defaults to 1 */
- static cEntityEffect * CreateEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier);
+ static std::unique_ptr<cEntityEffect> CreateEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier);
/** Returns how many ticks this effect has been active for */
int GetTicks(void) const { return m_Ticks; }
@@ -346,6 +346,12 @@ public:
super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
+
+ virtual void OnActivate (cPawn & a_Target) override { BroadcastMetadata(a_Target); }
+ virtual void OnDeactivate(cPawn & a_Target) override { BroadcastMetadata(a_Target); }
+
+private:
+ static void BroadcastMetadata(cPawn & a_Target);
};