Skip to content

Commit

Permalink
[Spells] SPA148 Stacking Fix (#4206)
Browse files Browse the repository at this point in the history
Update to SPA148 which acts to block spells buffs that are of lesser value than the current buff for specific effect slots. This effected was preventing detrimental debuffs from being applied that were using same effect slot. This bug affected a very small amount of spell interactions and was fixed on live in 2018.  Example being Vishmitars Corruption (6642) being blocked by SteelOak Skin (5352)

 I confirmed the behavior on live myself. The detrimental buff  if in conflict should now be applied instead of blocked.
  • Loading branch information
KayenEQ committed Mar 27, 2024
1 parent 4692799 commit 20d9417
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions zone/spells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3211,8 +3211,16 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,

if (sp2_value < blocked_below_value)
{
LogSpells("Blocking spell because sp2_Value < blocked_below_value");
return -1; //blocked
if (IsDetrimentalSpell(spellid2))
{
//Live fixed this in 2018 to allow detrimental spells to bypass being blocked by SPA 148
LogSpells("Detrimental spell [{}] ([{}]) avoids being blocked.", sp2.name, spellid2);
}
else
{
LogSpells("Blocking spell because sp2_Value < blocked_below_value");
return -1; //blocked
}
}
} else {
LogSpells("[{}] ([{}]) blocks effect [{}] on slot [{}] below [{}], but we do not have that effect on that slot. Ignored",
Expand Down

0 comments on commit 20d9417

Please sign in to comment.