Core/Spells: remove holy shock and death coil (dk) from checkcast and add them to the checkcast of the spell script. also check if unit is in front for damage spell of death coil (dk) Closes #6027

This commit is contained in:
Kandera
2012-05-18 11:44:38 -04:00
parent 9e6a5593bd
commit 7688c7609f
3 changed files with 31 additions and 17 deletions
+2 -15
View File
@@ -3427,7 +3427,7 @@ void Spell::_handle_immediate_phase()
// process items
for (std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
DoAllEffectOnTarget(&(*ihit));
if (!m_originalCaster)
return;
// Handle procs on cast
@@ -3437,7 +3437,7 @@ void Spell::_handle_immediate_phase()
uint32 procAttacker = m_procAttacker;
if (!procAttacker)
procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS;
// Proc the spells that have DEST target
m_originalCaster->ProcDamageAndSpell(NULL, procAttacker, 0, m_procEx | PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell);
}
@@ -4991,19 +4991,6 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_caster->IsInWater())
return SPELL_FAILED_ONLY_ABOVEWATER;
}
else if (m_spellInfo->SpellIconID == 156) // Holy Shock
{
// spell different for friends and enemies
// hurt version required facing
if (m_targets.GetUnitTarget() && !m_caster->IsFriendlyTo(m_targets.GetUnitTarget()) && !m_caster->HasInArc(static_cast<float>(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();