diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp index d23762ab..6e6861c7 100644 --- a/src/game/WorldHandlers/Spell.cpp +++ b/src/game/WorldHandlers/Spell.cpp @@ -2599,11 +2599,8 @@ void Spell::prepare(SpellCastTargets const* targets, Aura* triggeredByAura) m_caster->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH); } - // execute triggered without cast time explicitly in call point - if (!m_timer) - cast(true); // add non-triggered (with cast time and without) - else if (!m_IsTriggeredSpell) + if (!m_IsTriggeredSpell) { // add to cast type slot m_caster->SetCurrentCastedSpell(this); @@ -2614,6 +2611,9 @@ void Spell::prepare(SpellCastTargets const* targets, Aura* triggeredByAura) TriggerGlobalCooldown(); } + // execute triggered without cast time explicitly in call point + if (m_timer == 0) + cast(true); // else triggered with cast time will execute execute at next tick or later // without adding to cast type slot // will not show cast bar but will show effects at casting time etc diff --git a/src/game/WorldHandlers/SpellEffects.cpp b/src/game/WorldHandlers/SpellEffects.cpp index 89637006..d993658e 100644 --- a/src/game/WorldHandlers/SpellEffects.cpp +++ b/src/game/WorldHandlers/SpellEffects.cpp @@ -2440,8 +2440,10 @@ void Spell::EffectDistract(SpellEffectIndex /*eff_idx*/) if (unitTarget->hasUnitState(UNIT_STAT_CAN_NOT_REACT)) { return; } - unitTarget->SetFacingTo(unitTarget->GetAngle(m_targets.m_destX, m_targets.m_destY)); + float angle = unitTarget->GetAngle(m_targets.m_destX, m_targets.m_destY); + unitTarget->SetFacingTo(angle); unitTarget->clearUnitState(UNIT_STAT_MOVING); + unitTarget->SetOrientation(angle); if (unitTarget->GetTypeId() == TYPEID_UNIT) { unitTarget->GetMotionMaster()->MoveDistract(damage * IN_MILLISECONDS); } @@ -3840,10 +3842,10 @@ void Spell::EffectSanctuary(SpellEffectIndex /*eff_idx*/) // Improved Sap: a hacky way if (m_triggeredByAuraSpell && m_spellInfo->Id == 14093 && unitTarget->GetTypeId() == TYPEID_PLAYER) { - // find Stealth spell cooldown + // find highest rank Stealth spell cooldown uint32 stealth_id = 0; SpellCooldowns const scm = ((Player*)unitTarget)->GetSpellCooldownMap(); - for (SpellCooldowns::const_iterator it = scm.begin(); it != scm.end(); ++it) + for (SpellCooldowns::const_reverse_iterator it = scm.rbegin(); it != scm.rend(); ++it) { if (it->first >= 1784 && it->first <= 1787) {