*Fix beacon of light
*Apply healing aura mods to leech auras. --HG-- branch : trunk
This commit is contained in:
1 parent
6c7f2d2b24
commit
7ed391aa92
4 files changed
+36
-10
No files matched your search
+20
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user