Core/Spells: Do not proc spells with PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_(NEG|POS) if there is no target, reimplemented Storm, Earth and Fire talent in another way

Closes #3367
Closes #2424

If you find more spells that are broken because of this, please notify us
Signed-off-by: Subv <[email protected]>
This commit is contained in:
Subv
2012-04-14 20:08:16 -05:00
parent 8a33ddc010
commit 3d8aaabaf3
4 changed files with 20 additions and 44 deletions
-30
View File
@@ -3427,36 +3427,6 @@ 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
// TODO: finish new proc system:P
if (m_UniqueTargetInfo.empty())
{
uint32 procAttacker = m_procAttacker;
if (!procAttacker)
{
bool positive = m_spellInfo->IsPositive();
switch (m_spellInfo->DmgClass)
{
case SPELL_DAMAGE_CLASS_MAGIC:
if (positive)
procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS;
else
procAttacker |= PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG;
break;
case SPELL_DAMAGE_CLASS_NONE:
if (positive)
procAttacker |= PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS;
else
procAttacker |= PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG;
break;
}
}
// Proc damage for spells which have only dest targets (2484 should proc 51486 for example)
m_originalCaster->ProcDamageAndSpell(NULL, procAttacker, 0, m_procEx | PROC_EX_NORMAL_HIT, 0, BASE_ATTACK, m_spellInfo, m_triggeredByAuraSpell);
}
}
void Spell::_handle_finish_phase()