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:
IntelligentQuantum
2022-10-02 21:09:34 +03:30
committed by GitHub
parent 5189b43a28
commit cbd3fd0967
54 changed files with 9126 additions and 5957 deletions

View File

@@ -857,7 +857,7 @@ public:
resilienceReduction = damage - resilienceReduction;
damage -= resilienceReduction;
uint32 mitigated_damage = resilienceReduction;
DamageInfo dmgInfo(caster, plr, damage, GetSpellInfo(), GetSpellInfo()->GetSchoolMask(), DOT, mitigated_damage);
DamageInfo dmgInfo(caster, plr, damage, GetSpellInfo(), GetSpellInfo()->GetSchoolMask(), DOT, BASE_ATTACK, mitigated_damage);
Unit::CalcAbsorbResist(dmgInfo);
Unit::DealDamageMods(plr, damage, &absorb);
int32 overkill = damage - plr->GetHealth();

View File

@@ -1589,6 +1589,26 @@ public:
{
return new spell_taldaram_ball_of_inferno_flame_SpellScript();
}
class spell_taldaram_ball_of_inferno_flame_AuraScript : public AuraScript
{
PrepareAuraScript(spell_taldaram_ball_of_inferno_flame_AuraScript);
void HandleStackDrop(ProcEventInfo& /*eventInfo*/)
{
ModStackAmount(-1);
}
void Register() override
{
OnProc += AuraProcFn(spell_taldaram_ball_of_inferno_flame_AuraScript::HandleStackDrop);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_taldaram_ball_of_inferno_flame_AuraScript();
}
};
class spell_valanar_kinetic_bomb : public SpellScriptLoader

View File

@@ -1061,7 +1061,7 @@ public:
{
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
SpellInfo const* procSpell = eventInfo.GetSpellInfo();
return eventInfo.GetActor() && eventInfo.GetActionTarget() && ((damageInfo && damageInfo->GetDamage()) || eventInfo.GetHitMask() & PROC_EX_ABSORB) && procSpell && procSpell->SpellIconID != 2731; // Xinef: Mark of the Fallen Champion
return eventInfo.GetActor() && eventInfo.GetActionTarget() && ((damageInfo && damageInfo->GetDamage()) || eventInfo.GetHitMask() & PROC_HIT_ABSORB) && procSpell && procSpell->SpellIconID != 2731; // Xinef: Mark of the Fallen Champion
}
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
@@ -1115,7 +1115,7 @@ public:
{
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
SpellInfo const* procSpell = eventInfo.GetSpellInfo();
return eventInfo.GetActor() && eventInfo.GetActionTarget() && ((damageInfo && damageInfo->GetDamage()) || eventInfo.GetHitMask() & PROC_EX_ABSORB) && (!procSpell || procSpell->SpellIconID != 2731); // Xinef: Mark of the Fallen Champion
return eventInfo.GetActor() && eventInfo.GetActionTarget() && ((damageInfo && damageInfo->GetDamage()) || eventInfo.GetHitMask() & PROC_HIT_ABSORB) && (!procSpell || procSpell->SpellIconID != 2731); // Xinef: Mark of the Fallen Champion
}
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
@@ -1404,6 +1404,41 @@ public:
}
};
// 72176 - Blood Beast's Blood Link
class spell_deathbringer_blood_beast_blood_link : public SpellScriptLoader
{
public:
spell_deathbringer_blood_beast_blood_link() : SpellScriptLoader("spell_deathbringer_blood_beast_blood_link") { }
class spell_deathbringer_blood_beast_blood_link_AuraScript : public AuraScript
{
PrepareAuraScript(spell_deathbringer_blood_beast_blood_link_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_BLOOD_LINK_DUMMY))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
eventInfo.GetProcTarget()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, 3, (Unit*)nullptr, true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_beast_blood_link_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_deathbringer_blood_beast_blood_link_AuraScript();
}
};
void AddSC_boss_deathbringer_saurfang()
{
new boss_deathbringer_saurfang();
@@ -1418,4 +1453,5 @@ void AddSC_boss_deathbringer_saurfang()
new spell_deathbringer_boiling_blood();
new achievement_ive_gone_and_made_a_mess();
new npc_icc_blood_beast();
new spell_deathbringer_blood_beast_blood_link();
}

View File

@@ -1076,9 +1076,23 @@ public:
caster->CastCustomSpell(SPELL_GASEOUS_BLOAT, SPELLVALUE_AURA_STACK, 10, caster, false);*/
}
void HandleProc(ProcEventInfo& eventInfo)
{
uint32 stack = GetStackAmount();
Unit* caster = eventInfo.GetActor();
int32 const mod = caster->GetMap()->Is25ManRaid() ? 1500 : 1250;
int32 dmg = 0;
for (uint8 i = 1; i <= stack; ++i)
dmg += mod * i;
caster->CastCustomSpell(SPELL_EXPUNGED_GAS, SPELLVALUE_BASE_POINT0, dmg);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_gaseous_bloat_AuraScript::HandleExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
OnProc += AuraProcFn(spell_putricide_gaseous_bloat_AuraScript::HandleProc);
}
};
@@ -1707,6 +1721,45 @@ public:
}
};
// 71770 - Ooze Spell Tank Protection
class spell_putricide_ooze_tank_protection : public SpellScriptLoader
{
public:
spell_putricide_ooze_tank_protection() : SpellScriptLoader("spell_putricide_ooze_tank_protection") { }
class spell_putricide_ooze_tank_protection_AuraScript : public AuraScript
{
PrepareAuraScript(spell_putricide_ooze_tank_protection_AuraScript);
bool Validate(SpellInfo const* spellInfo) override
{
if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].TriggerSpell) ||
!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_1].TriggerSpell))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
Unit* actionTarget = eventInfo.GetActionTarget();
actionTarget->CastSpell((Unit*)nullptr, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_putricide_ooze_tank_protection_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc += AuraEffectProcFn(spell_putricide_ooze_tank_protection_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_putricide_ooze_tank_protection_AuraScript();
}
};
void AddSC_boss_professor_putricide()
{
new boss_professor_putricide();
@@ -1731,4 +1784,5 @@ void AddSC_boss_professor_putricide()
new spell_putricide_mutated_transformation_dmg();
new spell_putricide_eat_ooze();
new spell_putricide_regurgitated_ooze();
new spell_putricide_ooze_tank_protection();
}

View File

@@ -952,7 +952,7 @@ public:
}
else
{
Unit::DealHeal(me, me, me->CountPctFromMaxHealth(3));
me->ModifyHealth(me->CountPctFromMaxHealth(5));
_events.ScheduleEvent(EVENT_HEALTH_CHECK, 1000);
}
break;

View File

@@ -2987,6 +2987,8 @@ public:
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())

View File

@@ -89,6 +89,57 @@ public:
};
};
enum SecondWind
{
SPELL_SECOND_WIND_TRIGGER = 42771
};
// 42770 - Second Wind
class spell_uk_second_wind : public SpellScriptLoader
{
public:
spell_uk_second_wind() : SpellScriptLoader("spell_uk_second_wind") { }
class spell_uk_second_wind_AuraScript : public AuraScript
{
PrepareAuraScript(spell_uk_second_wind_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_SECOND_WIND_TRIGGER))
return false;
return true;
}
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_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_uk_second_wind_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_uk_second_wind_AuraScript();
}
};
enum EnslavedProtoDrake
{
TYPE_PROTODRAKE_AT = 28,
@@ -247,4 +298,5 @@ void AddSC_utgarde_keep()
new npc_enslaved_proto_drake();
new spell_ticking_time_bomb();
new spell_uk_second_wind();
}