Bots prefer buff food#277
Closed
bozimmerman wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
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
FindBuffFoodVisitoritem visitor. - Extend inventory item parsing to support the
"buff food"qualifier. - Update
EatActionto 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 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; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows bots to prefer buff food when available, and regular food when not.
This change is