Skip to content

feat: checkbox for quickloot accepted items#1105

Merged
luanluciano93 merged 3 commits intoopentibiabr:mainfrom
bdzicc:accept-loot-checkbox
Mar 5, 2025
Merged

feat: checkbox for quickloot accepted items#1105
luanluciano93 merged 3 commits intoopentibiabr:mainfrom
bdzicc:accept-loot-checkbox

Conversation

@bdzicc
Copy link
Copy Markdown
Contributor

@bdzicc bdzicc commented Feb 27, 2025

Description

Checkbox for adding to quick loot accepted list in cyclopedia items tab

Behavior

image

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

  • Skip when Quick Looting Test
  1. Manage Loot Containers
  2. Select 'Skipped Loot' filter
  3. Click 'ADD TO SKIPPED LOOT LIST' button
  4. Select an item from cyclopedia list
  5. Checkbox 'Skip when Quick Looting' is present
  • Loot when Quick Looting Test
  1. Manage Loot Containers
  2. Select 'Accepted Loot' filter
  3. Click 'ADD TO ACCEPTED LOOT LIST' button
  4. Select an item from cyclopedia list
  5. Checkbox 'Loot when Quick Looting' is present

Test Configuration:

  • Server Version: Canary
  • Client: OTC Redemption
  • Operating System: Windows 10

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@bdzicc bdzicc changed the title feat: checkbox for adding to list in cyclopedia items tab feat: checkbox for adding to quickloot in cyclopedia items tab Feb 27, 2025
@bdzicc bdzicc changed the title feat: checkbox for adding to quickloot in cyclopedia items tab feat: checkbox for quickloot accepted items Feb 27, 2025
@mehah mehah requested a review from kokekanon February 28, 2025 00:47
@kokekanon
Copy link
Copy Markdown
Contributor

kokekanon commented Feb 28, 2025

@bdzicc Thanks for the PR.

when testing I noticed some unwanted behavior in the checkbox, check the pr I did in your repository,
check https://github.com/bdzicc/otclient/pull/1

bdzicc#1

I noticed that you use getText to know if you're currently in skipquick or lootquick, with the function modules.game_quickloot.QuickLoot.data.filter it's easier to determine.

image

Also, I made an optimization. I found it unnecessary to have two checkboxes stacked on top of each other, so I used a single function. If you look closely in your pr , they are the same.
the only difference is the number, which is modules.game_quickloot.QuickLoot.data.filter
image

https://github.com/bdzicc/otclient/pull/1

bandicam.2025-02-28.15-36-57-265.mp4

@bdzicc
Copy link
Copy Markdown
Contributor Author

bdzicc commented Mar 2, 2025

@kokekanon I agree, it makes more sense to use the actual filter value to determine which checkbox to display on the cyclopedia screen.

I tried to extract the filter value from the OTUI file and didn't realize that the modules.game_quickloot.QuickLoot.data.filter table already had this information. In hindsight, I should've used the checkbox values directly instead of relying on getText() if going this route.

The idea of a dynamic checkbox is also a good idea. I did notice some issues with the checkbox functionality due to existing logic, and I thought it might require a separate fix PR. But your changes address that as well, which is perfect.

I've tested everything with your changes and works great.

Thanks for the feedback.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 2, 2025

vllsystems pushed a commit to vllsystems/otclient that referenced this pull request Mar 12, 2025
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.

3 participants