mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[9854] Fix negative amounts for spell base damage/healing and fix heal effects to correctly benefit from heal increasing/reducing auras
This commit is contained in:
parent
7915d60765
commit
4c3d2805bd
8 changed files with 45 additions and 34 deletions
|
|
@ -4791,8 +4791,9 @@ void Aura::HandlePeriodicHeal(bool apply, bool /*Real*/)
|
|||
if (m_spellProto->SpellIconID == 329 && m_spellProto->SpellVisual[0] == 7625)
|
||||
{
|
||||
int32 ap = int32 (0.22f * caster->GetTotalAttackPowerValue(BASE_ATTACK));
|
||||
int32 holy = caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellProto))
|
||||
+ m_target->SpellBaseDamageBonusTaken(GetSpellSchoolMask(m_spellProto));
|
||||
int32 holy = caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellProto));
|
||||
if (holy < 0)
|
||||
holy = 0;
|
||||
holy = int32(holy * 377 / 1000);
|
||||
m_modifier.m_amount += ap > holy ? ap : holy;
|
||||
}
|
||||
|
|
@ -4960,8 +4961,9 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
|
|||
{
|
||||
// AP * 0.025 + SPH * 0.013 bonus per tick
|
||||
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 holy = caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellProto)) +
|
||||
GetTarget()->SpellBaseDamageBonusTaken(GetSpellSchoolMask(m_spellProto));
|
||||
int32 holy = caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellProto));
|
||||
if (holy < 0)
|
||||
holy = 0;
|
||||
m_modifier.m_amount += int32(GetStackAmount()) * (int32(ap * 0.025f) + int32(holy * 13 / 1000));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue