Skip to content

Commit

Permalink
Playerbots: Handle spell item requirements by the bot system
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete committed Apr 3, 2024
1 parent c10d0b6 commit 21a68ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/game/Spells/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 21a68ba

Please sign in to comment.