예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 private void SendDuelEnd(Duel duel)
 {
     //todo Send hp bar remove
 }