diff options
-rw-r--r-- | sql/updates/world/3.3.5/2019_12_07_02_world.sql | 12 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 22 |
2 files changed, 34 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/2019_12_07_02_world.sql b/sql/updates/world/3.3.5/2019_12_07_02_world.sql new file mode 100644 index 00000000000..e10f92e112a --- /dev/null +++ b/sql/updates/world/3.3.5/2019_12_07_02_world.sql @@ -0,0 +1,12 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id`=46444 AND `ScriptName`='spell_q11896_weakness_to_lightning_46444'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES (46444,'spell_q11896_weakness_to_lightning_46444'); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25752,25753,25758) AND `source_type`=0 AND `id`IN (5); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25792) AND `source_type`=0 AND `id`IN (3); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(25752, 0, 5, 0, 6, 1, 100, 0, 0, 0, 0, 0, 0, 11, 46443, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Scavenge-bot 004-A8 - On Just Died - Cast 'Weakness to Lightning: Kill Credit Direct to Player' (Phase 1)"), +(25753, 0, 5, 0, 6, 1, 100, 0, 0, 0, 0, 0, 0, 11, 46444, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Sentry-bot 57-K - On Just Died - Cast 'Weakness to Lightning: Kill Credit from Pet' (Phase 1)"), +(25758, 0, 5, 0, 6, 1, 100, 0, 0, 0, 0, 0, 0, 11, 46444, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Defendo-tank 66D - On Just Died - Cast 'Weakness to Lightning: Kill Credit from Pet' (Phase 1)"), +(25792, 0, 3, 0, 6, 1, 100, 0, 0, 0, 0, 0, 0, 11, 46444, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Scavenge-bot 005-B6 - On Just Died - Cast 'Weakness to Lightning: Kill Credit from Pet' (Phase 1)"); +UPDATE `smart_scripts` SET `action_param1`=46444, `action_param2`=2 WHERE `entryorguid` IN (25752) AND `id`=2; +UPDATE `smart_scripts` SET `action_param2`=2 WHERE `entryorguid` IN (25752,25753,25758,25792) AND `action_param1` IN (46443,46444); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index da6a701fd6e..66a07ac028e 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2893,6 +2893,27 @@ public: } }; +class spell_q11896_weakness_to_lightning_46444 : public SpellScript +{ + PrepareSpellScript(spell_q11896_weakness_to_lightning_46444); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Unit* target = GetHitUnit()) + { + if (Unit* owner = target->GetOwner()) + { + target->CastSpell(owner, GetEffectValue(), true); + } + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_q11896_weakness_to_lightning_46444::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -2949,6 +2970,7 @@ void AddSC_quest_spell_scripts() RegisterSpellScript(spell_q13264_q13276_q13288_q13289_area_restrict_abom); RegisterSpellScript(spell_q13264_q13276_q13288_q13289_assign_credit_to_master); RegisterSpellScript(spell_q12690_burst_at_the_seams_52510); + RegisterSpellScript(spell_q11896_weakness_to_lightning_46444); new spell_q12308_escape_from_silverbrook_summon_worgen(); new spell_q12308_escape_from_silverbrook(); new spell_q12641_death_comes_from_on_high(); |