mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Spells] Implemented SPA 512 SE_Proc_Timer_Modifier, Fixed AA procs not working (#1646)
* update for SPA 511 * remove debugs, AA implemented * update * twinprocfix * AA procs added * format update * update * proctimer limits * update * rename function renamed function only check for buffs value > 0, don't need to check for AA's which are negative ID's * pre merge * variable updates * Update spell_effects.cpp * var rename update var name to better represent its function. * updated proc struct added reuse timer * reuse timer to spell procs * updates * debug remove * Update mob.cpp * fix * merge
This commit is contained in:
@@ -1071,6 +1071,76 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
}
|
||||
break;
|
||||
|
||||
case SE_WeaponProc:
|
||||
case SE_AddMeleeProc:
|
||||
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
|
||||
if (!newbon->SpellProc[i]) {
|
||||
newbon->SpellProc[i] = rank.id; //aa rank id
|
||||
newbon->SpellProc[i + 1] = base_value; //proc spell id
|
||||
newbon->SpellProc[i + 2] = limit_value; //proc rate modifer
|
||||
newbon->SpellProc[i + 3] = 0; //Lock out Timer
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SE_RangedProc:
|
||||
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
|
||||
if (!newbon->RangedProc[i]) {
|
||||
newbon->RangedProc[i] = rank.id; //aa rank id
|
||||
newbon->RangedProc[i + 1] = base_value; //proc spell id
|
||||
newbon->RangedProc[i + 2] = limit_value; //proc rate modifer
|
||||
newbon->RangedProc[i + 3] = 0; //Lock out Timer
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SE_DefensiveProc:
|
||||
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
|
||||
if (!newbon->DefensiveProc[i]) {
|
||||
newbon->DefensiveProc[i] = rank.id; //aa rank id
|
||||
newbon->DefensiveProc[i + 1] = base_value; //proc spell id
|
||||
newbon->DefensiveProc[i + 2] = limit_value; //proc rate modifer
|
||||
newbon->DefensiveProc[i + 3] = 0; //Lock out Timer
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SE_Proc_Timer_Modifier: {
|
||||
/*
|
||||
AA can multiples of this in a single effect, proc should use the timer
|
||||
that comes after the respective proc spell effect, thus rank.id will be already set
|
||||
when this is checked.
|
||||
*/
|
||||
|
||||
newbon->Proc_Timer_Modifier = true;
|
||||
|
||||
for (int i = 0; i < MAX_AA_PROCS; i += 4) {
|
||||
if (newbon->SpellProc[i] == rank.id) {
|
||||
if (!newbon->SpellProc[i + 3]) {
|
||||
newbon->SpellProc[i + 3] = limit_value;//Lock out Timer
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (newbon->RangedProc[i] == rank.id) {
|
||||
if (!newbon->RangedProc[i + 3]) {
|
||||
newbon->RangedProc[i + 3] = limit_value;//Lock out Timer
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (newbon->DefensiveProc[i] == rank.id) {
|
||||
if (!newbon->DefensiveProc[i + 3]) {
|
||||
newbon->DefensiveProc[i + 3] = limit_value;//Lock out Timer
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_CriticalHitChance: {
|
||||
// Bad data or unsupported new skill
|
||||
|
||||
Reference in New Issue
Block a user