From c25a5fa0ba22b5904fbb34c105913e5191f6b6d4 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 8 Jun 2017 00:54:22 -0400 Subject: [PATCH] AC/ACv2 negative affects don't affect stacking fixes #622 Unsure if these are the only SPAs that should act this way, but this resolves the issues we were seeing --- zone/spells.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zone/spells.cpp b/zone/spells.cpp index 2be0a0bce..ef0553526 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3059,6 +3059,12 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, if (IsEffectIgnoredInStacking(effect1)) continue; + // negative AC affects are skipped. Ex. Sun's Corona and Glacier Breath should stack + // There may be more SPAs we need to add here .... + // The client does just check base rather than calculating the affect change value. + if ((effect1 == SE_ArmorClass || effect1 == SE_ACv2) && sp2.base[i] < 0) + continue; + /* If target is a npc and caster1 and caster2 exist If Caster1 isn't the same as Caster2 and the effect is a DoT then ignore it.