#317 Fix for infinite quantity items on merchants

Unito
image ha unito 1 commit da TesterOrg/merchantfixes a devn00b/master 3 anni fa
overture2112 ha commentato 3 anni fa

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.
Questo contributo è stato incluso con successo!
Sign in to join this conversation.
Caricamento...
Annulla
Salva
Non ci sono ancora contenuti.