Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cyclopedia item filters & market voc filter #1122

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

bdzicc
Copy link
Contributor

@bdzicc bdzicc commented Mar 18, 2025

Description

image

The cyclopedia filters have a few issues:

  1. Selecting any of the item filters clears out all items. This is simply due to a scoping error which is easily fixed.

  2. Fixing the scoping error then revealed that there is an issue with displaying items based on the vocation filter.
    The vocations are as follows:
    1 = knight
    2 = paladin
    3 = sorcerer
    4 = druid

When restrictVocation bitmask is calculated on the C++ side and an item is for a knight and paladin the value is 3 which is the same as sorcerer. As a result, sorcerers are seeing items for knights and paladins. Also, with the current logic for the filter each vocation is only seeing items that are explicitly for their vocation and none of the items with multiple vocations nor items with no vocation req.

I have changed the restrictVocation bitmask to the following:
1 = knight
2 = paladin
4 = sorcerer
8 = druid

This way each bit represents each vocation and no overlap can occur when combining.

These changes also fix the vocation filtering for the market items as well.

Behavior

Actual

Selecting an items filter clears all results
Selecting vocation filter shows incorrect results

Expected

Selecting filters should show correct items based on player level/voc

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

  • Selected level/voc items filters for each vocation and ensured correct items were displayed

Test Configuration:

  • Server Version:Canary 13.40
  • Client: OTC Mehah
  • 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 marked this pull request as draft March 18, 2025 19:49
@bdzicc bdzicc force-pushed the cyclopedia-filters-fix branch from f2e11f5 to 5514d8c Compare March 20, 2025 19:43
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.

1 participant