refactor(Core/Spells): QAston proc system (#24233)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: QAston <qaston@gmail.com>
Co-authored-by: joschiwald <joschiwald@online.de>
Co-authored-by: ariel- <ariel-@users.noreply.github.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: blinkysc <your-github-email@example.com>
Co-authored-by: Tereneckla <Tereneckla@users.noreply.github.com>
Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-02-18 05:31:53 -06:00
committed by GitHub
parent 65a869ea27
commit 4599f26ae9
76 changed files with 22915 additions and 5181 deletions

View File

@@ -1342,6 +1342,28 @@ public:
}
};
// 72176 - Blood Beast Blood Link
class spell_deathbringer_blood_beast_blood_link : public AuraScript
{
PrepareAuraScript(spell_deathbringer_blood_beast_blood_link);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_BLOOD_LINK_DUMMY });
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
eventInfo.GetActionTarget()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, 3, nullptr, true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_beast_blood_link::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
void AddSC_boss_deathbringer_saurfang()
{
new boss_deathbringer_saurfang();
@@ -1350,6 +1372,7 @@ void AddSC_boss_deathbringer_saurfang()
new npc_saurfang_event();
RegisterSpellScript(spell_deathbringer_blood_link_aura);
RegisterSpellScript(spell_deathbringer_blood_link_blood_beast_aura);
RegisterSpellScript(spell_deathbringer_blood_beast_blood_link);
RegisterSpellScript(spell_deathbringer_blood_link);
RegisterSpellAndAuraScriptPair(spell_deathbringer_blood_power, spell_deathbringer_blood_power_aura);
RegisterSpellScript(spell_deathbringer_blood_nova_targeting);

View File

@@ -1522,11 +1522,37 @@ class spell_putricide_regurgitated_ooze : public SpellScript
}
};
// 71770 - Ooze Tank Protection
class spell_putricide_ooze_tank_protection : public AuraScript
{
PrepareAuraScript(spell_putricide_ooze_tank_protection);
bool Validate(SpellInfo const* spellInfo) override
{
return ValidateSpellInfo({ spellInfo->Effects[EFFECT_0].TriggerSpell, spellInfo->Effects[EFFECT_1].TriggerSpell });
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
Unit* actionTarget = eventInfo.GetActionTarget();
actionTarget->CastSpell(nullptr, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_putricide_ooze_tank_protection::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc += AuraEffectProcFn(spell_putricide_ooze_tank_protection::HandleProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
void AddSC_boss_professor_putricide()
{
new boss_professor_putricide();
new npc_volatile_ooze();
new npc_gas_cloud();
RegisterSpellScript(spell_putricide_ooze_tank_protection);
RegisterSpellScript(spell_putricide_slime_puddle);
RegisterSpellScript(spell_putricide_slime_puddle_spawn);
RegisterSpellScript(spell_putricide_grow_stacker_aura);

View File

@@ -56,6 +56,9 @@ enum XT002Spells
SPELL_SPARK_SUMMON = 64210,
SPELL_SPARK_DAMAGE = 64227,
SPELL_SPARK_MELEE = 64230,
// ACHIEVEMENT
SPELL_ACHIEVEMENT_CREDIT_NERF_SCRAPBOTS = 65037,
};
enum XT002Events
@@ -946,6 +949,36 @@ public:
}
};
// 65032 - 321 Boombot Aura
class spell_xt002_321_boombot_aura : public AuraScript
{
PrepareAuraScript(spell_xt002_321_boombot_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_ACHIEVEMENT_CREDIT_NERF_SCRAPBOTS });
}
bool CheckProc(ProcEventInfo& eventInfo)
{
if (eventInfo.GetActionTarget()->GetEntry() != NPC_XS013_SCRAPBOT)
return false;
return true;
}
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
if (InstanceScript* instance = eventInfo.GetActor()->GetInstanceScript())
instance->DoCastSpellOnPlayers(SPELL_ACHIEVEMENT_CREDIT_NERF_SCRAPBOTS);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_xt002_321_boombot_aura::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_xt002_321_boombot_aura::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
void AddSC_boss_xt002()
{
// Npcs
@@ -961,6 +994,7 @@ void AddSC_boss_xt002()
RegisterSpellAndAuraScriptPair(spell_xt002_gravity_bomb, spell_xt002_gravity_bomb_aura);
RegisterSpellScript(spell_xt002_gravity_bomb_damage);
RegisterSpellAndAuraScriptPair(spell_xt002_searing_light_spawn_life_spark, spell_xt002_searing_light_spawn_life_spark_aura);
RegisterSpellScript(spell_xt002_321_boombot_aura);
// Achievements
new achievement_xt002_nerf_engineering();

View File

@@ -203,6 +203,44 @@ enum TickingTimeBomb
SPELL_TICKING_TIME_BOMB_EXPLODE = 59687
};
enum SecondWind
{
SPELL_SECOND_WIND_TRIGGER = 42771
};
// 42770 - Second Wind
class spell_uk_second_wind : public AuraScript
{
PrepareAuraScript(spell_uk_second_wind);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_SECOND_WIND_TRIGGER });
}
bool CheckProc(ProcEventInfo& eventInfo)
{
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo)
return false;
return (spellInfo->GetAllEffectsMechanicMask() & ((1 << MECHANIC_ROOT) | (1 << MECHANIC_STUN))) != 0;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
Unit* caster = eventInfo.GetActionTarget();
caster->CastSpell(caster, SPELL_SECOND_WIND_TRIGGER, true, nullptr, aurEff);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_uk_second_wind::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_uk_second_wind::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
class spell_ticking_time_bomb_aura : public AuraScript
{
PrepareAuraScript(spell_ticking_time_bomb_aura);
@@ -231,5 +269,6 @@ void AddSC_utgarde_keep()
RegisterUtgardeKeepCreatureAI(npc_dragonflayer_forge_master);
RegisterUtgardeKeepCreatureAI(npc_enslaved_proto_drake);
RegisterSpellScript(spell_uk_second_wind);
RegisterSpellScript(spell_ticking_time_bomb_aura);
}