Beispiel #1
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);
        }
Beispiel #2
0
        private async void StartCondition(Duel duel)
        {
            new SpDuelCounter().Send(duel.Initiator);
            new SpDuelCounter().Send(duel.Initiated);

            await Task.Delay(5000);

            duel.LastKickUtc = RandomUtilities.GetCurrentMilliseconds();

            Communication.Global.RelationService.ResendRelation(duel.Initiator);
            Communication.Global.RelationService.ResendRelation(duel.Initiated);

            lock (DuelsLock)
                Duels.Add(duel);
        }
Beispiel #3
0
 private void SendDuelEnd(Duel duel)
 {
     //todo Send hp bar remove
 }