mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
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:
@@ -872,7 +872,7 @@ public:
|
||||
static bool HandleReloadSpellBonusesCommand(ChatHandler* handler)
|
||||
{
|
||||
LOG_INFO("server.loading", "Re-Loading Spell Bonus Data...");
|
||||
sSpellMgr->LoadSpellBonusess();
|
||||
sSpellMgr->LoadSpellBonuses();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ class spell_dru_lifebloom : public AuraScript
|
||||
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
healAmount = caster->SpellHealingBonusDone(GetTarget(), finalHeal, healAmount, HEAL, 0.0f, stack);
|
||||
healAmount = caster->SpellHealingBonusDone(GetTarget(), finalHeal, healAmount, HEAL, aurEff->GetEffIndex(), 0.0f, stack);
|
||||
healAmount = GetTarget()->SpellHealingBonusTaken(caster, finalHeal, healAmount, HEAL, stack);
|
||||
// restore mana
|
||||
int32 returnmana = (GetSpellInfo()->ManaCostPercentage * caster->GetCreateMana() / 100) * stack / 2;
|
||||
@@ -590,7 +590,7 @@ class spell_dru_lifebloom : public AuraScript
|
||||
if (caster)
|
||||
{
|
||||
// healing with bonus
|
||||
healAmount = caster->SpellHealingBonusDone(target, finalHeal, healAmount, HEAL, 0.0f, dispelInfo->GetRemovedCharges());
|
||||
healAmount = caster->SpellHealingBonusDone(target, finalHeal, healAmount, HEAL, EFFECT_1, 0.0f, dispelInfo->GetRemovedCharges());
|
||||
healAmount = target->SpellHealingBonusTaken(caster, finalHeal, healAmount, HEAL, dispelInfo->GetRemovedCharges());
|
||||
|
||||
// mana amount
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user