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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user