mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[7197] Fixed wrong spell damage bonus calculation from AP
Fixed wrong bonus from one shaman buff Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
003f909a58
commit
ee6d98e182
2 changed files with 6 additions and 6 deletions
|
|
@ -7624,7 +7624,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||||
else
|
else
|
||||||
coeff = bonus->direct_damage * LvlPenalty * stack;
|
coeff = bonus->direct_damage * LvlPenalty * stack;
|
||||||
if (bonus->ap_bonus)
|
if (bonus->ap_bonus)
|
||||||
coeff*=bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK);
|
DoneTotal+=bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK) * stack;
|
||||||
DoneTotal += DoneAdvertisedBenefit * coeff * SpellModSpellDamage;
|
DoneTotal += DoneAdvertisedBenefit * coeff * SpellModSpellDamage;
|
||||||
TakenTotal+= TakenAdvertisedBenefit * coeff;
|
TakenTotal+= TakenAdvertisedBenefit * coeff;
|
||||||
}
|
}
|
||||||
|
|
@ -8037,7 +8037,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||||
else
|
else
|
||||||
coeff = bonus->direct_damage * LvlPenalty * stack;
|
coeff = bonus->direct_damage * LvlPenalty * stack;
|
||||||
if (bonus->ap_bonus)
|
if (bonus->ap_bonus)
|
||||||
coeff*=bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK);
|
DoneTotal+=bonus->ap_bonus * GetTotalAttackPowerValue(BASE_ATTACK) * stack;
|
||||||
DoneTotal += DoneAdvertisedBenefit * coeff * SpellModSpellDamage;
|
DoneTotal += DoneAdvertisedBenefit * coeff * SpellModSpellDamage;
|
||||||
TakenTotal+= TakenAdvertisedBenefit * coeff;
|
TakenTotal+= TakenAdvertisedBenefit * coeff;
|
||||||
}
|
}
|
||||||
|
|
@ -8107,7 +8107,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||||
Unit::AuraList const& auraDummy = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
|
Unit::AuraList const& auraDummy = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr!=auraDummy.end(); ++itr)
|
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr!=auraDummy.end(); ++itr)
|
||||||
if((*itr)->GetId() == 29203)
|
if((*itr)->GetId() == 29203)
|
||||||
TakenTotalMod *= (*itr)->GetModifier()->m_amount;
|
TakenTotalMod *= ((*itr)->GetModifier()->m_amount+100.0f) / 100.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Healing taken percent
|
// Healing taken percent
|
||||||
|
|
@ -8355,8 +8355,8 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
|
||||||
TakenFlatBenefit += pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN);
|
TakenFlatBenefit += pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN);
|
||||||
|
|
||||||
// Done/Taken total percent damage auras
|
// Done/Taken total percent damage auras
|
||||||
float DoneTotalMod = 1;
|
float DoneTotalMod = 1.0f;
|
||||||
float TakenTotalMod = 1;
|
float TakenTotalMod = 1.0f;
|
||||||
|
|
||||||
// ..done
|
// ..done
|
||||||
// SPELL_AURA_MOD_DAMAGE_PERCENT_DONE included in weapon damage
|
// SPELL_AURA_MOD_DAMAGE_PERCENT_DONE included in weapon damage
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7196"
|
#define REVISION_NR "7197"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue