diff options
| -rw-r--r-- | sql/updates/world/master/2017_01_29_01_world.sql | 6 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 49 |
3 files changed, 58 insertions, 1 deletions
diff --git a/sql/updates/world/master/2017_01_29_01_world.sql b/sql/updates/world/master/2017_01_29_01_world.sql new file mode 100644 index 00000000000..81d84dbcec1 --- /dev/null +++ b/sql/updates/world/master/2017_01_29_01_world.sql @@ -0,0 +1,6 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_crash_lightning'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(187874,'spell_sha_crash_lightning'); + +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`spellFamilyMask3`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES +(187878,0,11,0,0x01000000,4,0,0,0,0,0,0); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 9998713f654..154982cc6fd 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3155,7 +3155,6 @@ void SpellMgr::LoadSpellInfoCorrections() case 59630: // Black Magic spellInfo->Attributes |= SPELL_ATTR0_PASSIVE; break; - case 17364: // Stormstrike case 48278: // Paralyze spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS; break; @@ -3168,6 +3167,9 @@ void SpellMgr::LoadSpellInfoCorrections() const_cast<SpellEffectInfo*>(spellInfo->GetEffect(EFFECT_0))->RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); const_cast<SpellEffectInfo*>(spellInfo->GetEffect(EFFECT_0))->TargetA = SpellImplicitTargetInfo(TARGET_UNIT_SRC_AREA_ENTRY); break; + case 198300: // Gathering Storms + spellInfo->ProcCharges = 1; // override proc charges, has 0 (unlimited) in db2 + break; // VIOLET HOLD SPELLS // case 54258: // Water Globule (Ichoron) diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index e8fe82862df..a56b64766c1 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -34,6 +34,7 @@ enum ShamanSpells { SPELL_SHAMAN_ANCESTRAL_GUIDANCE = 108281, SPELL_SHAMAN_ANCESTRAL_GUIDANCE_HEAL = 114911, + SPELL_SHAMAN_CRASH_LIGHTNING_CLEAVE = 187878, SPELL_SHAMAN_EARTH_SHIELD_HEAL = 204290, SPELL_SHAMAN_EARTHEN_RAGE_PASSIVE = 170374, SPELL_SHAMAN_EARTHEN_RAGE_PERIODIC = 170377, @@ -47,6 +48,8 @@ enum ShamanSpells SPELL_SHAMAN_FLAME_SHOCK = 8050, SPELL_SHAMAN_FLAME_SHOCK_MAELSTROM = 188389, SPELL_SHAMAN_FLAMETONGUE_ATTACK = 10444, + SPELL_SHAMAN_GATHERING_STORMS = 198299, + SPELL_SHAMAN_GATHERING_STORMS_BUFF = 198300, SPELL_SHAMAN_HIGH_TIDE = 157154, SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD = 23552, SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD_DAMAGE = 27635, @@ -194,6 +197,51 @@ class spell_sha_bloodlust : public SpellScriptLoader } }; +// 187874 - Crash Lightning +class spell_sha_crash_lightning : public SpellScriptLoader +{ +public: + spell_sha_crash_lightning() : SpellScriptLoader("spell_sha_crash_lightning") { } + + class spell_sha_crash_lightning_SpellScript : public SpellScript + { + PrepareSpellScript(spell_sha_crash_lightning_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_CRASH_LIGHTNING_CLEAVE)) + return false; + return true; + } + + void CountTargets(std::list<WorldObject*>& targets) + { + _targetsHit = targets.size(); + } + + void TriggerCleaveBuff() + { + if (_targetsHit >= 2) + GetCaster()->CastSpell(GetCaster(), SPELL_SHAMAN_CRASH_LIGHTNING_CLEAVE, true); + if (AuraEffect const* gatheringStorms = GetCaster()->GetAuraEffect(SPELL_SHAMAN_GATHERING_STORMS, EFFECT_0)) + GetCaster()->CastCustomSpell(SPELL_SHAMAN_GATHERING_STORMS_BUFF, SPELLVALUE_BASE_POINT0, int32(gatheringStorms->GetAmount() * _targetsHit), GetCaster(), true); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_crash_lightning_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_CONE_ENEMY_104); + AfterCast += SpellCastFn(spell_sha_crash_lightning_SpellScript::TriggerCleaveBuff); + } + + size_t _targetsHit = 0; + }; + + SpellScript* GetSpellScript() const override + { + return new spell_sha_crash_lightning_SpellScript(); + } +}; + // 204288 - Earth Shield class spell_sha_earth_shield : public SpellScriptLoader { @@ -935,6 +983,7 @@ void AddSC_shaman_spell_scripts() new spell_sha_ancestral_guidance(); new spell_sha_ancestral_guidance_heal(); new spell_sha_bloodlust(); + new spell_sha_crash_lightning(); new spell_sha_earth_shield(); new spell_sha_earthen_rage_passive(); new spell_sha_earthen_rage_proc_aura(); |
