fix(Scripts/Spells): Fixed level requirements for Blade Ward and Bloo… (#14107)

fix(Scripts/Spells): Fixed level requirements for Blade Ward and Blood Draining enchants.

Fixed Blood Draining proc.
Fixes #12131
This commit is contained in:
UltraNix
2022-12-12 13:57:03 +01:00
committed by GitHub
parent 069864cda9
commit 4860989242
2 changed files with 14 additions and 5 deletions

View File

@@ -850,18 +850,24 @@ class spell_gen_fixate_aura : public AuraScript
/* 64440 - Blade Warding
64568 - Blood Reserve */
class spell_gen_proc_above_75 : public AuraScript
class spell_gen_proc_above_75 : public SpellScript
{
PrepareAuraScript(spell_gen_proc_above_75);
PrepareSpellScript(spell_gen_proc_above_75);
bool CheckProc(ProcEventInfo& eventInfo)
SpellCastResult CheckLevel()
{
return eventInfo.GetActor() && eventInfo.GetActor()->getLevel() >= 75;
Unit* caster = GetCaster();
if (caster->getLevel() < 75)
{
return SPELL_FAILED_LOWLEVEL;
}
return SPELL_CAST_OK;
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_gen_proc_above_75::CheckProc);
OnCheckCast += SpellCheckCastFn(spell_gen_proc_above_75::CheckLevel);
}
};