Beispiel #1
0
 protected override void Dispose()
 {
     base.Dispose();
     foreach (BattlegroundTeam team in this._teams)
     {
         team.Dispose();
     }
     this._parentQueue = (GlobalBattlegroundQueue)null;
 }
Beispiel #2
0
        protected override void Dispose()
        {
            base.Dispose();

            foreach (var team in _teams)
            {
                team.Dispose();
            }

            _parentQueue = null;
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bm"></param>
        /// <param name="chr"></param>
        public static void TalkToBattlemaster(this NPC bm, Character chr)
        {
            chr.OnInteract(bm);

            BattlegroundTemplate templ = bm.Entry.BattlegroundTemplate;

            if (templ != null)
            {
                GlobalBattlegroundQueue queue = templ.GetQueue(chr.Level);
                if (queue != null)
                {
                    BattlegroundHandler.SendBattlefieldList(chr, queue);
                }
            }
        }
Beispiel #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bm"></param>
        /// <param name="chr"></param>
        public static void TalkToBattlemaster(this NPC bm, Character chr)
        {
            chr.OnInteract((WorldObject)bm);
            BattlegroundTemplate battlegroundTemplate = bm.Entry.BattlegroundTemplate;

            if (battlegroundTemplate == null)
            {
                return;
            }
            GlobalBattlegroundQueue queue = battlegroundTemplate.GetQueue(chr.Level);

            if (queue == null)
            {
                return;
            }
            BattlegroundHandler.SendBattlefieldList(chr, queue);
        }
 /// <summary>
 /// Tries to enqueue the given character or his whole group for the given battleground.
 /// </summary>
 /// <param name="chr">the character who enqueued</param>
 /// <param name="asGroup">whether or not to enqueue the character or his/her group</param>
 public void TryEnqueue(Character chr, bool asGroup, uint instanceId, BattlegroundSide side)
 {
     if (instanceId != 0U)
     {
         GlobalBattlegroundQueue queue = this.GetQueue(chr);
         if (queue == null)
         {
             return;
         }
         Battleground battleground = queue.GetBattleground(instanceId);
         if (battleground == null || !battleground.HasQueue)
         {
             return;
         }
         battleground.TryJoin(chr, asGroup, side);
     }
     else
     {
         this.GetQueue(chr).GetTeamQueue(side).Enqueue(chr, asGroup);
     }
 }
 public GlobalBGTeamQueue(GlobalBattlegroundQueue parentQueue, BattlegroundSide side)
     : base(parentQueue, side)
 {
 }
 private void AddQueue(GlobalBattlegroundQueue queue)
 {
     this.Queues[queue.BracketId] = queue;
 }
 void AddQueue(GlobalBattlegroundQueue queue)
 {
     Queues[queue.BracketId] = queue;
 }