fix(DB/Loot): Fix incorrect loot pool structure for 9 Naxxramas 25-man bosses#25276
fix(DB/Loot): Fix incorrect loot pool structure for 9 Naxxramas 25-man bosses#25276espkk wants to merge 1 commit intoazerothcore:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the World database loot definitions for several Naxxramas 25-man bosses to match expected retail WotLK “multi-pool” behavior, separating boss-specific drops and shared drops into distinct loot groups.
Changes:
- Updates
creature_loot_templatereference rows for 9 bosses to roll their reference table once (MinCount/MaxCountset to1) instead of multiple times. - Re-structures each boss’s
reference_loot_templateby splitting the previously singleGroupIdinto multipleGroupIdpools (e.g., 5+5+5+9 or 5+4+5+9).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Providing a bit more context, as this appears to be non-trivial to review: The current loot table appears to be based on wotlk classic wowhead data, but it uses a single pool with uniformly distributed drop rates, which clearly doesn't match any of the available data. Looking at the classic wotlk drop rate data, there is a clear multimodal split. Assuming 4 buckets and judging purely by SSE exhaustive testing points to a 5+6+6+7 split. However, on closer inspection, the distribution is biased towards the grand mean (16.7%) and converges towards 5+5+5+9 as the number of observed drops increases. This implies the dataset was originally aggregated under a uniform distribution (very likely to be early wotlk classic bug), but the loot system was later changed to use proper pooling. This is implicitly confirmed by the fact that 9 is exactly the number of shared items in each boss's loot table, and the unique items consistently follow a uniform distribution within their buckets. Cross-checking against archived (web.archive.org circa 2013) wowhead data (which btw has fewer items per boss loot table) further confirms the pattern, with bucket splits depending on total item count (22-24): 5+5+5+9, 4+5+5+9, 4+4+5+9 - always with a fixed shared bucket of 9. The core problem with the current single-pool approach is that shared items not only appear on multiple bosses but each boss rolls for them independently. Under uniform distribution, a shared item present on 6 bosses effectively gets 6 chances to drop per raid clear, while already having an inflated per-boss drop rate (since the pool treats all items equally regardless of how many bosses share them). Not to mention a boss can drop, say, 4 rings per kill, because of them being in the same uniform pool. Proper pooling corrects this by placing shared items in a larger bucket, giving them a lower individual drop rate (1/9 = ~11.1%) compared to unique items (1/5 = 20%), and a single roll per bucket, which offsets their inherent multi-boss advantage. To sum up, this change restores the original (and correct) pooling system. The items in the pool are left as-is (matching the current DB rather than archived wotlk, which has fewer items), and the bucket split doesn't affect individual drop rates other than lowering them for shared items relative to unique ones. While the exact assignment of unique items to specific buckets is undetermined (except for Anub'Rekhan, which is confirmed by video evidence), this has no practical impact since the unique buckets for each boss are equal in size. The change strictly improves broken behavior with no downsides, while leaving room for a minor follow-up to restore exact loot pool assignments or remove a few extra items to restore wotlk retail behaviour. |
Changes Proposed:
This PR proposes changes to:
Fixes incorrect loot pool structure for 9 Naxxramas 25-man bosses.
Wowhead/wowdb 25-man drop data shows a clear bimodal distribution for all 24-item bosses:
This is only possible if boss items and shared items are in separate pools of different sizes. A single flat pool of 24 with 4 picks gives 16.7% uniform.
chromiecraft/chromiecraft#9131 provided kill-by-kill co-occurrence data for Anub'Rekhan, revealing an asymmetric 5+4+5+9 structure. For all other bosses 5+5+5+9 pools are used:
Effectively, this increases the drop rate of non-shared items and decreases that of shared items.
AI-assisted Pull Requests
Issues Addressed:
SOURCE:
The changes have been validated through:
Tests Performed:
This PR has been:
How to Test the Changes:
cs_debug.cppto increase iteration limit from 100 to 10000 (100 is too low for statistical inference)Known Issues and TODO List:
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.