diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-10-11 17:59:34 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2016-10-11 17:59:34 -0300 |
commit | d685c7079d8fedf4ce1b7afa23a59a57c4a63af8 (patch) | |
tree | 17877a40e2ad432ea8b0fd1860a12dad7ac7644e | |
parent | b0779cbb0238a2647c84ea11654a940012a1799a (diff) |
Core/Scripts: Implemented Blessing of the Eternals Earthliving proc chance increase
-rw-r--r-- | sql/updates/world/3.3.5/2016_10_11_07_world_335.sql | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 44 |
2 files changed, 47 insertions, 1 deletions
diff --git a/sql/updates/world/3.3.5/2016_10_11_07_world_335.sql b/sql/updates/world/3.3.5/2016_10_11_07_world_335.sql new file mode 100644 index 00000000000..0f2e7a12379 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_10_11_07_world_335.sql @@ -0,0 +1,4 @@ +UPDATE `spell_proc` SET `Chance` = 0 WHERE `SpellId` = -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/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index cff94b6e219..7485c7e6bac 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -83,7 +83,8 @@ enum ShamanSpells SPELL_SHAMAN_LIGHTNING_SHIELD_DAMAGE_R1 = 26364, SPELL_SHAMAN_SHAMANISTIC_RAGE_PROC = 30824, SPELL_SHAMAN_MAELSTROM_POWER = 70831, - SPELL_SHAMAN_T10_ENHANCEMENT_4P_BONUS = 70832 + SPELL_SHAMAN_T10_ENHANCEMENT_4P_BONUS = 70832, + SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1 = 51554 }; enum ShamanSpellIcons @@ -537,6 +538,46 @@ class spell_sha_earthen_power : public SpellScriptLoader } }; +// -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 + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + int32 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 { @@ -2276,6 +2317,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_flametongue_weapon(); |