Scripts/BoT: corrected the amount of Corruption gained from Cho'Gall's abilities

This commit is contained in:
Ovahlord
2021-04-25 18:15:34 +02:00
parent f3e0650886
commit 597069b7e9
2 changed files with 66 additions and 50 deletions

View File

@@ -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');

View File

@@ -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);