3.9.2 Griswold:
....
In Hellfire there is an additional factor to consider. If possible he will try to sell items that are better (more expensive than 80% of your most expensive item) than the ones you are already carrying (both equipped ones and not equipped ones). The test is done separately for each item type group (amulet, armor, axe, bow, club, helm, ring, shield, staff and sword). If you don't have any item of a type, any other item of that type is considered to be better. Thus to get progressively better items you should keep the most expensive item of each item type in your inventory. This check for better items is also done for items that are created to fill up a slot after you have leveled or bought one of his items. Also note that this works in Hellfire only. Sometimes you will see an item "violating" this rule in Hellfire, as the game only tries a specific number of times, and if it has not found an item that matches in those tries it sticks with whatever item it generates next.