/// <summary> /// Permanent status. /// </summary> /// <param name="id"></param> /// <param name="type"></param> /// <param name="source"></param> /// <param name="target"></param> /// <param name="level"></param> /// <param name="duration"></param> /// <param name="stacking"></param> /// <param name="periodic"></param> private Status(int id, TimedType type, NoxUnit source, NoxUnit target, int level, int initialStacks, int stacksLim, float duration, float periodicTimeout, bool stacking, bool periodic, bool permanent = false) { //if(type.DataType != null) //Data = Activator.CreateInstance(type.DataType); Id = id; Type = type; Source = source; Target = target; Level = level; Stacking = stacking; Periodic = periodic; //Permanent = permanent; PeriodicTimeout = periodicTimeout; StacksLim = stacksLim; Duration = duration; t = CreateTimer(); if (periodic) { PeriodicTicks = 0; TimeRemain = duration; TimerStart(t, PeriodicTimeout, false, PeriodicTimerRestart); } else { TimerStart(t, duration, false, Remove); } if (stacking) { Stacks = initialStacks; } if (Type.Apply != null) { Type.Apply.Invoke(this); } if (Type.Effectpath != null && Type.Attachment != null) { SpecialEffect = AddSpecialEffectTarget(Type.Effectpath, target._Self, Type.Attachment); } }
/// <summary> /// Periodic Timed Status /// </summary> internal Status(int id, TimedType type, NoxUnit source, NoxUnit target, int level, float duration, float periodicTimeout) : this(id, type, source, target, level, 0, 0, duration, periodicTimeout, false, true) { }
/// <summary> /// Periodic Timed Stacking Status /// </summary> internal Status(int id, TimedType type, NoxUnit source, NoxUnit target, int level, float duration, float peridoticTimeout, int initialStacks, int stacksLim) : this(id, type, source, target, level, initialStacks, stacksLim, duration, peridoticTimeout, false, true) { }
///// <summary> ///// Permanent Status ///// </summary> //internal Status(int id, StatusType type, NoxUnit source, NoxUnit target, int level) // : this(id, type, source, target, level, 0, 0, 0, 0, false, false, true) { } ///// <summary> ///// Permanent Stacking ///// </summary> //internal Status(int id, StatusType type, NoxUnit source, NoxUnit target, int level, int initialStacks, int stacksLim) // : this(id, type, source, target, level, initialStacks, stacksLim, 0, 0, true, false, true) { } ///// <summary> ///// Permanent Periodic ///// </summary> ///// <param name="id"></param> ///// <param name="type"></param> ///// <param name="source"></param> ///// <param name="target"></param> ///// <param name="level"></param> //internal Status(int id, StatusType type, NoxUnit source, NoxUnit target, int level) // : this(id, type, source, target, level, 0, 0, 0, 0, false, true, true) { } /// <summary> /// Timed Status /// </summary> internal Status(int id, TimedType type, NoxUnit source, NoxUnit target, int level, float duration) : this(id, type, source, target, level, 0, 0, duration, 0, false, false) { }