[10453] Fix disease consume part of 49020 and ranks

This commit is contained in:
Laise 2010-09-08 10:47:05 +03:00
parent 812383ac8c
commit 0cb6f7be0c
5 changed files with 22 additions and 4 deletions

View file

@ -2546,6 +2546,21 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, true);
return;
}
// Obliterate
else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0002000000000000))
{
// search for Annihilation
Unit::AuraList const& dummyList = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
for (Unit::AuraList::const_iterator itr = dummyList.begin(); itr != dummyList.end(); ++itr)
{
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && (*itr)->GetSpellProto()->SpellIconID == 2710)
if (roll_chance_i((*itr)->GetModifier()->m_amount)) // don't consume if found
return;
}
// consume diseases
unitTarget->RemoveAurasWithDispelType(DISPEL_DISEASE, m_caster->GetGUID());
}
break;
}
}