public void StartDeadlineTimer() { if (DeadLineTimer != null) { DeadLineTimer.Stop(); } DeadLineTimer = Timer.DelayCall(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), CheckDeadLine); DeadLineTimer.Start(); }
public void EndDeadLineTimer() { if (DeadLineTimer != null) { DeadLineTimer.Stop(); DeadLineTimer = null; } if (Guardian != null && Guardian.Alive) // Failed { Guardian.Delete(); if (Summoner != null) { Summoner.SendLocalizedMessage(1151628); // You failed to defeat the champion in time. } NextSummon = DateTime.UtcNow; } }