diff options
author | Sorikoff <46191832+Sorikoff@users.noreply.github.com> | 2019-06-28 18:18:02 +0000 |
---|---|---|
committer | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-06-28 20:18:02 +0200 |
commit | 62b2c379b37b843076eb4df379e7de86b18303eb (patch) | |
tree | ef96ae6f08194aa71bd5286a063e58504fbfd739 | |
parent | 63f548921c268cc9f30af68bf9b41c80df0492ac (diff) |
Scripts/Spells: Deathbolt (#23531)
* Scripts/Spells: Deathbolt
* Rename 9999_99_99_99_world.sql to 2019_06_28_01_world.sql
-rw-r--r-- | sql/updates/world/3.3.5/2019_06_28_01_world.sql | 2 | ||||
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 13 | ||||
-rw-r--r-- | src/server/scripts/Northrend/zone_sholazar_basin.cpp | 46 |
3 files changed, 31 insertions, 30 deletions
diff --git a/sql/updates/world/3.3.5/2019_06_28_01_world.sql b/sql/updates/world/3.3.5/2019_06_28_01_world.sql new file mode 100644 index 00000000000..00b99addd44 --- /dev/null +++ b/sql/updates/world/3.3.5/2019_06_28_01_world.sql @@ -0,0 +1,2 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q12611_deathbolt'; +INSERT INTO `spell_script_names` VALUES (51854,'spell_q12611_deathbolt'); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 86264bfd967..7e52f85aa42 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3578,19 +3578,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) break; } - // Deathbolt from Thalgran Blightbringer - // reflected by Freya's Ward - // Retribution by Sevenfold Retribution - case 51854: - { - if (!unitTarget) - return; - if (unitTarget->HasAura(51845)) - unitTarget->CastSpell(m_caster, 51856, true); - else - m_caster->CastSpell(unitTarget, 51855, true); - break; - } // Summon Ghouls On Scarlet Crusade case 51904: { diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index 5c9538c7d27..0e8c0694415 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -15,23 +15,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Sholazar_Basin -SD%Complete: 100 -SDComment: Quest support: 12550, 12645, 12688, 12726, 13957 -SDCategory: Sholazar_Basin -EndScriptData */ - -/* ContentData -npc_engineer_helice -npc_jungle_punch_target -spell_q12620_the_lifewarden_wrath -spell_q12589_shoot_rjr -npc_haiphoon (Quest: "Song of Wind and Water") -npc_vics_flying_machine -spell_shango_tracks -EndContentData */ - #include "ScriptMgr.h" #include "CombatAI.h" #include "Map.h" @@ -772,6 +755,34 @@ public: } }; +enum ReturnedSevenfold +{ + SPELL_FREYAS_WARD = 51845, + SPELL_SEVENFOLD_RETRIBUTION = 51856, + SPELL_DEATHBOLT = 51855 +}; + +class spell_q12611_deathbolt : public SpellScript +{ + PrepareSpellScript(spell_q12611_deathbolt); + + void HandleScriptEffect(SpellEffIndex /* effIndex */) + { + Unit* caster = GetCaster(); + Unit* target = GetHitUnit(); + + if (target->HasAura(SPELL_FREYAS_WARD)) + target->CastSpell(caster, SPELL_SEVENFOLD_RETRIBUTION, true); + else + caster->CastSpell(target, SPELL_DEATHBOLT, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_q12611_deathbolt::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_sholazar_basin() { new npc_engineer_helice(); @@ -781,4 +792,5 @@ void AddSC_sholazar_basin() new npc_haiphoon(); new npc_vics_flying_machine(); new spell_shango_tracks(); + RegisterSpellScript(spell_q12611_deathbolt); } |