diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 19ff43613..611561250 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9437,19 +9437,17 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint case 8477: // Nourish Heal Boost { int32 stepPercent = (*i)->GetModifier()->m_amount; - int32 modPercent = 0; - AuraMap const& victimAuras = pVictim->GetAuras(); - for (AuraMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr) - { - if (itr->second->GetCasterGUID()!=GetGUID()) - continue; - SpellEntry const* m_spell = itr->second->GetSpellProto(); - if (m_spell->SpellFamilyName != SPELLFAMILY_DRUID || - !(m_spell->SpellFamilyFlags & UI64LIT(0x0000001000000050))) - continue; - modPercent += stepPercent * itr->second->GetStackAmount(); - } - DoneTotalMod *= (modPercent+100.0f)/100.0f; + + int ownHotCount = 0; + + Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_HEAL); + for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i) + if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && + (*i)->GetCasterGUID() == GetGUID()) + ownHotCount += (*i)->GetStackAmount(); + + if (ownHotCount) + TakenTotalMod *= (stepPercent * ownHotCount + 100.0f) / 100.0f; break; } case 7871: // Glyph of Lesser Healing Wave @@ -9539,6 +9537,25 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint if((*itr)->GetId() == 29203) TakenTotalMod *= ((*itr)->GetModifier()->m_amount+100.0f) / 100.0f; } + // Nourish 20% of heal increase if target is affected by Druids HOTs + else if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && (spellProto->SpellFamilyFlags & UI64LIT(0x0200000000000000))) + { + int ownHotCount = 0; + Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_HEAL); + for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i) + if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && + (*i)->GetCasterGUID() == GetGUID()) + ownHotCount += (*i)->GetStackAmount(); + + if (ownHotCount) + { + TakenTotalMod *= 1.2f; // base bonus at HoTs + + if (Aura* glyph = GetAura(62971,0)) // Glyph of Nourish + TakenTotalMod *= (glyph->GetModifier()->m_amount * ownHotCount + 100.0f) / 100.0f; + } + } + AuraList const& mHealingGet= pVictim->GetAurasByType(SPELL_AURA_MOD_HEALING_RECEIVED); for(AuraList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d628a73cb..2b00ad19a 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 "9345" + #define REVISION_NR "9346" #endif // __REVISION_NR_H__