Пример #1
0
        public AttackOption GetBattleInfo(string hostName)
        {
            AttackOption option;

            RunningBattles.TryGetValue(hostName, out option);
            return(option);
        }
Пример #2
0
        public void RemoveFromRunningBattles(string autohostName)
        {
            RunningBattles.Remove(autohostName);

            // move spectators out from battle
            var pwSpec = FindPwSpecHost();

            var bat = tas.ExistingBattles.Values.FirstOrDefault(x => x.Founder.Name == autohostName);

            if (bat != null && tas.ExistingBattles.Values.Any(x => x.Founder.Name == pwSpec))
            {
                foreach (var b in bat.Users.Where(x => x.Name != autohostName))
                {
                    tas.ForceJoinBattle(b.Name, pwSpec);
                }
            }
        }
Пример #3
0
 public void RemoveFromRunningBattles(int battleID)
 {
     RunningBattles.Remove(battleID);
 }