fix(core): Fixes a timer bug where Stop wasn't called internally (#664)

This commit is contained in:
Kamron Batman 2021-07-25 23:30:11 -07:00 • committed by GitHub
parent 26592f202e
commit 06a577332d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 71 additions and 50 deletions

View file

@ -1615,8 +1615,6 @@ namespace Server.Engines.ConPVP
private Timer m_FinishTimer;
private TimerCallback m_UnhideCallback;
public BRGame(BRController controller, DuelContext context) : base(context) => Controller = controller;
public BRController Controller { get; }
@ -1641,10 +1639,9 @@ namespace Server.Engines.ConPVP
{
if (m_Bomb != null && Controller != null)
{
m_UnhideCallback ??= UnhideBomb;
m_Bomb.Visible = false;
m_Bomb.MoveToWorld(Controller.BombHome, Controller.Map);
Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 15)), m_UnhideCallback);
Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 15)), UnhideBomb);
}
}