예제 #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));
 }