*Move target selection check for Death Coil to Spell::CheckCast - by Astellar
--HG-- branch : trunk
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -1905,9 +1905,6 @@ void Spell::EffectDummy(uint32 i)
|
||||
{
|
||||
if(m_caster->IsFriendlyTo(unitTarget))
|
||||
{
|
||||
if(unitTarget->GetCreatureType() != CREATURE_TYPE_UNDEAD)
|
||||
return;
|
||||
|
||||
int32 bp = damage * 1.5f;
|
||||
m_caster->CastCustomSpell(unitTarget, 47633, &bp, NULL, NULL, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user