fix(Scripts/ShadowLabs): Script Mark of Malice (#17773)

This commit is contained in:
avarishd
2023-11-18 15:18:10 +02:00
committed by GitHub
parent dd5af5390b
commit d05929b862
2 changed files with 36 additions and 0 deletions

View File

@@ -99,7 +99,40 @@ public:
};
};
// 33493 - Mark of Malice
enum MarkOfMalice
{
SPELL_MARK_OF_MALICE_TRIGGERED = 33494
};
class spell_mark_of_malice : public AuraScript
{
PrepareAuraScript(spell_mark_of_malice);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_MARK_OF_MALICE_TRIGGERED });
}
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
if (GetCharges() > 1)
{
return;
}
GetTarget()->CastSpell(GetTarget(), SPELL_MARK_OF_MALICE_TRIGGERED, true);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_mark_of_malice::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
void AddSC_instance_shadow_labyrinth()
{
new instance_shadow_labyrinth();
RegisterSpellScript(spell_mark_of_malice);
}