fix: safely merge, stack, and prioritize AoE loot#66
Conversation
Remove leftover commented code from the completed AoE-loot implementation.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAOE loot merging now collects regular and quest candidates before transfer, orders and stacks regular items safely, adds quest items directly to inventory, preserves partially transferred source rows, and cleans up only fully looted corpses. ChangesAOE loot transfer
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant AOELootServer
participant SourceCorpses
participant MainLootWindow
participant PlayerInventory
AOELootServer->>SourceCorpses: collect regular and quest candidates
SourceCorpses-->>AOELootServer: candidate rows and gold
AOELootServer->>MainLootWindow: stack and transfer regular items
MainLootWindow-->>AOELootServer: transferred quantities
AOELootServer->>PlayerInventory: add quest items
PlayerInventory-->>AOELootServer: successful additions
AOELootServer->>SourceCorps: preserve partial rows and clear completed corpses
AOELootServer->>MainLootWindow: apply gold and sort final loot
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The module has changed a lot since I last worked on it... I really would have to look at all the code again. If there are other reviews or the argument of the creator of the PR is solid, I will not oppose it. I have already asked him for the history of changes that this code has actually undergone. |
Changes Proposed:
Issues Addressed:
SOURCE:
Loot,LootItem, andItemTemplateAPIs.Tests Performed:
worldserverinRelWithDebInfoon Windows.How to Test the Changes:
worldserver.AOELoot.Enable = 1and configure the desiredAOELoot.Range.MAX_LOOT_ITEMS, rebuild, and repeat the pull.Summary by CodeRabbit
New Features
Bug Fixes