mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/Spell): Fix Void Zone damage calcs for Netherspite, Blaumeux (#18807)
* fix(Scripts/Spell): Fix Void Zone damage calcs for Netherspite, Blaumeux * remove blank line * remove four_horsement_consumption SpellScript * update comment
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 28865;
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(28865,'spell_gen_consumption');
|
||||
|
||||
DELETE FROM `creature_template_spell` WHERE `CreatureID` = 16697;
|
||||
|
||||
UPDATE `creature_template` SET `ScriptName` = '', `AIName` = 'SmartAI' WHERE `entry` = 16697;
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 16697);
|
||||
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`, `event_param6`, `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
|
||||
(16697, 0, 0, 0, 60, 0, 100, 0, 0, 0, 2500, 2500, 0, 0, 11, 28865, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Void Zone - On Update - Cast \'Consumption\''),
|
||||
(16697, 0, 1, 0, 37, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Void Zone - On Initialize - Set Reactstate Passive');
|
||||
@@ -437,26 +437,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_four_horsemen_consumption : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_four_horsemen_consumption);
|
||||
|
||||
void HandleDamageCalc(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
uint32 damage = GetCaster()->GetMap()->ToInstanceMap()->GetDifficulty() == REGULAR_DIFFICULTY ? 2750 : 4250;
|
||||
SetHitDamage(damage);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_four_horsemen_consumption::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_four_horsemen()
|
||||
{
|
||||
new boss_four_horsemen();
|
||||
new spell_four_horsemen_mark();
|
||||
RegisterSpellScript(spell_four_horsemen_consumption);
|
||||
}
|
||||
|
||||
|
||||
@@ -5134,6 +5134,43 @@ class spell_gen_choking_vines : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 28865 - Consumption
|
||||
class spell_gen_consumption : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_consumption);
|
||||
|
||||
void CalculateDamage(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Map* map = GetCaster()->GetMap();
|
||||
if (!map)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int32 value = 0;
|
||||
if (map->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) // NAXX25 N
|
||||
{
|
||||
value = urand(4500, 4700);
|
||||
}
|
||||
else if (map->GetId() == 533) // NAXX10 N
|
||||
{
|
||||
value = urand(3000, 3200);
|
||||
}
|
||||
else if (map->GetId() == 532) // Karazhan
|
||||
{
|
||||
value = urand(1110, 1310);
|
||||
}
|
||||
if (value)
|
||||
{
|
||||
SetEffectValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectLaunchTarget += SpellEffectFn(spell_gen_consumption::CalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -5287,5 +5324,6 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_jubling_cooldown);
|
||||
RegisterSpellScript(spell_gen_yehkinya_bramble);
|
||||
RegisterSpellScript(spell_gen_choking_vines);
|
||||
RegisterSpellScript(spell_gen_consumption);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user