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:
@@ -0,0 +1,3 @@
|
|||||||
|
--
|
||||||
|
UPDATE `spell_script_names` SET `spell_id`=64579 WHERE `spell_id`=64568 AND `ScriptName`='spell_gen_proc_above_75';
|
||||||
|
UPDATE `spell_script_names` SET `spell_id`=64441 WHERE `spell_id`=64440 AND `ScriptName`='spell_gen_proc_above_75';
|
||||||
@@ -850,18 +850,24 @@ class spell_gen_fixate_aura : public AuraScript
|
|||||||
|
|
||||||
/* 64440 - Blade Warding
|
/* 64440 - Blade Warding
|
||||||
64568 - Blood Reserve */
|
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
|
void Register() override
|
||||||
{
|
{
|
||||||
DoCheckProc += AuraCheckProcFn(spell_gen_proc_above_75::CheckProc);
|
OnCheckCast += SpellCheckCastFn(spell_gen_proc_above_75::CheckLevel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user