mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8953] Apply spell mutiplier to final damage for health calculation in Spell::EffectHealthLeech.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4ca8b0defc
commit
8d519d7219
2 changed files with 9 additions and 9 deletions
|
|
@ -2776,21 +2776,21 @@ void Spell::EffectHealthLeech(uint32 i)
|
|||
|
||||
sLog.outDebug("HealthLeech :%i", damage);
|
||||
|
||||
uint32 curHealth = unitTarget->GetHealth();
|
||||
damage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, damage );
|
||||
if (curHealth < damage)
|
||||
damage = curHealth;
|
||||
|
||||
float multiplier = m_spellInfo->EffectMultipleValue[i];
|
||||
|
||||
if (Player *modOwner = m_caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_MULTIPLE_VALUE, multiplier);
|
||||
|
||||
int32 new_damage = int32(damage*multiplier);
|
||||
uint32 curHealth = unitTarget->GetHealth();
|
||||
new_damage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, new_damage );
|
||||
if (curHealth < new_damage)
|
||||
new_damage = curHealth;
|
||||
|
||||
uint32 heal = uint32(damage*multiplier);
|
||||
if (m_caster->isAlive())
|
||||
{
|
||||
new_damage = m_caster->SpellHealingBonus(m_caster, m_spellInfo, new_damage, HEAL);
|
||||
m_caster->DealHeal(m_caster, uint32(new_damage), m_spellInfo);
|
||||
heal = m_caster->SpellHealingBonus(m_caster, m_spellInfo, heal, HEAL);
|
||||
m_caster->DealHeal(m_caster, heal, m_spellInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8952"
|
||||
#define REVISION_NR "8953"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue