[Spells] SPA 311 SE_LimitCombatSkills should prevent focusing of procs even if proc is a 'casted' spell. (#1961)

* proc limiter update

* Update spdat.h

* [Spells] SPA 311 SE_LimitCombatSkills should prevent focusing of procs even if proc is a 'casted' spell.
This commit is contained in:
KayenEQ
2022-02-04 21:14:40 -05:00
committed by GitHub
parent d300e78b39
commit dbe6adbed0
2 changed files with 19 additions and 23 deletions
+18 -22
View File
@@ -5836,31 +5836,27 @@ bool Mob::IsCombatProc(uint16 spell_id) {
if (spell_id == SPELL_UNKNOWN) {
return(false);
}
if ((spells[spell_id].cast_time == 0) && (spells[spell_id].recast_time == 0) && (spells[spell_id].recovery_time == 0))
{
for (int i = 0; i < MAX_PROCS; i++){
if (PermaProcs[i].spellID == spell_id ||
SpellProcs[i].spellID == spell_id ||
RangedProcs[i].spellID == spell_id ||
DefensiveProcs[i].spellID == spell_id){
return true;
}
}
if (IsClient()) {
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
if (aabonuses.SpellProc[i + 1] == spell_id ||
aabonuses.RangedProc[i + 1] == spell_id ||
aabonuses.DefensiveProc[i + 1] == spell_id) {
return true;
}
}
/*
Procs that originate from casted spells are still limited by SPA 311 (~Kayen confirmed on live 2/4/22)
*/
for (int i = 0; i < MAX_PROCS; i++) {
if (PermaProcs[i].spellID == spell_id ||
SpellProcs[i].spellID == spell_id ||
RangedProcs[i].spellID == spell_id ||
DefensiveProcs[i].spellID == spell_id) {
return true;
}
}
if (IsClient()) {
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
if (aabonuses.SpellProc[i + 1] == spell_id ||
aabonuses.RangedProc[i + 1] == spell_id ||
aabonuses.DefensiveProc[i + 1] == spell_id) {
return true;
}
}
}
return false;
}