private async void StartCondition(Duel duel) { new SpDuelCounter().Send(duel.Initiator); new SpDuelCounter().Send(duel.Initiated); await Task.Delay(5000); duel.LastKickUtc = Funcs.GetCurrentMilliseconds(); Communication.Global.RelationService.ResendRelation(duel.Initiator); Communication.Global.RelationService.ResendRelation(duel.Initiated); lock (DuelsLock) Duels.Add(duel); }
public void StartDuel(Player initiator, Player initiated, Request request) { if(initiator.Duel != null || initiated.Duel != null) return; Duel d = new Duel { Initiator = initiator, Initiated = initiated, Request = request }; initiator.Duel = d; initiated.Duel = d; StartCondition(d); }
private void StartCondition(Duel duel) { new SpDuelCounter().Send(duel.Initiator); new SpDuelCounter().Send(duel.Initiated); System.Threading.Thread.Sleep(5000); duel.LastKickUtc = Funcs.GetCurrentMilliseconds(); Communication.Global.RelationService.ResendRelation(duel.Initiator); Communication.Global.RelationService.ResendRelation(duel.Initiated); lock (DuelsLock) Duels.Add(duel); }
private void SendDuelEnd(Duel duel) { //todo Send hp bar remove }