mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Spells: Implement priest talent Mental Decay (#31480)
This commit is contained in:
7
sql/updates/world/master/2026_01_11_02_world.sql
Normal file
7
sql/updates/world/master/2026_01_11_02_world.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pri_mental_decay';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(375994,'spell_pri_mental_decay');
|
||||
|
||||
DELETE FROM `spell_proc` WHERE `SpellId` IN (375994);
|
||||
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
|
||||
(375994,0x00,6,0x00000000,0x00000000,0x00000040,0x00000000,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0,0,0,0); -- Mental Decay
|
||||
@@ -2641,6 +2641,42 @@ class spell_pri_lights_wrath : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 375994 - Mental Decay
|
||||
class spell_pri_mental_decay : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_SHADOW_WORD_PAIN, SPELL_PRIEST_VAMPIRIC_TOUCH });
|
||||
}
|
||||
|
||||
static void HandleEffectProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
|
||||
{
|
||||
Unit* caster = eventInfo.GetActor();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
int32 durationExtend = aurEff->GetAmount() * IN_MILLISECONDS;
|
||||
|
||||
if (Aura* shadowWordPain = target->GetOwnedAura(SPELL_PRIEST_SHADOW_WORD_PAIN, caster->GetGUID()))
|
||||
{
|
||||
shadowWordPain->SetMaxDuration(shadowWordPain->GetDuration() + durationExtend);
|
||||
shadowWordPain->SetDuration(shadowWordPain->GetDuration() + durationExtend);
|
||||
}
|
||||
|
||||
if (Aura* vampiricTouch = target->GetOwnedAura(SPELL_PRIEST_VAMPIRIC_TOUCH, caster->GetGUID()))
|
||||
{
|
||||
vampiricTouch->SetMaxDuration(vampiricTouch->GetDuration() + durationExtend);
|
||||
vampiricTouch->SetDuration(vampiricTouch->GetDuration() + durationExtend);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_mental_decay::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 205369 - Mind Bomb
|
||||
class spell_pri_mind_bomb : public AuraScript
|
||||
{
|
||||
@@ -5125,6 +5161,7 @@ void AddSC_priest_spell_scripts()
|
||||
RegisterSpellScript(spell_pri_leap_of_faith_effect_trigger);
|
||||
RegisterSpellScript(spell_pri_levitate);
|
||||
RegisterSpellScript(spell_pri_lights_wrath);
|
||||
RegisterSpellScript(spell_pri_mental_decay);
|
||||
RegisterSpellScript(spell_pri_mind_bomb);
|
||||
RegisterSpellScript(spell_pri_mind_devourer);
|
||||
RegisterSpellAndAuraScriptPair(spell_pri_mind_devourer_buff, spell_pri_mind_devourer_buff_aura);
|
||||
|
||||
Reference in New Issue
Block a user