diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 981b40c55..434f6ec25 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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)) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 404f17caa..f43d1f5cc 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9666" + #define REVISION_NR "9667" #endif // __REVISION_NR_H__