/// <summary> /// Will apply a new effect to this unit. The unit will manage it from here. /// </summary> protected void AddNewEffect(EffectOverTime a_effect) { _effects.Add(a_effect); if (!a_effect.IsPrepared) { a_effect.Prepare(_unit); } }
internal void ReplaceEffect(EffectOverTime a_previous, EffectOverTime a_new) { if (!a_new.IsPrepared) { a_new.Prepare(_unit, a_previous.CurrentStackCount); } a_new.timeElapsed = a_previous.timeElapsed; RemoveEffect(a_previous); AddNewEffect(a_new); }