Scripts/Spells: Fix priest Mind Bomb (#27415)

This commit is contained in:
aquadeus
2021-12-17 12:27:12 +01:00
committed by GitHub
parent 05037bd936
commit 01ac538cd2
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pri_mind_bomb';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(205369, 'spell_pri_mind_bomb');

View File

@@ -55,6 +55,7 @@ enum PriestSpells
SPELL_PRIEST_ITEM_EFFICIENCY = 37595,
SPELL_PRIEST_LEAP_OF_FAITH_EFFECT = 92832,
SPELL_PRIEST_LEVITATE_EFFECT = 111759,
SPELL_PRIEST_MIND_BOMB_STUN = 226943,
SPELL_PRIEST_ORACULAR_HEAL = 26170,
SPELL_PRIEST_PENANCE_R1 = 47540,
SPELL_PRIEST_PENANCE_R1_DAMAGE = 47758,
@@ -541,6 +542,29 @@ public:
}
};
// 205369 - Mind Bomb
class spell_pri_mind_bomb : public AuraScript
{
PrepareAuraScript(spell_pri_mind_bomb);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PRIEST_MIND_BOMB_STUN });
}
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH || GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
if (Unit* caster = GetCaster())
caster->CastSpell(GetTarget()->GetPosition(), SPELL_PRIEST_MIND_BOMB_STUN, true);
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_pri_mind_bomb::RemoveEffect, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
// 47540 - Penance
class spell_pri_penance : public SpellScriptLoader
{
@@ -1330,6 +1354,7 @@ void AddSC_priest_spell_scripts()
new spell_pri_item_t6_trinket();
new spell_pri_leap_of_faith_effect_trigger();
new spell_pri_levitate();
RegisterAuraScript(spell_pri_mind_bomb);
new spell_pri_penance();
RegisterSpellScript(spell_pri_power_word_radiance);
new spell_pri_power_word_shield();