Skip to content

Bots prefer buff food#277

Closed
bozimmerman wants to merge 1 commit into
mangoszero:masterfrom
bozimmerman:bot_buff_food
Closed

Bots prefer buff food#277
bozimmerman wants to merge 1 commit into
mangoszero:masterfrom
bozimmerman:bot_buff_food

Conversation

@bozimmerman
Copy link
Copy Markdown
Contributor

@bozimmerman bozimmerman commented Mar 17, 2026

Allows bots to prefer buff food when available, and regular food when not.


This change is Reviewable

Copilot AI review requested due to automatic review settings March 17, 2026 22:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for identifying and preferentially consuming “buff food” (Well Fed–style consumables) in the playerbot non-combat eating flow.

Changes:

  • Add buff-food detection helpers and a FindBuffFoodVisitor item visitor.
  • Extend inventory item parsing to support the "buff food" qualifier.
  • Update EatAction to consume buff food first when no food buff aura is active.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/modules/Bots/playerbot/strategy/ItemVisitors.h Introduces buff-food classification (IsBuffFood), buff-food item visitor, and aura-check helper (HasFoodBuff).
src/modules/Bots/playerbot/strategy/actions/NonCombatActions.h Updates EatAction to try buff food before falling back to normal food usage.
src/modules/Bots/playerbot/strategy/actions/InventoryAction.cpp Adds "buff food" handling to inventory parsing to return buff-food candidates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/modules/Bots/playerbot/strategy/ItemVisitors.h
Comment on lines +329 to +336
if (bot->HasAura(sp->Id))
return true;
for (int i = 1; i < MAX_EFFECT_INDEX; ++i)
{
uint32 triggerSpell = sp->EffectTriggerSpell[i];
if (triggerSpell && bot->HasAura(triggerSpell))
return true;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't do this. The [0] index only holds the operating food spell, not the buff food spell, and is useless for detecting it.

Comment thread src/modules/Bots/playerbot/strategy/ItemVisitors.h
@AppVeyorBot
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants