mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Spells: removed hackfix for Elemental Oath and replaced it with a proper implementation (#27812)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user