diff --git a/data/sql/updates/pending_db_world/rev_1679137018378727600.sql b/data/sql/updates/pending_db_world/rev_1679137018378727600.sql new file mode 100644 index 000000000..67b1920d9 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1679137018378727600.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dru_insect_swarm', 'spell_dru_idol_lifebloom'); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3f8e26ad0..0994f84bc 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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) diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 2bad8d2ec..6a4dd4a68 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -430,13 +430,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x00000040, 0x00000000, 0x00000000); }); - // Idol of the Flourishing Life - ApplySpellFix({ 64949 }, [](SpellInfo* spellInfo) - { - spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x00000000, 0x02000000, 0x00000000); - spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER; - }); - ApplySpellFix({ 34231, // Libram of the Lightbringer 60792, // Libram of Tolerance diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 5cc847ba0..e6218430f 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -55,7 +55,6 @@ enum DruidSpells SPELL_DRUID_SURVIVAL_INSTINCTS = 50322, SPELL_DRUID_SAVAGE_ROAR = 62071, SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178, - SPELL_DRUID_ITEM_T8_BALANCE_RELIC = 64950, SPELL_DRUID_BEAR_FORM_PASSIVE = 1178, SPELL_DRUID_DIRE_BEAR_FORM_PASSIVE = 9635, SPELL_DRUID_ENRAGE = 5229, @@ -501,31 +500,6 @@ class spell_dru_glyph_of_starfire : public SpellScript } }; -/* 34246 - Increased Lifebloom Periodic - 60779 - Idol of Lush Moss */ -class spell_dru_idol_lifebloom : public AuraScript -{ - PrepareAuraScript(spell_dru_idol_lifebloom); - - void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod) - { - if (!spellMod) - { - spellMod = new SpellModifier(GetAura()); - spellMod->op = SPELLMOD_DOT; - spellMod->type = SPELLMOD_FLAT; - spellMod->spellId = GetId(); - spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask; - } - spellMod->value = aurEff->GetAmount() / 7; - } - - void Register() override - { - DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_dru_idol_lifebloom::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY); - } -}; - // 29166 - Innervate class spell_dru_innervate : public AuraScript { @@ -545,24 +519,6 @@ class spell_dru_innervate : public AuraScript } }; -// -5570 - Insect Swarm -class spell_dru_insect_swarm : public AuraScript -{ - PrepareAuraScript(spell_dru_insect_swarm); - - void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) - { - if (Unit* caster = GetCaster()) - if (AuraEffect const* relicAurEff = caster->GetAuraEffect(SPELL_DRUID_ITEM_T8_BALANCE_RELIC, EFFECT_0)) - amount += relicAurEff->GetAmount() / aurEff->GetTotalTicks(); - } - - void Register() override - { - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_insect_swarm::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); - } -}; - // -33763 - Lifebloom class spell_dru_lifebloom : public AuraScript { @@ -1202,9 +1158,7 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_dash); RegisterSpellScript(spell_dru_enrage); RegisterSpellScript(spell_dru_glyph_of_starfire); - RegisterSpellScript(spell_dru_idol_lifebloom); RegisterSpellScript(spell_dru_innervate); - RegisterSpellScript(spell_dru_insect_swarm); RegisterSpellScript(spell_dru_lifebloom); RegisterSpellScript(spell_dru_living_seed); RegisterSpellScript(spell_dru_living_seed_proc);