diff options
-rw-r--r-- | sql/updates/world/3.3.5/2022_02_22_00_world.sql | 4 | ||||
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 12 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 26 |
3 files changed, 30 insertions, 12 deletions
diff --git a/sql/updates/world/3.3.5/2022_02_22_00_world.sql b/sql/updates/world/3.3.5/2022_02_22_00_world.sql new file mode 100644 index 00000000000..91d666cec75 --- /dev/null +++ b/sql/updates/world/3.3.5/2022_02_22_00_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_sha_clearcasting'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(16246, 'spell_sha_clearcasting'); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 734360cea22..46ce4c7b0b0 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3596,18 +3596,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Stances = UI64LIT(1) << (FORM_TREE - 1); }); - // Elemental Oath - ApplySpellFix({ - 51466, // (Rank 1) - 51470 // (Rank 2) - }, [](SpellInfo* spellInfo) - { - spellInfo->_GetEffect(EFFECT_1).Effect = SPELL_EFFECT_APPLY_AURA; - spellInfo->_GetEffect(EFFECT_1).ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER; - spellInfo->_GetEffect(EFFECT_1).MiscValue = SPELLMOD_EFFECT2; - spellInfo->_GetEffect(EFFECT_1).SpellClassMask = flag96(0x00000000, 0x00004000, 0x00000000); - }); - // Improved Shadowform (Rank 1) ApplySpellFix({ 47569 }, [](SpellInfo* spellInfo) { diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index a7b6fe71ece..eff59f64966 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -41,6 +41,7 @@ enum ShamanSpells SPELL_SHAMAN_CLEANSING_TOTEM_EFFECT = 52025, SPELL_SHAMAN_EARTH_SHIELD_HEAL = 379, SPELL_SHAMAN_ELEMENTAL_MASTERY = 16166, + SPELL_SHAMAN_ELEMENTAL_OATH = 51466, SPELL_SHAMAN_EXHAUSTION = 57723, SPELL_SHAMAN_FIRE_NOVA_R1 = 1535, SPELL_SHAMAN_FIRE_NOVA_TRIGGERED_R1 = 8349, @@ -342,6 +343,30 @@ class spell_sha_cleansing_totem_pulse : public SpellScript } }; +// 16246 - Clearcasting +class spell_sha_clearcasting : public AuraScript +{ + PrepareAuraScript(spell_sha_clearcasting); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SHAMAN_ELEMENTAL_OATH }); + } + + // Elemental Oath bonus + void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + { + Unit const* owner = GetUnitOwner(); + if (Aura const* aura = owner->GetAuraOfRankedSpell(SPELL_SHAMAN_ELEMENTAL_OATH, owner->GetGUID())) + amount = aura->GetSpellInfo()->GetEffect(EFFECT_1).CalcValue(); + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_clearcasting::CalculateAmount, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); + } +}; + // -974 - Earth Shield class spell_sha_earth_shield : public AuraScript { @@ -1890,6 +1915,7 @@ void AddSC_shaman_spell_scripts() RegisterSpellScript(spell_sha_bloodlust); RegisterSpellScript(spell_sha_chain_heal); RegisterSpellScript(spell_sha_cleansing_totem_pulse); + RegisterSpellScript(spell_sha_clearcasting); RegisterSpellScript(spell_sha_earth_shield); RegisterSpellScript(spell_sha_earthbind_totem); RegisterSpellScript(spell_sha_earthen_power); |