fix by H0zen moved back to its original location

The condition statement has been moved back to its original location.

<runs away>
This commit is contained in:
Charles A Edwards 2016-01-21 15:51:20 +00:00
parent 603e4a7dc5
commit 1ef8fddde7

View File

@ -4242,11 +4242,6 @@ SpellCastResult Spell::CheckCast(bool strict)
{ {
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->IsInWorld()) if (m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->IsInWorld())
{ {
// Arcane Missile self cast forbidden
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000800))
{ return SPELL_FAILED_BAD_TARGETS; }
// Additional check for some spells // Additional check for some spells
// If 0 spell effect empty - client not send target data (need use selection) // If 0 spell effect empty - client not send target data (need use selection)
// TODO: check it on next client version // TODO: check it on next client version
@ -4257,6 +4252,12 @@ SpellCastResult Spell::CheckCast(bool strict)
if (!target) if (!target)
{ return SPELL_FAILED_BAD_TARGETS; } { return SPELL_FAILED_BAD_TARGETS; }
// Arcane Missile self cast forbidden
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000800) &&
m_caster == target)
{ return SPELL_FAILED_BAD_TARGETS; }
m_targets.setUnitTarget(target); m_targets.setUnitTarget(target);
} }
} }