From bbbee6e6b24e5657c00162d6de43d9e9cbd0dc3d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 17 Dec 2018 00:51:18 -0500 Subject: [PATCH] Fix some bard stacking issues (mainly AE DOT) Please report if it breaks anything (shouldn't) --- common/spdat.cpp | 14 ++++++++++++++ common/spdat.h | 1 + zone/spells.cpp | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/common/spdat.cpp b/common/spdat.cpp index a5764a625..cb41c5158 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -1122,6 +1122,20 @@ bool IsStackableDot(uint16 spell_id) return IsEffectInSpell(spell_id, SE_CurrentHP) || IsEffectInSpell(spell_id, SE_GravityEffect); } +bool IsBardOnlyStackEffect(int effect) +{ + switch(effect) { + case SE_CurrentMana: + case SE_ManaRegen_v2: + case SE_CurrentHP: + case SE_HealOverTime: + case SE_BardAEDot: + return true; + default: + return false; + } +} + bool IsCastWhileInvis(uint16 spell_id) { if (!IsValidSpell(spell_id)) diff --git a/common/spdat.h b/common/spdat.h index c6aab7e7e..cb9a301d8 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -968,6 +968,7 @@ uint32 GetPartialMeleeRuneAmount(uint32 spell_id); uint32 GetPartialMagicRuneAmount(uint32 spell_id); bool NoDetrimentalSpellAggro(uint16 spell_id); bool IsStackableDot(uint16 spell_id); +bool IsBardOnlyStackEffect(int effect); bool IsCastWhileInvis(uint16 spell_id); bool IsEffectIgnoredInStacking(int spa); diff --git a/zone/spells.cpp b/zone/spells.cpp index 1cb920786..d3ac9b503 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -3021,6 +3021,10 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2, if(effect1 != effect2) continue; + if (IsBardOnlyStackEffect(effect1) && GetSpellLevel(spellid1, BARD) != 255 && + GetSpellLevel(spellid2, BARD) != 255) + continue; + // big ol' list according to the client, wasn't that nice! if (IsEffectIgnoredInStacking(effect1)) continue;