mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Spells: Convert Avenging Wrath to spellscript
Closes #11896 Closes #3464
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pal_avenging_wrath';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(31884,'spell_pal_avenging_wrath');
|
||||
|
||||
--
|
||||
DELETE FROM `spell_proc_event` WHERE `entry`=-53375;
|
||||
@@ -6363,15 +6363,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
CastSpell(this, 57669, true, castItem, triggeredByAura);
|
||||
break;
|
||||
}
|
||||
// Sanctified Wrath
|
||||
if (dummySpell->SpellIconID == 3029)
|
||||
{
|
||||
triggered_spell_id = 57318;
|
||||
target = this;
|
||||
basepoints0 = triggerAmount;
|
||||
CastCustomSpell(target, triggered_spell_id, &basepoints0, &basepoints0, NULL, true, castItem, triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
// Righteous Vengeance
|
||||
if (dummySpell->SpellIconID == 3025)
|
||||
{
|
||||
|
||||
@@ -66,6 +66,9 @@ enum PaladinSpells
|
||||
|
||||
SPELL_PALADIN_RIGHTEOUS_DEFENSE_TAUNT = 31790,
|
||||
|
||||
SPELL_PALADIN_SANCTIFIED_WRATH = 57318,
|
||||
SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1 = 53375,
|
||||
|
||||
SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742,
|
||||
|
||||
SPELL_PALADIN_CONCENTRACTION_AURA = 19746,
|
||||
@@ -236,6 +239,52 @@ class spell_pal_aura_mastery_immune : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 31884 - Avenging Wrath
|
||||
class spell_pal_avenging_wrath : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pal_avenging_wrath() : SpellScriptLoader("spell_pal_avenging_wrath") { }
|
||||
|
||||
class spell_pal_avenging_wrath_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pal_avenging_wrath_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_SANCTIFIED_WRATH)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1, EFFECT_2))
|
||||
{
|
||||
int32 basepoints = aurEff->GetAmount();
|
||||
target->CastCustomSpell(target, SPELL_PALADIN_SANCTIFIED_WRATH, &basepoints, &basepoints, NULL, true, NULL, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->RemoveAurasDueToSpell(SPELL_PALADIN_SANCTIFIED_WRATH);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_pal_avenging_wrath_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_pal_avenging_wrath_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_pal_avenging_wrath_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 37877 - Blessing of Faith
|
||||
class spell_pal_blessing_of_faith : public SpellScriptLoader
|
||||
{
|
||||
@@ -1233,6 +1282,7 @@ void AddSC_paladin_spell_scripts()
|
||||
new spell_pal_ardent_defender();
|
||||
new spell_pal_aura_mastery();
|
||||
new spell_pal_aura_mastery_immune();
|
||||
new spell_pal_avenging_wrath();
|
||||
new spell_pal_blessing_of_faith();
|
||||
new spell_pal_blessing_of_sanctuary();
|
||||
new spell_pal_divine_sacrifice();
|
||||
|
||||
Reference in New Issue
Block a user