yogg grim reprisal

This commit is contained in:
Jelle Meeus
2024-06-09 19:11:03 +02:00
parent 36c72c7633
commit 6aecb24a15

View File

@@ -2848,42 +2848,31 @@ class spell_yogg_saron_target_selectors : public SpellScript
};
// 63305 - Grim Reprisal
class spell_yogg_saron_grim_reprisal : public SpellScriptLoader
class spell_yogg_saron_grim_reprisal_aura : public AuraScript
{
public:
spell_yogg_saron_grim_reprisal() : SpellScriptLoader("spell_yogg_saron_grim_reprisal") { }
PrepareAuraScript(spell_yogg_saron_grim_reprisal_aura);
class spell_yogg_saron_grim_reprisal_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_yogg_saron_grim_reprisal_AuraScript);
return ValidateSpellInfo({ SPELL_GRIM_REPRISAL_DAMAGE });
}
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_GRIM_REPRISAL_DAMAGE });
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())
{
return;
}
int32 damage = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), 60);
GetTarget()->CastCustomSpell(SPELL_GRIM_REPRISAL_DAMAGE, SPELLVALUE_BASE_POINT0, damage, damageInfo->GetAttacker(), true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_yogg_saron_grim_reprisal_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
return new spell_yogg_saron_grim_reprisal_AuraScript();
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())
{
return;
}
int32 damage = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), 60);
GetTarget()->CastCustomSpell(SPELL_GRIM_REPRISAL_DAMAGE, SPELLVALUE_BASE_POINT0, damage, damageInfo->GetAttacker(), true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_yogg_saron_grim_reprisal_aura::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -2988,7 +2977,7 @@ void AddSC_boss_yoggsaron()
RegisterSpellScript(spell_yogg_saron_empowering_shadows);
RegisterSpellScript(spell_yogg_saron_in_the_maws_of_the_old_god);
RegisterSpellScript(spell_yogg_saron_target_selectors);
new spell_yogg_saron_grim_reprisal();
RegisterSpellScript(spell_yogg_saron_grim_reprisal_aura);
// ACHIEVEMENTS
new achievement_yogg_saron_drive_me_crazy();