mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +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:
@@ -1762,7 +1762,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||
uint32 damage = uint32(std::max(0, (*dmgShieldItr)->GetAmount())); // xinef: done calculated at amount calculation
|
||||
|
||||
if (Unit* caster = (*dmgShieldItr)->GetCaster())
|
||||
{
|
||||
damage = caster->SpellDamageBonusDone(this, i_spellProto, damage, SPELL_DIRECT_DAMAGE, (*dmgShieldItr)->GetEffIndex());
|
||||
damage = this->SpellDamageBonusTaken(caster, i_spellProto, damage, SPELL_DIRECT_DAMAGE);
|
||||
}
|
||||
|
||||
uint32 absorb = 0;
|
||||
|
||||
@@ -11233,7 +11236,7 @@ float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, Da
|
||||
return DoneTotalMod;
|
||||
}
|
||||
|
||||
uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, float TotalMod, uint32 stack)
|
||||
uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 pdamage, DamageEffectType damagetype, uint8 effIndex, float TotalMod, uint32 stack)
|
||||
{
|
||||
if (!spellProto || !victim || damagetype == DIRECT_DAMAGE)
|
||||
return pdamage;
|
||||
@@ -11248,7 +11251,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
if (IsTotem())
|
||||
{
|
||||
if (Unit* owner = GetOwner())
|
||||
return owner->SpellDamageBonusDone(victim, spellProto, pdamage, damagetype, TotalMod, stack);
|
||||
return owner->SpellDamageBonusDone(victim, spellProto, pdamage, damagetype, effIndex, TotalMod, stack);
|
||||
}
|
||||
// Dancing Rune Weapon...
|
||||
else if (GetEntry() == 27893)
|
||||
@@ -11325,7 +11328,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
int32 DoneAdvertisedBenefit = SpellBaseDamageBonusDone(spellProto->GetSchoolMask());
|
||||
|
||||
// Check for table values
|
||||
float coeff = 0;
|
||||
float coeff = spellProto->Effects[effIndex].BonusMultiplier;
|
||||
SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id);
|
||||
if (bonus)
|
||||
{
|
||||
@@ -12037,12 +12040,12 @@ float Unit::SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, D
|
||||
return DoneTotalMod;
|
||||
}
|
||||
|
||||
uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, float TotalMod, uint32 stack)
|
||||
uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, uint32 healamount, DamageEffectType damagetype, uint8 effIndex, float TotalMod, uint32 stack)
|
||||
{
|
||||
// For totems get healing bonus from owner (statue isn't totem in fact)
|
||||
if (GetTypeId() == TYPEID_UNIT && IsTotem())
|
||||
if (Unit* owner = GetOwner())
|
||||
return owner->SpellHealingBonusDone(victim, spellProto, healamount, damagetype, TotalMod, stack);
|
||||
return owner->SpellHealingBonusDone(victim, spellProto, healamount, damagetype, effIndex, TotalMod, stack);
|
||||
|
||||
// No bonus healing for potion spells
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_POTION)
|
||||
@@ -12073,7 +12076,7 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
|
||||
// Done fixed damage bonus auras
|
||||
int32 DoneAdvertisedBenefit = SpellBaseHealingBonusDone(spellProto->GetSchoolMask());
|
||||
float coeff = 0;
|
||||
float coeff = spellProto->Effects[effIndex].BonusMultiplier;
|
||||
|
||||
switch (spellProto->SpellFamilyName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user