/// <summary> /// Initializes a timer to track the status effect. /// </summary> /// <param name="buffKeySpell">The spell that causes the status effect.</param> public NpcDebuffActivity(BuffKeySpell buffKeySpell) { if (buffKeySpell == null) { _duration = int.MaxValue; _timeLastCast = DateTime.MaxValue; return; } _duration = buffKeySpell.Duration + 1; _timeLastCast = DateTime.Now.AddSeconds(-_duration); }
/// <summary> /// Initializes a timer to track the status effect. /// </summary> /// <param name="buffKeySpell">The spell that causes the status effect.</param> public NpcDebuffActivity(BuffKeySpell buffKeySpell) { if (buffKeySpell == null) { _duration = int.MaxValue; _timeLastCast = DateTime.MaxValue; return; } _duration = buffKeySpell.Duration + 1; OverrideTimer(); }
protected BuffKeySpell GetBuffKeySpellByPriority(BuffKeySpell buffKeySpell) { var priorityList = new[] { buffKeySpell }; return(GetBuffKeySpellByPriority(priorityList)); }