Thread: Merchants: Hidden items
View Single Post
  #6  
Old 05-26-2010, 09:10 AM
Bumamgar Bumamgar is offline
Sarnak


Join Date: Apr 2010
Posts: 284
Default

The server and client have a packet format that is used to transfer information like the merchants inventory. If this packet format doesn't match, things don't work.

Since we're on an emulator server using the Titanium client, we have to conform to the packet format used by the Titanium client, and it expects certain information from the server regarding the merchants inventory. The server has to supply this information as dictated by the client or things don't work. Back in 1999 the packet format used between the server and UI for merchants only had space for 40 item pointers. On Sept 4th, 2002, they modified the packet format to expand it to 80 items (just prior to PoP), which is it's current state.

That being stated, it may be possible to modify the server code such that it only sends a portion of the merchants inventory to the client and fills the rest of the structure with padding (so it still would send 80 'items', just some of them would be blank). However, due to the client we are using, that portion would still be sortable in the client and would still display the cost next to each item, etc (ie: NON CLASSIC) unless the user is using a UI that hides this information.

So although it might be possible to modify the server to have it 'hide' the portions of the merchants inventory over 40 items, it would be a bit of a hack and involve having two seperate data structures. One for the merchant in memory, and one that is sent as the packet to the client with extra logic to mask out any items beyond the 40th. This is a departure from the way all entities are handled currently and might have unintended consiquences. Since the emu is fundamentally built on structures reverse engineered from the client, all the in-memory structures used for merchants, mobs, players, etc on the server are based on the network structures used to pass the data to the client.

Frankly, this seems (to me) to be a waste of developer time, especially on a server like ours where you don't have 2000 players selling junk to vendors. Players on this server know the value of items and know what to save and sell to other players. Have you actually found vendors selling more than 40 items? Were any of those items actually something that you would have enjoyed 'finding' by wasting cash buying off their excess junk to 'uncover' ?
__________________
-Bumamgar
Last edited by Bumamgar; 05-26-2010 at 09:27 AM..