Stacking fixes for new effects

Stacking fixes for new effects.
This commit is contained in:
KayenEQ
2021-07-16 16:48:33 -04:00
parent bafd5c4cb2
commit 25560858e5
2 changed files with 18 additions and 6 deletions
+6
View File
@@ -1218,6 +1218,12 @@ bool IsEffectIgnoredInStacking(int spa)
case SE_LimitUseType: case SE_LimitUseType:
case SE_GravityEffect: case SE_GravityEffect:
case 425: case 425:
//Spell effects implemented after ROF2, following same pattern, lets assume these should go here.
case SE_Fc_Spell_Damage_Pct_IncomingPC:
case SE_Fc_Spell_Damage_Amt_IncomingPC:
case SE_Ff_CasterClass:
case SE_Ff_Same_Caster:
case SE_Proc_Timer_Modifier:
return true; return true;
default: default:
return false; return false;
+12 -6
View File
@@ -4693,6 +4693,11 @@ int16 Client::CalcAAFocus(focusType type, const AA::Rank &rank, uint16 spell_id)
LimitFailure = true; LimitFailure = true;
break; break;
/* These are not applicable to AA's because there is never a 'caster' of the 'buff' with the focus effect.
case SE_Ff_Same_Caster:
case SE_Ff_CasterClass:
*/
// Handle Focus Effects // Handle Focus Effects
case SE_ImprovedDamage: case SE_ImprovedDamage:
if (type == focusImprovedDamage && base1 > value) if (type == focusImprovedDamage && base1 > value)
@@ -5470,8 +5475,8 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
if (zone->random.Roll(focus_spell.base[i])) { if (zone->random.Roll(focus_spell.base[i])) {
value = focus_spell.base2[i]; value = focus_spell.base2[i];
} }
break; break;
} }
#if EQDEBUG >= 6 #if EQDEBUG >= 6
// this spits up a lot of garbage when calculating spell focuses // this spits up a lot of garbage when calculating spell focuses
@@ -7156,6 +7161,8 @@ void Mob::CastSpellOnLand(Mob* caster, uint32 spell_id)
the CalcFocusEffect function if not 100pct. the CalcFocusEffect function if not 100pct.
ApplyFocusProcLimiter() function checks for SE_Proc_Timer_Modifier which allows for limiting how often a spell from effect can be triggered ApplyFocusProcLimiter() function checks for SE_Proc_Timer_Modifier which allows for limiting how often a spell from effect can be triggered
for example, if set to base=1 and base2= 1500, then for everyone 1 successful trigger, you will be unable to trigger again for 1.5 seconds. for example, if set to base=1 and base2= 1500, then for everyone 1 successful trigger, you will be unable to trigger again for 1.5 seconds.
Live only has this focus in buffs/debuffs that can be placed on a target. TODO: Will consider adding support for it as AA and Item.
*/ */
if (!caster) if (!caster)
return; return;
@@ -7177,7 +7184,6 @@ void Mob::CastSpellOnLand(Mob* caster, uint32 spell_id)
//Step 3: Check if SE_Proc_Time_Modifier is present and if so apply it. //Step 3: Check if SE_Proc_Time_Modifier is present and if so apply it.
if (ApplyFocusProcLimiter(buffs[i].spellid, i)) { if (ApplyFocusProcLimiter(buffs[i].spellid, i)) {
//Step 4: Cast spells //Step 4: Cast spells
if (IsBeneficialSpell(trigger_spell_id)) { if (IsBeneficialSpell(trigger_spell_id)) {
SpellFinished(trigger_spell_id, this, EQ::spells::CastingSlot::Item, 0, -1, spells[trigger_spell_id].ResistDiff); SpellFinished(trigger_spell_id, this, EQ::spells::CastingSlot::Item, 0, -1, spells[trigger_spell_id].ResistDiff);
@@ -7209,9 +7215,9 @@ bool Mob::ApplyFocusProcLimiter(uint32 spell_id, int buffslot)
/* /*
SE_Proc_Timer_Modifier SE_Proc_Timer_Modifier
base1= amount of total procs allowed until lock out timer is triggered base1= amount of total procs allowed until lock out timer is triggered, should be set to at least 1 in any spell for the effect to function.
base2= lock out timer, which prevents any more procs base2= lock out timer, which prevents any more procs set in ms 1500 = 1.5 seconds
This system allows easy scaling for multiple different buffs with same effects each having seperate active individual timer checks. This system allows easy scaling for multiple different buffs with same effects each having seperate active individual timer checks. Ie.
*/ */
if (IsValidSpell(spell_id)) { if (IsValidSpell(spell_id)) {