From 21a68bab47a824d150f096a93ea82551b6f4ed3f Mon Sep 17 00:00:00 2001 From: Flekz Date: Wed, 3 Apr 2024 19:25:12 +0100 Subject: [PATCH] Playerbots: Handle spell item requirements by the bot system --- src/game/Spells/Spell.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp index 2d22c91cba..d815e4cca0 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -6397,6 +6397,17 @@ bool Spell::IgnoreItemRequirements() const if (m_channelOnly || m_ignoreCosts) return true; +#ifdef ENABLE_PLAYERBOTS + if (m_caster->IsPlayer()) + { + PlayerbotAI* bot = ((Player*)m_caster)->GetPlayerbotAI(); + if (bot && bot->HasSpellItems(m_spellInfo->Id, m_CastItem)) + { + return true; + } + } +#endif + // Workaround for double shard problem if (m_IsTriggeredSpell || this->m_spellInfo->Id == 46546) {