Skip to content

fix(eloot):v2.9.6 bugfix to check Bounty.task.done? when selling gems. - #2352

Merged
mrhoribu merged 5 commits into
elanthia-online:masterfrom
Deysh:eloot
Jun 13, 2026
Merged

mrhoribu merged 5 commits into
elanthia-online:masterfrom
Deysh:eloot

Conversation

@Deysh

@Deysh Deysh commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Updated release to 2.9.6 with bugfix notes.
    • Improved hoarding inventory filtering to respect the ignore list and correctly limit results when a single-item query is used.
    • Enhanced jar/deposit processing to mark unsuitable items, return them to inventory, wait briefly, and continue processing.
    • Gem-selling loop now stops immediately when the related bounty task completes, avoiding extra processing.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: df3bbb15-89ac-447a-bfed-420ea428efd1

📥 Commits

Reviewing files that changed from the base of the PR and between adeec9d and de4734c.

📒 Files selected for processing (1)
  • scripts/eloot.lic

📝 Walkthrough

Walkthrough

Bumps scripts/eloot.lic to 2.9.6. Changes: hoarding inventory now filters items in $sell_ignore, jar deposit _drag handles “not a suitable” by restoring and skipping the item, and bounty gem-selling stops processing when Bounty.task.done? is true.

Changes

Version 2.9.6 Bug Fixes

Layer / File(s) Summary
Changelog for version 2.9.6
scripts/eloot.lic
Changelog header updated to 2.9.6 with bugfix notes for bounty gem completion checks and jar deposit failure handling.
Hoarding inventory filter update
scripts/eloot.lic
Hoard.hoarding_list now excludes items whose ids appear in $sell_ignore when filtering by single and in type-rejection logic.
Jar deposit failure handling
scripts/eloot.lic
_drag result parsing treats “does not appear to be a suitable” as a failure: logs, adds item id to $sell_ignore, calls Inventory.single_drag to re-store, waits roundtime, and continues loop.
Bounty gem-selling early exit
scripts/eloot.lic
Gem-selling loop now breaks immediately when Bounty.task.done? is true to avoid processing after completion.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mrhoribu
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main change: a bugfix in the eloot script version 2.9.6 that adds a check for Bounty.task.done? when selling gems.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/eloot.lic (1)

5625-5659: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard the outer sack loop once the bounty is complete.

Line 5652 only stops the per-item path. A later sack can still be bulk-sold after task completion because gem_sacks.each has no Bounty.task.done? guard.

💡 Proposed fix
       gem_sacks.each do |sack|
+        break if Bounty.task.done?
         next if sack.nil?
         next if sack.contents.none? { |obj| obj.name =~ /#{gem}/i }

         bulk_sell = true
         bulk_sell = false if sack.contents.any? { |obj| obj.name !~ /#{gem}/ && obj.type =~ /gem/ }
@@
         if bulk_sell
           Inventory.drag(sack) if [checkleft, checkright].index(sack.noun).nil?
           dothistimeout("sell ##{sack.id}", 3, /inspects the contents carefully/)
           Inventory.wear(sack)
           sleep 0.5
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/eloot.lic` around lines 5625 - 5659, The outer gem_sacks.each loop
isn't guarded by Bounty.task.done?, so later sacks can still be bulk-sold after
the bounty completes; add a guard at the top of the loop body (immediately after
gem_sacks.each do |sack| and after the existing next if sack.nil? check) that
breaks out of the loop when Bounty.task.done? is true (e.g., "break if
Bounty.task.done?") so neither the bulk_sell branch nor the per-item path runs
for subsequent sacks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@scripts/eloot.lic`:
- Around line 5625-5659: The outer gem_sacks.each loop isn't guarded by
Bounty.task.done?, so later sacks can still be bulk-sold after the bounty
completes; add a guard at the top of the loop body (immediately after
gem_sacks.each do |sack| and after the existing next if sack.nil? check) that
breaks out of the loop when Bounty.task.done? is true (e.g., "break if
Bounty.task.done?") so neither the bulk_sell branch nor the per-item path runs
for subsequent sacks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1a35fd3b-67f9-4654-89c7-1d9c66f97123

📥 Commits

Reviewing files that changed from the base of the PR and between 676b997 and adeec9d.

📒 Files selected for processing (1)
  • scripts/eloot.lic

@mrhoribu
mrhoribu merged commit d0a258e into elanthia-online:master Jun 13, 2026
4 checks passed
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