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); } } }
public void RemoveFromRunningBattles(int battleID) { RunningBattles.Remove(battleID); }