diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 7cfb6a1d16c..d9364b1c1bd 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9350,11 +9350,23 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint int32 DoneAdvertisedBenefit = SpellBaseHealingBonus(GetSpellSchoolMask(spellProto)); int32 TakenAdvertisedBenefit = SpellBaseHealingBonusForVictim(GetSpellSchoolMask(spellProto), pVictim); + bool scripted = false; + for (uint8 i=0;i<3;++i) + { + switch (spellProto->EffectApplyAuraName[i]) + { + // These auras do not use healing coeff + case SPELL_AURA_PERIODIC_LEECH: + case SPELL_AURA_PERIODIC_HEALTH_FUNNEL: + scripted = true; + break; + } + } + // Check for table values - SpellBonusEntry const* bonus = spellmgr.GetSpellBonusData(spellProto->Id); + SpellBonusEntry const* bonus = scripted ? spellmgr.GetSpellBonusData(spellProto->Id) : NULL; float coeff; float factorMod = 1.0f; - bool scripted = false; if (bonus) { if (damagetype == DOT) @@ -9384,6 +9396,11 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint { factorMod *= 0.45f; } + // Already set to scripted? so not uses healing bonus coefficient + else if (scripted) + { + coeff = 0.0f; + } } // Default calculation @@ -13732,7 +13749,7 @@ void Unit::AddAura(uint32 spellId, Unit* target) if (!eff_mask) return; - Aura *Aur = new Aura(spellInfo, eff_mask, NULL, target, this); + Aura *Aur = new Aura(spellInfo, eff_mask, NULL, target, this, NULL, target); target->AddAura(Aur); } |