mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
refactor(Core/Spells): Implement QAston Proc System (#11079)
* . * sql * . * . * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * Update spell_item.cpp * Update Unit.cpp * 16 * 17 * 18 * 19 * 20 * 21 * Update Unit.cpp * REVERT UltraNIX Commit * 22 * 23 * . * . * . * warrior * warlock * shaman rogue priest paladin mage * spell item * hunter * druid * dk * war * error style * Update rev_1647677899565690722.sql * Update rev_1647677899565690722.sql * Update rev_1647677899565690722.sql * . * DOND DEL ME WAD DO DO * error 2 * . * . * . * FIX * Update SpellInfoCorrections.cpp * Update SpellInfoCorrections.cpp * . * ja genau * Update .gitignore * . * . * ., * . * . * . * . * Update Unit.cpp
This commit is contained in:
committed by
GitHub
parent
5189b43a28
commit
cbd3fd0967
@@ -848,8 +848,7 @@ class spell_gen_fixate_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
/* 64440 - Blade Warding
|
||||
64568 - Blood Reserve */
|
||||
// 64440 - Blade Warding
|
||||
class spell_gen_proc_above_75 : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_proc_above_75);
|
||||
@@ -3634,6 +3633,53 @@ class spell_gen_bandage : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// Blood Reserve - 64568
|
||||
enum BloodReserve
|
||||
{
|
||||
SPELL_GEN_BLOOD_RESERVE_AURA = 64568,
|
||||
SPELL_GEN_BLOOD_RESERVE_HEAL = 64569
|
||||
};
|
||||
|
||||
class spell_gen_blood_reserve : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_blood_reserve);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_GEN_BLOOD_RESERVE_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (Unit* caster = eventInfo.GetActionTarget())
|
||||
{
|
||||
if (caster->HealthBelowPct(35))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* caster = eventInfo.GetActionTarget();
|
||||
caster->CastCustomSpell(SPELL_GEN_BLOOD_RESERVE_HEAL, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), caster, TRIGGERED_FULL_MASK, nullptr, aurEff);
|
||||
caster->RemoveAura(SPELL_GEN_BLOOD_RESERVE_AURA);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_gen_blood_reserve::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_gen_blood_reserve::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
enum ParalyticPoison
|
||||
{
|
||||
SPELL_PARALYSIS = 35202
|
||||
|
||||
Reference in New Issue
Block a user