*Move target selection check for Death Coil to Spell::CheckCast - by Astellar
--HG-- branch : trunk
This commit is contained in:
1 parent
e18b7ad4a6
commit
2f5befd26a
2 files changed
+6
-3
No files matched your search
@@ -4658,6 +4658,12 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if(m_targets.getUnitTarget() && !m_caster->IsFriendlyTo(m_targets.getUnitTarget()) && !m_caster->HasInArc( M_PI, m_targets.getUnitTarget() ))
|
||||
return SPELL_FAILED_UNIT_NOT_INFRONT;
|
||||
}
|
||||
else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] == 0x2000) // Death Coil (DeathKnight)
|
||||
{
|
||||
Unit* target = m_targets.getUnitTarget();
|
||||
if (!target || (target->IsFriendlyTo(m_caster) && target->GetCreatureType() != CREATURE_TYPE_UNDEAD))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
}
|
||||
else if (m_spellInfo->Id == 19938) // Awaken Peon
|
||||
{
|
||||
Unit *unit = m_targets.getUnitTarget();
|
||||
|
||||
Reference in new issue
Block a user