Skip to content

Conversation

@Celandriel
Copy link
Owner

No description provided.

Added the ability to choose disenchant on loot if the bot is enchanting
Centralized “who gets priority” into a generic fallback: if no bot in the group has the item as a mainspec upgrade (EQUIP/REPLACE + IsPrimaryForSpec), then offspec upgrades are allowed to keep NEED instead of being forced to GREED.

Healer + Hit items are now handled only via IsPrimaryForSpec (healer treats SP/INT/Hit/no-regen as offspec), and the generic fallback decides whether they can still NEED when no DPS caster bot wants it.

Fixed a compile issue by adding a forward declaration for IsPrimaryForSpec before group-level helper functions that call it.
@gemini-code-assist
Copy link

Summary of Changes

Hello @Celandriel, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a comprehensive overhaul of the bot's loot rolling system, making their decisions more sophisticated and aligned with common loot etiquette. The changes aim to improve bot efficiency and fairness in group loot scenarios by providing detailed logic for 'Need', 'Greed', 'Pass', and 'Disenchant' choices based on various item and bot characteristics. This significantly enhances the bot's ability to manage inventory and gear progression within a group.

Highlights

  • Enhanced Loot Roll Logic: Bots now make more intelligent decisions when rolling on loot, considering their specialization, equipped gear, professions, and item properties like Bind-on-Equip/Use.
  • New Configuration Options: A suite of new configuration options has been added to playerbots.conf.dist to allow fine-tuning of bot loot rolling behavior, including spec-based need, BoE/BoU handling, cross-armor rules, and profession recipe considerations.
  • Disenchant Roll Option: Bots with the Enchanting profession can now choose to 'Disenchant' an item instead of 'Greed' if it's explicitly marked for disenchanting and the loot method allows it.
  • Improved Token Handling: Loot tokens are now evaluated more accurately, with bots needing only if the corresponding slot would be a real upgrade based on item level.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Celandriel Celandriel merged commit c0ac4f4 into Celandriel:loot-pr Nov 24, 2025
1 check passed
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant improvement to the bot loot system, making it much more intelligent and configurable. It adds a lot of new logic to handle different item types, specs, and group situations. The changes are extensive and well-thought-out. I've found one high-severity bug in the legacy loot rolling logic and a couple of areas where the code could be refactored for better maintainability due to the complexity of the new functions. Overall, this is a great enhancement.

}
}

static bool IsPrimaryForSpec(Player* bot, ItemTemplate const* proto)

Choose a reason for hiding this comment

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

medium

The IsPrimaryForSpec function is very complex and long (almost 300 lines). It contains a large number of rules for different class/spec combinations. This makes it difficult to read, understand, and maintain. Please consider refactoring this function into smaller pieces. For example, the logic for each class or role (physical DPS, caster, tank) could be extracted into separate helper functions.

}

RollVote LootRollAction::CalculateRollVote(ItemTemplate const* proto)
RollVote LootRollAction::CalculateRollVote(ItemTemplate const* proto, int32 randomProperty)

Choose a reason for hiding this comment

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

medium

The CalculateRollVote function is very long (over 200 lines) and handles many different loot rolling rules. To improve maintainability and readability, consider refactoring this function by extracting parts of the logic into smaller, well-named helper functions. For example, the logic for BoE/BoU items, duplicate items, unique items, and cross-armor upgrades could each be in their own function.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants