mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 19:51:29 +00:00
[Bug Fix] Snare and DOT Stacking (#3897)
Dots won't overwrite regen but regen won't stack with dots. Sow type spells won't stack if a snare effect is already in place.
This commit is contained in:
parent
2df7d19f97
commit
00eb462d47
@ -3291,6 +3291,25 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
|||||||
sp1_value = CalcSpellEffectValue(spellid1, i, caster_level1);
|
sp1_value = CalcSpellEffectValue(spellid1, i, caster_level1);
|
||||||
sp2_value = CalcSpellEffectValue(spellid2, i, caster_level2);
|
sp2_value = CalcSpellEffectValue(spellid2, i, caster_level2);
|
||||||
|
|
||||||
|
// Spells like SoW won't stack if a snare effect is already in place.
|
||||||
|
if (effect2 == SE_MovementSpeed && effect1 == SE_MovementSpeed) {
|
||||||
|
if (sp1_value < 0 && sp2_value > 0) {
|
||||||
|
return -1;
|
||||||
|
} else if (sp2_value < 0 && sp1_value > 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DoTs won't overwrite regeneration but will block regeneration spells.
|
||||||
|
if (spells[spellid1].buff_duration > 0 && spells[spellid2].buff_duration > 0 &&
|
||||||
|
effect1 == SE_CurrentHP && effect2 == SE_CurrentHP) {
|
||||||
|
if (!sp1_detrimental && sp2_detrimental) {
|
||||||
|
continue;
|
||||||
|
} else if (sp1_detrimental && !sp2_detrimental) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// some spells are hard to compare just on value. attack speed spells
|
// some spells are hard to compare just on value. attack speed spells
|
||||||
// have a value that's a percentage for instance
|
// have a value that's a percentage for instance
|
||||||
if
|
if
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user