From fc48782065341d29bc9bc9e4867bf2cbbac61959 Mon Sep 17 00:00:00 2001 From: Flekz Date: Wed, 3 Apr 2024 19:38:16 +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 042bd3f1b2..e572df0039 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -6745,6 +6745,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) {