diff options
-rw-r--r-- | sql/updates/world/master/2024_08_19_01_world.sql | 7 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 37 |
2 files changed, 44 insertions, 0 deletions
diff --git a/sql/updates/world/master/2024_08_19_01_world.sql b/sql/updates/world/master/2024_08_19_01_world.sql new file mode 100644 index 00000000000..5ef4678c017 --- /dev/null +++ b/sql/updates/world/master/2024_08_19_01_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc` WHERE `SpellId` IN (394058); +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(394058,0x00,7,0x00000005,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x0,0x0,0x0,0,0,0,0); -- Astral Smolder + +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dru_astral_smolder'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(394058, 'spell_dru_astral_smolder'); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 763aac5e70c..dd919ce7077 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -38,6 +38,7 @@ enum DruidSpells { SPELL_DRUID_ABUNDANCE = 207383, SPELL_DRUID_ABUNDANCE_EFFECT = 207640, + SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE = 394061, SPELL_DRUID_BALANCE_T10_BONUS = 70718, SPELL_DRUID_BALANCE_T10_BONUS_PROC = 70721, SPELL_DRUID_BEAR_FORM = 5487, @@ -164,6 +165,41 @@ class spell_dru_abundance : public AuraScript } }; +// 394058 - Astral Smolder +class spell_dru_astral_smolder : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellEffect({ { SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, EFFECT_0 } }) + && sSpellMgr->AssertSpellInfo(SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, DIFFICULTY_NONE)->GetMaxTicks(); + } + + bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) const + { + return eventInfo.GetProcTarget() != nullptr; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo) + { + PreventDefaultAction(); + + SpellInfo const* astralSmolderDmg = sSpellMgr->AssertSpellInfo(SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, GetCastDifficulty()); + int32 pct = aurEff->GetAmount(); + + int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / astralSmolderDmg->GetMaxTicks()); + + CastSpellExtraArgs args(aurEff); + args.AddSpellMod(SPELLVALUE_BASE_POINT0, amount); + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_ASTRAL_SMOLDER_DAMAGE, args); + } + + void Register() override + { + DoCheckEffectProc += AuraCheckEffectProcFn(spell_dru_astral_smolder::CheckProc, EFFECT_0, SPELL_AURA_DUMMY); + OnEffectProc += AuraEffectProcFn(spell_dru_astral_smolder::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + class spell_dru_base_transformer : public SpellScript { protected: @@ -2094,6 +2130,7 @@ class spell_dru_yseras_gift_group_heal : public SpellScript void AddSC_druid_spell_scripts() { RegisterSpellScript(spell_dru_abundance); + RegisterSpellScript(spell_dru_astral_smolder); RegisterSpellScript(spell_dru_barkskin); RegisterSpellScript(spell_dru_berserk); RegisterSpellScript(spell_dru_brambles); |