*Move target selection check for Death Coil to Spell::CheckCast - by Astellar

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-14 13:26:28 +02:00
parent e18b7ad4a6
commit 2f5befd26a
2 changed files with 6 additions and 3 deletions
+6
View File
@@ -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();
-3
View File
@@ -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);
}