diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 56731a81e..636253579 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9349,19 +9349,32 @@ uint32 Unit::SpellCriticalHealingBonus(SpellEntry const *spellProto, uint32 dama uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack) { - // No heal amount for this class spells - if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE) - return healamount; - // For totems get healing bonus from owner (statue isn't totem in fact) if( GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem() && ((Totem*)this)->GetTotemType()!=TOTEM_STATUE) if(Unit* owner = GetOwner()) return owner->SpellHealingBonus(pVictim, spellProto, healamount, damagetype, stack); + float TakenTotalMod = 1.0f; + + // Healing taken percent + float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT); + if(minval) + TakenTotalMod *= (100.0f + minval) / 100.0f; + + float maxval = pVictim->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT); + if(maxval) + TakenTotalMod *= (100.0f + maxval) / 100.0f; + + // No heal amount for this class spells + if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE) + { + healamount = healamount * TakenTotalMod; + return healamount < 0 ? 0 : uint32(healamount); + } + // Healing Done // Taken/Done total percent damage auras float DoneTotalMod = 1.0f; - float TakenTotalMod = 1.0f; int32 DoneTotal = 0; int32 TakenTotal = 0; @@ -9508,15 +9521,6 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint TakenTotalMod *= ((*itr)->GetModifier()->m_amount+100.0f) / 100.0f; } - // Healing taken percent - float minval = pVictim->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT); - if(minval) - TakenTotalMod *= (100.0f + minval) / 100.0f; - - float maxval = pVictim->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT); - if(maxval) - TakenTotalMod *= (100.0f + maxval) / 100.0f; - AuraList const& mHealingGet= pVictim->GetAurasByType(SPELL_AURA_MOD_HEALING_RECEIVED); for(AuraList::const_iterator i = mHealingGet.begin(); i != mHealingGet.end(); ++i) if ((*i)->isAffectedOnSpell(spellProto)) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9a523873e..3fa0fab6a 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 "9282" + #define REVISION_NR "9283" #endif // __REVISION_NR_H__