Esempio n. 1
0
 /// <summary>Disbands the arena team</summary>
 /// <param name="update">if true, sends event to the team</param>
 public void Disband()
 {
     this.m_syncRoot.Enter();
     try
     {
         foreach (ArenaTeamMember member in this.Members.Values.ToArray <ArenaTeamMember>())
         {
             this.RemoveMember(member, false);
         }
         ArenaMgr.UnregisterArenaTeam(this);
         ServerApp <WCell.RealmServer.RealmServer> .IOQueue.AddMessage((Action)(() => this.Delete()));
     }
     finally
     {
         this.m_syncRoot.Exit();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Disbands the arena team
        /// </summary>
        /// <param name="update">if true, sends event to the team</param>
        public void Disband()
        {
            m_syncRoot.Enter();
            try
            {
                //ArenaTeamHandler.SendEventToTeam(this, ArenaTeamEvents.DISBANDED_S);

                var members = Members.Values.ToArray();

                foreach (var member in members)
                {
                    RemoveMember(member, false);
                }

                ArenaMgr.UnregisterArenaTeam(this);
                RealmServer.IOQueue.AddMessage(() => Delete());
            }
            finally
            {
                m_syncRoot.Exit();
            }
        }