aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-18 15:17:53 -0500
committermegamage <none@none>2009-05-18 15:17:53 -0500
commit3f98363aab842b2731de4e95a24bca28bd202134 (patch)
treeac28d8d8ffe0480e0218e2499ddd9880f917f2eb /src/game/Unit.cpp
parentdf866dd37ba8d9b8dd98f972c2e37ae871c68deb (diff)
parentd0ef4b8b4ae8cb1a7003ceb2a82c11845e14bfec (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp23
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);
}