mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/AzjolNerub): Fix Drain Power spell (#22933)
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
--
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_azjol_drain_power';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(54314, 'spell_azjol_drain_power'),
|
||||||
|
(59354, 'spell_azjol_drain_power');
|
||||||
|
|
||||||
|
DELETE FROM `spelldifficulty_dbc` WHERE `ID` IN (54315, 54314, 54309);
|
||||||
|
INSERT INTO `spelldifficulty_dbc` (`ID`, `DifficultySpellID_1`, `DifficultySpellID_2`) VALUES
|
||||||
|
(54315, 54315, 59355),
|
||||||
|
(54314, 54314, 59354),
|
||||||
|
(54309, 54309, 59352);
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 29128) AND (`source_type` = 0) AND (`id` IN (0, 1, 2, 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`, `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
|
||||||
|
(29128, 0, 0, 0, 0, 0, 100, 0, 0, 10000, 10000, 10000, 0, 0, 11, 54314, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Prime Guard - In Combat - Cast \'Drain Power\''),
|
||||||
|
(29128, 0, 2, 0, 0, 0, 100, 0, 6000, 12000, 12000, 25000, 0, 0, 11, 54309, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Prime Guard - In Combat - Cast \'Mark of Darkness\'');
|
||||||
@@ -126,9 +126,36 @@ class spell_azjol_nerub_web_wrap_aura : public AuraScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum DrainPowerSpells
|
||||||
|
{
|
||||||
|
SPELL_DRAIN_POWER_AURA = 54315
|
||||||
|
};
|
||||||
|
|
||||||
|
// 54314, 59354 - Drain Power
|
||||||
|
class spell_azjol_drain_power : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_azjol_drain_power);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({ SPELL_DRAIN_POWER_AURA });
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||||
|
{
|
||||||
|
GetCaster()->CastSpell(GetCaster(), SPELL_DRAIN_POWER_AURA, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_azjol_drain_power::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_instance_azjol_nerub()
|
void AddSC_instance_azjol_nerub()
|
||||||
{
|
{
|
||||||
new instance_azjol_nerub();
|
new instance_azjol_nerub();
|
||||||
RegisterSpellScript(spell_azjol_nerub_fixate);
|
RegisterSpellScript(spell_azjol_nerub_fixate);
|
||||||
RegisterSpellScript(spell_azjol_nerub_web_wrap_aura);
|
RegisterSpellScript(spell_azjol_nerub_web_wrap_aura);
|
||||||
|
RegisterSpellScript(spell_azjol_drain_power);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user