From 20d94176284e49f17d3fb8ad910f83558e65cf59 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Wed, 27 Mar 2024 14:39:40 -0400 Subject: [PATCH] [Spells] SPA148 Stacking Fix (#4206) 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. --- zone/spells.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index db04292b1..036ffde36 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -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",