I missed some bugs
Selling the last item in a stack will crash the zone server.
I moved the updateing of player inventory on a PlayerSell into the deleteitem function. and properly check against 0 now instead of 1 (oops).
Altered NPC's removeitem to take slots & quantities.
Fixed BulkSendMerchantInventory, we want 80 items not 81, and if The merchant has more than 80 items in the DB we truncate the list and send the first 80 instead of sending an empty merchant.
Ontop of all that, actualy the reason i had to do all this =) I've added code for merchants to resell items players sell to them.
They do this by adding the items into thier loot table, and removeing them when items are bought. It's got some issues, I'm pretty sure i got all the inventory corruption nailed down, but back up character_ just in case ect. Leaveing just the one client lockup, When the merchant sells the last inventory item, The client window needs updated to remove the item(or they're just big old dupeing machines), and I didn't see a nice way of telling them no sale. So the vendor will tell them they can't find the item and to try back later, then does a break; but this leaves the client locked up untill they zone/log =(
To enable add a variable MerchantsKeepItems 0/1 to the sql, it defaults to off if there is no variable MerchantsKeepItems
|