aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 1759f8bae08..97dfc8bd188 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -528,7 +528,7 @@ m_caster(Caster), m_spellValue(new SpellValue(m_spellInfo))
// Determine if spell can be reflected back to the caster
// Patch 1.2 notes: Spell Reflection no longer reflects abilities
- m_canReflect = m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC && !(m_spellInfo->Attributes & SPELL_ATTR0_ABILITY)
+ m_canReflect = m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC && !(m_spellInfo->Attributes & SPELL_ATTR0_ABILITY)
&& !(m_spellInfo->AttributesEx & SPELL_ATTR1_CANT_BE_REFLECTED) && !(m_spellInfo->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)
&& !IsPassiveSpell(m_spellInfo) && !IsPositiveSpell(m_spellInfo->Id);
@@ -2944,6 +2944,12 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
m_caster->SetCurrentCastedSpell(this);
SendSpellStart();
+ // set target for proper facing
+ if (m_casttime && !m_IsTriggeredSpell)
+ if (uint64 target = m_targets.GetUnitTargetGUID())
+ if (m_caster->GetGUID() != target && m_caster->GetTypeId() == TYPEID_UNIT)
+ m_caster->FocusTarget(this, target);
+
TriggerGlobalCooldown();
//item: first cast may destroy item and second cast causes crash
@@ -3578,6 +3584,9 @@ void Spell::finish(bool ok)
((Puppet*)charm)->UnSummon();
}
+ if (m_caster->GetTypeId() == TYPEID_UNIT)
+ m_caster->ReleaseFocus(this);
+
if (!ok)
return;