mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Update to SE_AStacker, B, C, D
Will correclty use base value to stack with same type ie (A vs A) Highest base value will take hold.
This commit is contained in:
parent
1cd20c65e2
commit
6877e40b38
@ -2762,19 +2762,23 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SE_AStacker:
|
case SE_AStacker:
|
||||||
newbon->AStacker = true;
|
newbon->AStacker[0] = 1;
|
||||||
|
newbon->AStacker[1] = effect_value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SE_BStacker:
|
case SE_BStacker:
|
||||||
newbon->BStacker = true;
|
newbon->BStacker[0] = 1;
|
||||||
|
newbon->BStacker[1] = effect_value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SE_CStacker:
|
case SE_CStacker:
|
||||||
newbon->CStacker = true;
|
newbon->CStacker[0] = 1;
|
||||||
|
newbon->CStacker[1] = effect_value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SE_DStacker:
|
case SE_DStacker:
|
||||||
newbon->DStacker = true;
|
newbon->DStacker[0] = 1;
|
||||||
|
newbon->DStacker[1] = effect_value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SE_Berserk:
|
case SE_Berserk:
|
||||||
|
|||||||
@ -366,10 +366,10 @@ struct StatBonuses {
|
|||||||
bool NegateIfCombat; // Bool Drop buff if cast or melee
|
bool NegateIfCombat; // Bool Drop buff if cast or melee
|
||||||
int8 Screech; // -1 = Will be blocked if another Screech is +(1)
|
int8 Screech; // -1 = Will be blocked if another Screech is +(1)
|
||||||
int16 AlterNPCLevel; // amount of lvls +/-
|
int16 AlterNPCLevel; // amount of lvls +/-
|
||||||
bool AStacker; // For buff stack blocking
|
int16 AStacker[1]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||||
bool BStacker; // For buff stack blocking
|
int16 BStacker[1]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||||
bool CStacker; // For buff stack blocking
|
int16 CStacker[1]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||||
bool DStacker; // For buff stack blocking
|
int16 DStacker[1]; // For buff stack blocking 0=Exists 1=Effect_value
|
||||||
bool BerserkSPA; // berserk effect
|
bool BerserkSPA; // berserk effect
|
||||||
int16 Metabolism; // Food/drink consumption rates.
|
int16 Metabolism; // Food/drink consumption rates.
|
||||||
|
|
||||||
|
|||||||
@ -2622,19 +2622,31 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*Buff stacking prevention spell effects (446 - 449) works as follows... If B prevent A, if C prevent B, if D prevent C.
|
/*Buff stacking prevention spell effects (446 - 449) works as follows... If B prevent A, if C prevent B, if D prevent C.
|
||||||
|
If checking same type ie A vs A, which ever effect base value is higher will take hold.
|
||||||
Special check is added to make sure the buffs stack properly when applied from fade on duration effect, since the buff
|
Special check is added to make sure the buffs stack properly when applied from fade on duration effect, since the buff
|
||||||
is not fully removed at the time of the trgger*/
|
is not fully removed at the time of the trgger*/
|
||||||
if (spellbonuses.BStacker) {
|
if (spellbonuses.AStacker[0]) {
|
||||||
|
if ((effect2 == SE_AStacker) && (sp2.effectid[i] <= spellbonuses.AStacker[1]))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spellbonuses.BStacker[0]) {
|
||||||
|
if ((effect2 == SE_BStacker) && (sp2.effectid[i] <= spellbonuses.BStacker[1]))
|
||||||
|
return -1;
|
||||||
if ((effect2 == SE_AStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_BStacker)))
|
if ((effect2 == SE_AStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_BStacker)))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spellbonuses.CStacker) {
|
if (spellbonuses.CStacker[0]) {
|
||||||
|
if ((effect2 == SE_CStacker) && (sp2.effectid[i] <= spellbonuses.CStacker[1]))
|
||||||
|
return -1;
|
||||||
if ((effect2 == SE_BStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_CStacker)))
|
if ((effect2 == SE_BStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_CStacker)))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spellbonuses.DStacker) {
|
if (spellbonuses.DStacker[0]) {
|
||||||
|
if ((effect2 == SE_DStacker) && (sp2.effectid[i] <= spellbonuses.DStacker[1]))
|
||||||
|
return -1;
|
||||||
if ((effect2 == SE_CStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_DStacker)))
|
if ((effect2 == SE_CStacker) && (!IsCastonFadeDurationSpell(spellid1) && buffs[buffslot].ticsremaining != 1 && IsEffectInSpell(spellid1, SE_DStacker)))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user