コード例 #1
0
ファイル: Battleground.cs プロジェクト: uvbs/Asda2-Server
        protected internal override void InitMap()
        {
            base.InitMap();
            BattlegroundMgr.Instances.AddInstance(this.Template.Id, this);
            this._preparationSpell      = SpellHandler.Get(this.PreparationSpellId);
            this._healingReductionSpell = SpellHandler.Get(this.HealingReductionSpellId);
            if (this.HasQueue)
            {
                this._instanceQueue = new InstanceBattlegroundQueue(this);
                this._queueTimer.Start(0, Battleground.UpdateQueueMillis);
            }

            this._teams[0] = this.CreateAllianceTeam();
            this._teams[1] = this.CreateHordeTeam();
            this.ProcessPendingPlayers();
        }
コード例 #2
0
        protected internal override void InitMap()
        {
            base.InitMap();
            BattlegroundMgr.Instances.AddInstance(Template.Id, this);

            _preparationSpell      = SpellHandler.Get(PreparationSpellId);
            _healingReductionSpell = SpellHandler.Get(HealingReductionSpellId);

            if (HasQueue)
            {
                _instanceQueue = new InstanceBattlegroundQueue(this);
                _queueTimer.Start(0, UpdateQueueMillis);
            }

            _teams[(int)BattlegroundSide.Alliance] = CreateAllianceTeam();
            _teams[(int)BattlegroundSide.Horde]    = CreateHordeTeam();

            ProcessPendingPlayers();
        }
コード例 #3
0
        /// <summary>
        /// Starts to clean things up once the BG is over.
        /// Might be called right before the BG is disposed.
        /// </summary>
        protected void FinalizeBattleground(bool disposing)
        {
            EnsureContext();
            if (_shutdownTimer != null)
            {
                _shutdownTimer = null;

                OnFinish(disposing);
                if (_instanceQueue != null)
                {
                    _instanceQueue.Dispose();
                    _instanceQueue = null;
                }

                if (_parentQueue != null)
                {
                    _parentQueue.OnRemove(this);
                }
            }
        }
コード例 #4
0
ファイル: Battleground.cs プロジェクト: uvbs/Asda2-Server
        /// <summary>
        /// Starts to clean things up once the BG is over.
        /// Might be called right before the BG is disposed.
        /// </summary>
        protected void FinalizeBattleground(bool disposing)
        {
            this.EnsureContext();
            if (this._shutdownTimer == null)
            {
                return;
            }
            this._shutdownTimer = (TimerEntry)null;
            this.OnFinish(disposing);
            if (this._instanceQueue != null)
            {
                this._instanceQueue.Dispose();
                this._instanceQueue = (InstanceBattlegroundQueue)null;
            }

            if (this._parentQueue == null)
            {
                return;
            }
            this._parentQueue.OnRemove(this);
        }
コード例 #5
0
		public InstanceBGTeamQueue(InstanceBattlegroundQueue parentQueue, BattlegroundSide side)
			: base(parentQueue, side)
		{
		}
コード例 #6
0
ファイル: Battleground.cs プロジェクト: KroneckerX/WCell
		protected internal override void InitMap()
		{
			base.InitMap();
			BattlegroundMgr.Instances.AddInstance(Template.Id, this);

			_preparationSpell = SpellHandler.Get(PreparationSpellId);
			_healingReductionSpell = SpellHandler.Get(HealingReductionSpellId);

			if (HasQueue)
			{
				_instanceQueue = new InstanceBattlegroundQueue(this);
				_queueTimer.Start(0, UpdateQueueMillis);
			}

			_teams[(int)BattlegroundSide.Alliance] = CreateAllianceTeam();
			_teams[(int)BattlegroundSide.Horde] = CreateHordeTeam();

			ProcessPendingPlayers();
		}
コード例 #7
0
ファイル: Battleground.cs プロジェクト: KroneckerX/WCell
		/// <summary>
		/// Starts to clean things up once the BG is over.
		/// Might be called right before the BG is disposed.
		/// </summary>
		protected void FinalizeBattleground(bool disposing)
		{
			EnsureContext();
			if (_shutdownTimer != null)
			{
				_shutdownTimer = null;

				OnFinish(disposing);
				if (_instanceQueue != null)
				{
					_instanceQueue.Dispose();
					_instanceQueue = null;
				}

				if (_parentQueue != null)
				{
					_parentQueue.OnRemove(this);
				}
			}
		}
コード例 #8
0
ファイル: Battleground.cs プロジェクト: ray2006/WCell
		protected internal override void InitRegion()
		{
			base.InitRegion();
			BattlegroundMgr.GetInstances(Template.Id).Add(InstanceId, this);

			_preparationSpell = SpellHandler.Get(PreparationSpellId);

			if (HasQueue)
			{
				_instanceQueue = new InstanceBattlegroundQueue(this);
				_queueTimer.Start(0, UpdateQueueSeconds * 1000);
			}

			_teams[(int)BattlegroundSide.Alliance] = CreateAllianceTeam();
			_teams[(int)BattlegroundSide.Horde] = CreateHordeTeam();

			ProcessPendingPlayers();
		}
コード例 #9
0
 public InstanceBGTeamQueue(InstanceBattlegroundQueue parentQueue, BattlegroundSide side)
     : base(parentQueue, side)
 {
 }