Scripts/Spells: Implement monk talent "Pressure Points" with Paralysis (#30594)

This commit is contained in:
Aqua Deus
2025-01-13 13:47:51 +01:00
committed by GitHub
parent faf8efc25d
commit 66e200da24
2 changed files with 31 additions and 0 deletions
@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_monk_pressure_points';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(115078, 'spell_monk_pressure_points');
+28
View File
@@ -40,6 +40,7 @@ enum MonkSpells
SPELL_MONK_MORTAL_WOUNDS = 115804,
SPELL_MONK_POWER_STRIKE_PROC = 129914,
SPELL_MONK_POWER_STRIKE_ENERGIZE = 121283,
SPELL_MONK_PRESSURE_POINTS = 450432,
SPELL_MONK_PROVOKE_SINGLE_TARGET = 116189,
SPELL_MONK_PROVOKE_AOE = 118635,
SPELL_MONK_NO_FEATHER_FALL = 79636,
@@ -208,6 +209,32 @@ class spell_monk_power_strike_proc : public AuraScript
}
};
// 115078 - Paralysis
class spell_monk_pressure_points : public SpellScript
{
bool Validate(SpellInfo const* spellInfo) override
{
return ValidateSpellInfo({ SPELL_MONK_PRESSURE_POINTS })
&& ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } })
&& spellInfo->GetEffect(EFFECT_2).IsEffect(SPELL_EFFECT_DISPEL);
}
bool Load() override
{
return !GetCaster()->HasAura(SPELL_MONK_PRESSURE_POINTS);
}
static void PreventDispel(WorldObject*& target)
{
target = nullptr;
}
void Register() override
{
OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_monk_pressure_points::PreventDispel, EFFECT_2, TARGET_UNIT_TARGET_ENEMY);
}
};
// 115546 - Provoke
class spell_monk_provoke : public SpellScript
{
@@ -617,6 +644,7 @@ void AddSC_monk_spell_scripts()
RegisterSpellScript(spell_monk_open_palm_strikes);
RegisterSpellScript(spell_monk_power_strike_periodic);
RegisterSpellScript(spell_monk_power_strike_proc);
RegisterSpellScript(spell_monk_pressure_points);
RegisterSpellScript(spell_monk_provoke);
RegisterSpellScript(spell_monk_rising_sun_kick);
RegisterSpellScript(spell_monk_roll);