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
13 changed files with 860 additions and 40 deletions

View File

@@ -525,12 +525,12 @@ class spell_sha_earth_shield : public AuraScript
return ValidateSpellInfo({ SPELL_SHAMAN_EARTH_SHIELD_HEAL, SPELL_SHAMAN_GLYPH_OF_EARTH_SHIELD });
}
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
if (Unit* caster = GetCaster())
{
int32 baseAmount = amount;
amount = caster->SpellHealingBonusDone(GetUnitOwner(), GetSpellInfo(), amount, HEAL);
amount = caster->SpellHealingBonusDone(GetUnitOwner(), GetSpellInfo(), amount, HEAL, aurEff->GetEffIndex());
// xinef: taken should be calculated at every heal
//amount = GetUnitOwner()->SpellHealingBonusTaken(caster, GetSpellInfo(), amount, HEAL);
@@ -782,7 +782,7 @@ class spell_sha_healing_stream_totem : public SpellScript
return ValidateSpellInfo({ SPELL_SHAMAN_GLYPH_OF_HEALING_STREAM_TOTEM, SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL });
}
void HandleDummy(SpellEffIndex /*effIndex*/)
void HandleDummy(SpellEffIndex effIndex)
{
int32 damage = GetEffectValue();
SpellInfo const* triggeringSpell = GetTriggeringSpell();
@@ -792,7 +792,7 @@ class spell_sha_healing_stream_totem : public SpellScript
if (Unit* owner = caster->GetOwner())
{
if (triggeringSpell)
damage = int32(owner->SpellHealingBonusDone(target, triggeringSpell, damage, HEAL));
damage = int32(owner->SpellHealingBonusDone(target, triggeringSpell, damage, HEAL, effIndex));
// Restorative Totems
if (AuraEffect* dummy = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, SHAMAN_ICON_ID_RESTORATIVE_TOTEMS, 1))