mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
fix(Core/Spells): Fixed somed Druid idols not being modified by spell… (#15452)
fix(Core/Spells): Fixed somed Druid idols not being modified by spell power coefficients. Fixes #14479
This commit is contained in:
@@ -11634,6 +11634,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
|
||||
// done scripted mod (take it from owner)
|
||||
Unit* owner = GetOwner() ? GetOwner() : this;
|
||||
int32 DoneAdvertisedBenefit = 0;
|
||||
AuraEffectList const& mOverrideClassScript = owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
@@ -11650,36 +11651,68 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
case 5148: // Idol of the Shooting Star
|
||||
case 6008: // Increased Lightning Damage
|
||||
case 8627: // Totem of Hex
|
||||
{
|
||||
DoneTotal += (*i)->GetAmount();
|
||||
break;
|
||||
}
|
||||
{
|
||||
DoneAdvertisedBenefit += (*i)->GetAmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Custom scripted damage
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
||||
switch (spellProto->SpellFamilyName)
|
||||
{
|
||||
// Sigil of the Vengeful Heart
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x2000)
|
||||
if (AuraEffect* aurEff = GetAuraEffect(64962, EFFECT_1))
|
||||
AddPct(DoneTotal, aurEff->GetAmount());
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Insect Swarm vs Item - Druid T8 Balance Relic
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x00200000)
|
||||
{
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(64950, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
}
|
||||
|
||||
// Impurity
|
||||
if (AuraEffect* aurEff = GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986, 0))
|
||||
AddPct(ApCoeffMod, aurEff->GetAmount());
|
||||
// Nourish vs Idol of the Flourishing Life
|
||||
if (spellProto->SpellFamilyFlags[1] & 0x02000000)
|
||||
{
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(64949, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
// Sigil of the Vengeful Heart
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x2000)
|
||||
{
|
||||
if (AuraEffect* aurEff = GetAuraEffect(64962, EFFECT_1))
|
||||
{
|
||||
AddPct(DoneTotal, aurEff->GetAmount());
|
||||
}
|
||||
}
|
||||
|
||||
// Blood Boil - bonus for diseased targets
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x00040000)
|
||||
if (victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0, 0, 0x00000002, GetGUID()))
|
||||
// Impurity
|
||||
if (AuraEffect* aurEff = GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986, 0))
|
||||
{
|
||||
AddPct(ApCoeffMod, aurEff->GetAmount());
|
||||
}
|
||||
|
||||
// Blood Boil - bonus for diseased targets
|
||||
if ((spellProto->SpellFamilyFlags[0] & 0x00040000) && victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0, 0, 0x00000002, GetGUID()))
|
||||
{
|
||||
DoneTotal += 95;
|
||||
ApCoeffMod = 1.5835f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Done fixed damage bonus auras
|
||||
int32 DoneAdvertisedBenefit = SpellBaseDamageBonusDone(spellProto->GetSchoolMask());
|
||||
DoneAdvertisedBenefit += SpellBaseDamageBonusDone(spellProto->GetSchoolMask());
|
||||
|
||||
// Check for table values
|
||||
float coeff = spellProto->Effects[effIndex].BonusMultiplier;
|
||||
@@ -12411,37 +12444,70 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
|
||||
// done scripted mod (take it from owner)
|
||||
Unit* owner = GetOwner() ? GetOwner() : this;
|
||||
int32 DoneAdvertisedBenefit = 0;
|
||||
AuraEffectList const& mOverrideClassScript = owner->GetAuraEffectsByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for (AuraEffectList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
if (!(*i)->IsAffectedOnSpell(spellProto))
|
||||
continue;
|
||||
|
||||
switch ((*i)->GetMiscValue())
|
||||
{
|
||||
case 4415: // Increased Rejuvenation Healing
|
||||
case 4953:
|
||||
DoneTotal += (*i)->GetAmount() / 5; // 5 ticks of Rejuvenation
|
||||
DoneAdvertisedBenefit += (*i)->GetAmount();
|
||||
break;
|
||||
case 3736: // Hateful Totem of the Third Wind / Increased Lesser Healing Wave / LK Arena (4/5/6) Totem of the Third Wind / Savage Totem of the Third Wind
|
||||
DoneTotal += (*i)->GetAmount();
|
||||
DoneAdvertisedBenefit += (*i)->GetAmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Done fixed damage bonus auras
|
||||
int32 DoneAdvertisedBenefit = SpellBaseHealingBonusDone(spellProto->GetSchoolMask());
|
||||
float coeff = spellProto->Effects[effIndex].BonusMultiplier;
|
||||
|
||||
switch (spellProto->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Nourish vs Idol of the Flourishing Life
|
||||
if (spellProto->SpellFamilyFlags[1] & 0x02000000)
|
||||
{
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(64949, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
}
|
||||
|
||||
// Lifebloom vs Idol of Lush Moss/Increased Lifebloom Periodic
|
||||
if (spellProto->SpellFamilyFlags[1] & 00000010)
|
||||
{
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(60779, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(34246, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
// Impurity
|
||||
if (AuraEffect* aurEff = GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986, 0))
|
||||
{
|
||||
AddPct(ApCoeffMod, aurEff->GetAmount());
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Done fixed damage bonus auras
|
||||
DoneAdvertisedBenefit += SpellBaseHealingBonusDone(spellProto->GetSchoolMask());
|
||||
float coeff = spellProto->Effects[effIndex].BonusMultiplier;
|
||||
|
||||
// Check for table values
|
||||
SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id);
|
||||
if(bonus)
|
||||
|
||||
Reference in New Issue
Block a user