View Single Post
  #5  
Old 12-28-2006, 08:30 PM
Aerewen
Hill Giant
 
Join Date: Dec 2006
Posts: 110
Default

After looking at this code i think we have a slightly larger problem on our hands...

The merchantlist information is being stored in an array... which means that presently, whenever a player accesses a merchant, that data comes out of the array and has nothing to do with the database. So we actually don't need to change anything with the way merchants handle items sold to them, instead what needs to happen is that the zone should only load the items in the merchantlist table at startup since they don't change. Then we need to modify the code for the function when a player accesses that merchant, and have it load the values from the merchantlist_temp table into the file...

where this causes a problem is what happens when 2 players access the same merchant at the same time. if a merchant had 1 discordant scoriae on it... and 2 players accessed the merchant at the same time, they could both buy that item since the temp list would only be loaded at the time of browsing... thus creating a method of item duplication.
Reply With Quote