feat(Core): Implement SP Bonus Coefficients from DBC (#12562)

* cherry-pick commit (1826437c09)

* Co-authored by: ariel- <ariel-@users.noreply.github.com>

* feat(Core): Implement SP Bonus Coefficients from DBC

* Several coefficient corrections

* Fix spell_dru_lifebloom
This commit is contained in:
ZhengPeiRu21 2022-09-17 03:09:04 -06:00 committed by GitHub
parent 97578442fb
commit 1ddd884d6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 860 additions and 40 deletions

View file

@ -456,14 +456,14 @@ class spell_warr_bloodthirst : public SpellScript
return ValidateSpellInfo({ SPELL_WARRIOR_BLOODTHIRST });
}
void HandleDamage(SpellEffIndex /*effIndex*/)
void HandleDamage(SpellEffIndex effIndex)
{
int32 damage = GetEffectValue();
ApplyPct(damage, GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK));
if (Unit* target = GetHitUnit())
{
damage = GetCaster()->SpellDamageBonusDone(target, GetSpellInfo(), uint32(damage), SPELL_DIRECT_DAMAGE);
damage = GetCaster()->SpellDamageBonusDone(target, GetSpellInfo(), uint32(damage), SPELL_DIRECT_DAMAGE, effIndex);
damage = target->SpellDamageBonusTaken(GetCaster(), GetSpellInfo(), uint32(damage), SPELL_DIRECT_DAMAGE);
}
SetHitDamage(damage);