diff --git a/data/sql/updates/pending_db_world/rev_1608429976729774300.sql b/data/sql/updates/pending_db_world/rev_1608429976729774300.sql new file mode 100644 index 000000000..0cac70ddb --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1608429976729774300.sql @@ -0,0 +1,6 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1608429976729774300'); + +UPDATE `spell_proc_event` SET `procFlags` = 16384, `CustomChance` = 0 WHERE `entry` = -51940; +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_earthliving_weapon'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(-51940, 'spell_sha_earthliving_weapon'); diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index cfad1cc5f..79d2caf56 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16640,16 +16640,6 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const // Custom chances switch (spellProto->SpellFamilyName) { - case SPELLFAMILY_SHAMAN: - { - // Blessing of the Eternals, Earthliving proc - if (spellProto->SpellIconID == 1929) - { - if (victim && (float(victim->GetHealth() * 100.0f / victim->GetMaxHealth()) > 35.0f)) - return roll_chance_f(chance); - } - break; - } case SPELLFAMILY_WARRIOR: { // Recklessness, allow to proc only once for whirlwind diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 13c0363ad..689a0c8f2 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -47,7 +47,8 @@ enum ShamanSpells SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695, SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474, SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566, - SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042 + SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042, + SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1 = 51554 }; enum ShamanSpellIcons @@ -796,6 +797,48 @@ public: } }; +// -51940 - Earthliving Weapon (Passive) +class spell_sha_earthliving_weapon : public SpellScriptLoader +{ +public: + spell_sha_earthliving_weapon() : SpellScriptLoader("spell_sha_earthliving_weapon") { } + + class spell_sha_earthliving_weapon_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_earthliving_weapon_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return sSpellMgr->GetSpellInfo(SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1); + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + auto chance = 20; + Unit* caster = eventInfo.GetActor(); + if (AuraEffect const* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1, EFFECT_1, caster->GetGUID())) + { + if (eventInfo.GetProcTarget()->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT)) + { + chance += aurEff->GetAmount(); + } + } + + return roll_chance_i(chance); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_sha_earthliving_weapon_AuraScript::CheckProc); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_sha_earthliving_weapon_AuraScript(); + } +}; + // -1535 - Fire Nova class spell_sha_fire_nova : public SpellScriptLoader { @@ -1371,6 +1414,7 @@ void AddSC_shaman_spell_scripts() new spell_sha_earth_shield(); new spell_sha_earthbind_totem(); new spell_sha_earthen_power(); + new spell_sha_earthliving_weapon(); new spell_sha_fire_nova(); new spell_sha_flame_shock(); new spell_sha_healing_stream_totem();