public void Remove(IBattleManager battleManager) { lock (Lock) { Battles.Remove(battleManager.BattleId); } }
/// <summary> /// Stops this instance. /// </summary> internal void Stop() { if (!this.Stopped) { this.Stopped = true; if (this.Started) { this.Timer.Stop(); foreach (LogicClientAvatar avatar in this.Avatars) { new BattleResultMessage(avatar.Connection).Send(); } Battles.Remove(this); } else { Debugger.Error("Battle hadn't started when Stop() was called"); } } else { Debugger.Error("Battle already stopped when Stop() was called."); } }
public static bool RemoveBattle(PvPBattle battle) { return(battle != null && !battle.Deleted && Battles.ContainsKey(battle.Serial) && Battles.Remove(battle.Serial)); }
public static bool RemoveBattle(PvPBattle battle) { return(battle != null && Battles.Remove(battle.Serial)); }