From afc32afb021a94e4c28ba70e288b175f44d446ac Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 6 Mar 2022 21:18:30 -0500 Subject: [PATCH] [AI] Spell Type (1024) InCombatBuff were spam casting (#2030) --- zone/mob_ai.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 906b3b5c9..109d9a1f0 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -195,10 +195,11 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates } case SpellType_InCombatBuff: { - if(bInnates || zone->random.Roll(50)) - { - AIDoSpellCast(i, tar, mana_cost); - return true; + if(bInnates || zone->random.Roll(50)) { + if (tar->CanBuffStack(AIspells[i].spellid, GetLevel(), true) >= 0) { + AIDoSpellCast(i, tar, mana_cost); + return true; + } } break; }