#317 Fix for infinite quantity items on merchants

Merged
image merged 1 commits from TesterOrg/merchantfixes into devn00b/master 3 years ago

Summary

Instead of checking for a quantity of 0xFFFF to mean infinite, I changed it to check for 0xFF.

Reasoning:

  1. The current items in the database use 0xFF (255) as the sentinel value for infinite.

  2. Neatz09 on discord suggested changing the code instead of all the database entries.

  3. AFAICT, the EQ2 client treats 255 as infinite (as in, it doesn't display a quantity), which implies that's the sentinel SOE used.

Concerns:

1, There's a few other parts of the code that set quantity to 0xFFFF. This isn't a problem exactly (and for all I know changing it to 0xFF might break something- I'm not familiar enough to be certain) but creates a slight inconsistency which might hurt maintainability. Future coders might be unsure whether 0xFF or 0xFFFF is the sentinel.

# Summary Instead of checking for a quantity of 0xFFFF to mean infinite, I changed it to check for 0xFF. # Reasoning: 1. The current items in the database use 0xFF (255) as the sentinel value for infinite. 2. Neatz09 on discord suggested changing the code instead of all the database entries. 3. AFAICT, the EQ2 client treats 255 as infinite (as in, it doesn't display a quantity), which implies that's the sentinel SOE used. # Concerns: 1, There's a few other parts of the code that set quantity to 0xFFFF. This isn't a problem exactly (and for all I know changing it to 0xFF might break something- I'm not familiar enough to be certain) but creates a slight inconsistency which might hurt maintainability. Future coders might be unsure whether 0xFF or 0xFFFF is the sentinel.
This pull request has been merged successfully!
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.