Exemplo n.º 1
0
 public void Start()
 {
     if (!this.m_started)
     {
         this.m_started = true;
         if (this.m_fighters.Count <= 0)
         {
             this.NotifySuccess();
         }
         else
         {
             foreach (CharacterFighter current in this.m_fighters)
             {
                 ContextHandler.SendGameFightTurnReadyRequestMessage(current.Character.Client, this.m_fight.TimeLine.Current);
             }
             this.m_timer = this.m_fight.Map.Area.CallDelayed(ReadyChecker.CheckTimeout, new Action(this.TimedOut));
         }
     }
 }
Exemplo n.º 2
0
        public void Start()
        {
            if (m_started)
            {
                return;
            }

            m_started = true;

            if (m_fighters.Count <= 0)
            {
                m_timer = m_fight.Map.Area.CallDelayed(0, NotifySuccess);
                return;
            }

            foreach (var fighter in m_fighters)
            {
                ContextHandler.SendGameFightTurnReadyRequestMessage(fighter.Character.Client, m_fight.TimeLine.Current);
            }

            m_timer = m_fight.Map.Area.CallDelayed(Math.Max(0, (int)(m_fight.LastSequenceEndTime - DateTime.Now).TotalMilliseconds) + CheckTimeout, TimedOut);
        }