/// <summary> /// Call to interrupt the capturing process and begin a new capturing process /// </summary> public void ChangeCapture(Character chr) { Capturer = chr; CaptureTimer.Stop(); StartScoreTimer.Stop(); CaptureTimer.Start(CapturePointConversionDelayMillis, 0); if (chr.Battlegrounds.Team.Side == BattlegroundSide.Alliance) { State = BaseState.ContestedAlliance; Instance.WorldStates.SetInt32(showIconAllianceContested, 1); Instance.WorldStates.SetInt32(showIconHordeContested, 0); } else { State = BaseState.ContestedHorde; Instance.WorldStates.SetInt32(showIconHordeContested, 1); Instance.WorldStates.SetInt32(showIconAllianceContested, 0); } foreach (Character character in Instance.Characters) { character.SendSystemMessage(DefaultAddonLocalizer.Instance.Translate(character.Locale, AddonMsgKey.ABBaseAssaulted, chr.Name, Names[(int)character.Locale])); } SpawnContested(); }
void StopDecayTimer() { if (m_decayTimer != null) { m_decayTimer.Stop(); m_decayTimer = null; } }
private void StopDecayTimer() { if (m_decayTimer == null) { return; } m_decayTimer.Stop(); m_decayTimer = null; }
public virtual void CancelShutdown() { if (IsPreparingShutdown) { ioQueue.UnregisterUpdatable(m_shutdownTimer); m_shutdownTimer.Stop(); IsPreparingShutdown = false; } }
/// <summary> /// Will be called internally to close this Channel. /// Call SpellCast.Cancel to cancel channeling. /// </summary> internal void Close(bool cancelled) { if (!m_channeling) { return; } m_channeling = false; var caster = m_cast.CasterUnit; var handlers = m_channelHandlers; foreach (var handler in handlers) { handler.OnChannelClose(cancelled); } var auras = m_auras; if (auras != null) { foreach (var aura in auras) { aura.Remove(false); } auras.Clear(); SpellCast.AuraListPool.Recycle(auras); m_auras = null; } m_channelHandlers.Clear(); SpellCast.SpellEffectHandlerListPool.Recycle(m_channelHandlers); m_channelHandlers = null; m_timer.Stop(); if (cancelled) { SpellHandler.SendChannelUpdate(m_cast, 0); } var obj = caster.ChannelObject; if (obj is DynamicObject) { ((WorldObject)obj).Delete(); } caster.ChannelObject = null; caster.ChannelSpell = 0; }
/// <summary> /// Call to interrupt the capturing process /// </summary> /// <param name="chr">The interrupting character</param> public void InterruptCapture(Character chr) { Capturer = null; var stats = (ArathiStats)chr.Battlegrounds.Stats; stats.BasesDefended++; CaptureTimer.Stop(); if (BaseOwner == BattlegroundSide.Horde) { SpawnHorde(); State = BaseState.CapturedHorde; Instance.WorldStates.SetInt32(showIconHordeControlled, 1); Instance.WorldStates.SetInt32(showIconAllianceContested, 0); } else { SpawnAlliance(); State = BaseState.CapturedAlliance; Instance.WorldStates.SetInt32(showIconAllianceControlled, 1); Instance.WorldStates.SetInt32(showIconHordeContested, 0); } foreach (Character character in Instance.Characters) { character.SendSystemMessage(DefaultAddonLocalizer.Instance.Translate(character.Locale, AddonMsgKey.ABBaseDefended, chr.Name, Names[(int)character.Locale])); } var evt = CaptureInterrupted; if (evt != null) { evt(chr); } }
protected override void OnEnter(Character chr) { base.OnEnter(chr); if (m_timeoutTimer.IsRunning) { m_timeoutTimer.Stop(); s_log.Debug("{0} #{1} timeout timer stopped by: {2}", Name, m_InstanceId, chr.Name); } if (chr.GodMode || Difficulty.BindingType != BindingType.Soft) { return; } Bind(chr); }
protected override void OnEnter(Character chr) { base.OnEnter(chr); // stop timeout timer if (m_timeoutTimer.IsRunning) { m_timeoutTimer.Stop(); s_log.Debug("{0} #{1} timeout timer stopped by: {2}", Name, m_InstanceId, chr.Name); } // Bind to dungeon if (!chr.GodMode && Difficulty.BindingType == BindingType.Soft) { Bind(chr); } }
/// <summary> /// Will be called internally to close this Channel. /// Call SpellCast.Cancel to cancel channeling. /// </summary> internal void Close(bool cancelled) { if (!m_channeling) { return; } m_channeling = false; Unit casterUnit = m_cast.CasterUnit; foreach (SpellEffectHandler channelHandler in m_channelHandlers) { channelHandler.OnChannelClose(cancelled); } List <IAura> auras = m_auras; if (auras != null) { foreach (IAura aura in auras) { aura.Remove(false); } auras.Clear(); SpellCast.AuraListPool.Recycle(auras); m_auras = null; } m_channelHandlers.Clear(); SpellCast.SpellEffectHandlerListPool.Recycle(m_channelHandlers); m_channelHandlers = null; m_timer.Stop(); if (cancelled) { SpellHandler.SendChannelUpdate(m_cast, 0U); } WorldObject channelObject = casterUnit.ChannelObject; if (channelObject is DynamicObject) { channelObject.Delete(); } casterUnit.ChannelObject = null; casterUnit.ChannelSpell = SpellId.None; }
protected bool Stop() { _accountsReloadTimer.Stop(); RealmServer.IOQueue.UnregisterUpdatable(_accountsReloadTimer); return(true); }
/// <summary>Stops the Respawn timer, if it was running</summary> public void StopTimer() { m_timer.Stop(); Map.UnregisterUpdatableLater(m_timer); }
public override void FinishFight() { timerUpdate.Stop(); base.FinishFight(); }