From 597069b7e90ba8c5ff4bbed08331d5f3fe9c76f6 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sun, 25 Apr 2021 18:15:34 +0200 Subject: [PATCH] Scripts/BoT: corrected the amount of Corruption gained from Cho'Gall's abilities --- .../world/4.3.4/2021_04_25_00_world.sql | 47 +++++++++++++ .../BastionOfTwilight/boss_chogall.cpp | 69 +++++-------------- 2 files changed, 66 insertions(+), 50 deletions(-) create mode 100644 sql/updates/world/4.3.4/2021_04_25_00_world.sql diff --git a/sql/updates/world/4.3.4/2021_04_25_00_world.sql b/sql/updates/world/4.3.4/2021_04_25_00_world.sql new file mode 100644 index 00000000000..4185290ab8c --- /dev/null +++ b/sql/updates/world/4.3.4/2021_04_25_00_world.sql @@ -0,0 +1,47 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN +('spell_chogall_corruption_significant', +'spell_chogall_corruption_normal', +'spell_chogall_corruption_normal_alternative', +'spell_chogall_corruption_script_effect', +'spell_chogall_corrupting_crash', +'spell_chogall_depravity', +'spell_chogall_spilled_blood_of_the_old_god', +'spell_chogall_corruption_sickness_script_effect', +'spell_chogall_sprayed_corruption', +'spell_chogall_corruption_of_the_old_god', +'spell_chogall_corruption_accelerated', +'spell_chogall_corrupted_bite'); + +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(81689, 'spell_chogall_corrupting_crash'), +(93184, 'spell_chogall_corrupting_crash'), +(93185, 'spell_chogall_corrupting_crash'), +(93186, 'spell_chogall_corrupting_crash'), +(81713, 'spell_chogall_depravity'), +(93175, 'spell_chogall_depravity'), +(93176, 'spell_chogall_depravity'), +(93177, 'spell_chogall_depravity'), +(81761, 'spell_chogall_spilled_blood_of_the_old_god'), +(93172, 'spell_chogall_spilled_blood_of_the_old_god'), +(93173, 'spell_chogall_spilled_blood_of_the_old_god'), +(93174, 'spell_chogall_spilled_blood_of_the_old_god'), +(81831, 'spell_chogall_corruption_sickness_script_effect'), +(93200, 'spell_chogall_corruption_sickness_script_effect'), +(93201, 'spell_chogall_corruption_sickness_script_effect'), +(93202, 'spell_chogall_corruption_sickness_script_effect'), +(82919, 'spell_chogall_sprayed_corruption'), +(93108, 'spell_chogall_sprayed_corruption'), +(93109, 'spell_chogall_sprayed_corruption'), +(93110, 'spell_chogall_sprayed_corruption'), +(82363, 'spell_chogall_corruption_of_the_old_god'), +(93169, 'spell_chogall_corruption_of_the_old_god'), +(93170, 'spell_chogall_corruption_of_the_old_god'), +(93171, 'spell_chogall_corruption_of_the_old_god'), +(81943, 'spell_chogall_corruption_accelerated'), +(93196, 'spell_chogall_corruption_accelerated'), +(93197, 'spell_chogall_corruption_accelerated'), +(93198, 'spell_chogall_corruption_accelerated'), +(81775, 'spell_chogall_corrupted_bite'), +(93209, 'spell_chogall_corrupted_bite'), +(93210, 'spell_chogall_corrupted_bite'), +(93211, 'spell_chogall_corrupted_bite'); diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp index e9fe4c3d9e1..78648a617bc 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp @@ -183,9 +183,6 @@ enum Corruption MAX_CORRUPTION = 100, CORRUPTION_ACHIEVEMENT_CAP = 30, - CORRUPTION_NORMAL = 1, - CORRUPTION_SIGNIFICANT = 10, - CORRUPTION_LEVEL_ACCELERATED = 25, CORRUPTION_LEVEL_SICKNESS = 50, CORRUPTION_LEVEL_MALFORMATION = 75, @@ -1293,56 +1290,24 @@ class spell_chogall_consume_blood_of_the_old_god_triggered final : public SpellS } }; -class spell_chogall_corruption_significant final : public SpellScript +class spell_chogall_corruption_script_effect final : public SpellScript { +public: + spell_chogall_corruption_script_effect(uint8 corruptionAmount, uint8 spellEffectIndex) : + _corruptionAmount(corruptionAmount), _spellEffectIndex(spellEffectIndex) { } + void HandleScriptEffect(SpellEffIndex /*effIndex*/) { - CorruptionHandler::AddCorruption(GetHitUnit(), CORRUPTION_SIGNIFICANT); + CorruptionHandler::AddCorruption(GetHitUnit(), _corruptionAmount); } void Register() override { - OnEffectHitTarget.Register(&spell_chogall_corruption_significant::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); - } -}; - -class spell_chogall_corruption_normal final : public SpellScript -{ - void HandleScriptEffect(SpellEffIndex /*effIndex*/) - { - CorruptionHandler::AddCorruption(GetHitUnit(), CORRUPTION_NORMAL); - } - - void Register() override - { - OnEffectHitTarget.Register(&spell_chogall_corruption_normal::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); - } -}; - -class spell_chogall_corruption_normal_alternative final : public SpellScript -{ - void HandleScriptEffect(SpellEffIndex /*effIndex*/) - { - CorruptionHandler::AddCorruption(GetHitUnit(), CORRUPTION_NORMAL); - } - - void Register() override - { - OnEffectHitTarget.Register(&spell_chogall_corruption_normal_alternative::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); - } -}; - -class spell_chogall_corruption_of_the_old_god final : public SpellScript -{ - void HandleScriptEffect(SpellEffIndex /*effIndex*/) - { - CorruptionHandler::AddCorruption(GetHitUnit(), CORRUPTION_NORMAL); - } - - void Register() override - { - OnEffectHitTarget.Register(&spell_chogall_corruption_of_the_old_god::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); + OnEffectHitTarget.Register(&spell_chogall_corruption_script_effect::HandleScriptEffect, _spellEffectIndex, SPELL_EFFECT_SCRIPT_EFFECT); } +private: + uint8 _corruptionAmount; + uint8 _spellEffectIndex; }; class spell_chogall_corruption_sickness final : public AuraScript @@ -1420,7 +1385,7 @@ class spell_chogall_debilitating_beam final : public AuraScript { void HandlePeriodic(AuraEffect const* /*aurEff*/) { - CorruptionHandler::AddCorruption(GetTarget(), CORRUPTION_NORMAL); + CorruptionHandler::AddCorruption(GetTarget(), 2); } void Register() override @@ -1469,10 +1434,14 @@ void AddSC_boss_chogall() RegisterSpellScript(spell_chogall_worshipping); RegisterSpellScript(spell_chogall_consume_blood_of_the_old_god); RegisterSpellScript(spell_chogall_consume_blood_of_the_old_god_triggered); - RegisterSpellScript(spell_chogall_corruption_significant); - RegisterSpellScript(spell_chogall_corruption_normal); - RegisterSpellScript(spell_chogall_corruption_normal_alternative); - RegisterSpellScript(spell_chogall_corruption_of_the_old_god); + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_corrupting_crash", 10, EFFECT_1); + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_depravity", 10, EFFECT_1); + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_spilled_blood_of_the_old_god", 5, EFFECT_1); + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_corruption_sickness_script_effect", 5, EFFECT_1); // @todo: validate + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_sprayed_corruption", 5, EFFECT_1); + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_corruption_of_the_old_god", 1, EFFECT_1); + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_corruption_accelerated", 2, EFFECT_0); + RegisterSpellScriptWithArgs(spell_chogall_corruption_script_effect, "spell_chogall_corrupted_bite", 2, EFFECT_0); RegisterSpellScript(spell_chogall_corruption_sickness); RegisterSpellScript(spell_chogall_corruption_malformation); RegisterSpellScript(spell_chogall_shadow_bolt);