[9667] Implement 57849 and ranks.

Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
laise 2010-04-03 16:14:54 +02:00 committed by hunuza
parent 4e81b6c98b
commit 56e1e48161
2 changed files with 41 additions and 1 deletions

View file

@ -9073,6 +9073,27 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
}
break;
}
case SPELLFAMILY_DRUID:
{
// Improved Insect Swarm (Wrath part)
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000001))
{
// if Insect Swarm on target
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, UI64LIT(0x000000000200000), 0, GetGUID()))
{
Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
{
if ((*iter)->GetSpellProto()->SpellIconID == 1771)
{
DoneTotalMod *= ((*iter)->GetModifier()->m_amount+100.0f) / 100.0f;
break;
}
}
}
}
break;
}
case SPELLFAMILY_DEATHKNIGHT:
{
// Icy Touch, Howling Blast and Frost Strike
@ -9374,6 +9395,25 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
}
}
break;
case SPELLFAMILY_DRUID:
// Improved Insect Swarm (Starfire part)
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000004))
{
// search for Moonfire on target
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, UI64LIT(0x000000000000002), 0, GetGUID()))
{
Unit::AuraList const& improvedSwarm = GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator iter = improvedSwarm.begin(); iter != improvedSwarm.end(); ++iter)
{
if ((*iter)->GetSpellProto()->SpellIconID == 1771)
{
crit_chance += (*iter)->GetModifier()->m_amount;
break;
}
}
}
}
break;
case SPELLFAMILY_PALADIN:
// Sacred Shield
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000040000000))