コード例 #1
0
 public void Remove(IBattleManager battleManager)
 {
     lock (Lock)
     {
         Battles.Remove(battleManager.BattleId);
     }
 }
コード例 #2
0
        /// <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.");
            }
        }
コード例 #3
0
ファイル: AutoPvP.cs プロジェクト: LordEnigma/UO
 public static bool RemoveBattle(PvPBattle battle)
 {
     return(battle != null && !battle.Deleted && Battles.ContainsKey(battle.Serial) && Battles.Remove(battle.Serial));
 }
コード例 #4
0
 public static bool RemoveBattle(PvPBattle battle)
 {
     return(battle != null && Battles.Remove(battle.Serial));
 }