From c345187464d39ca154ff0f84c833f147dabd81a3 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Wed, 11 Dec 2024 07:18:40 -0600 Subject: [PATCH] Add IsBlockedBuff to CastChecks --- zone/bot.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 48902541f..ee4417ba8 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -9641,7 +9641,7 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spellType, bool doPrechec spells[spell_id].target_type == ST_Self && tar != this && (spellType != BotSpellTypes::SummonCorpse || RuleB(Bots, AllowCommandedSummonCorpse)) - ) { + ) { LogBotPreChecksDetail("{} says, 'Cancelling cast of {} on {} due to ST_Self.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName()); //deleteme return false; } @@ -9656,6 +9656,11 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spellType, bool doPrechec return false; } + if (IsBeneficialSpell(spell_id) && tar->IsBlockedBuff(spell_id)) { + LogBotPreChecks("{} says, 'Cancelling cast of {} on {} due to IsBlockedBuff.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName()); //deleteme + return false; + } + LogBotPreChecksDetail("{} says, 'Doing CanCastSpellType checks of {} on {}.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName()); //deleteme if (!CanCastSpellType(spellType, spell_id, tar)) { return false;