aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp4
-rw-r--r--src/game/Unit.cpp23
2 files changed, 21 insertions, 6 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 124fdd9543b..59059756fbc 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5965,12 +5965,10 @@ void AuraEffect::PeriodicTick()
}
}
-
if(Player *modOwner = pCaster->GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_MULTIPLE_VALUE, multiplier);
- // Don't apply heal mods for this aura
- uint32 heal = uint32(new_damage * multiplier);//pCaster->SpellHealingBonus(pCaster, spellProto, uint32(new_damage * multiplier), DOT, stackAmount);
+ uint32 heal = uint32(pCaster->SpellHealingBonus(pCaster, spellProto, uint32(new_damage * multiplier), DOT, stackAmount));
int32 gain = pCaster->DealHeal(pCaster, heal, spellProto);
pCaster->getHostilRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
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);
}