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(); }
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(); }
/// <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); } } }
/// <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); }
public InstanceBGTeamQueue(InstanceBattlegroundQueue parentQueue, BattlegroundSide side) : base(parentQueue, side) { }
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(); }