Merchant Bug and Fix
Merchants currently have a bug in 3.1.1 where they miss the last item in the list of items to be sold.
zone/client_process.cpp: case OP_ShopRequest: { ... for(int x=1; x < database.GetMerchantListNumb(merchantid) && x < 30; x++) should be: for(int x=0; x < database.GetMerchantListNumb(merchantid) && x < 29; x++) ... uint16 item_nr = database.GetMerchantData(merchantid,x); should be: uint16 item_nr = database.GetMerchantData(merchantid,x+1); ... item->equipSlot = x-1; // this needs to be incremented in loop. should be: item->equipSlot = x; // this needs to be incremented in loop. |
There is also a problem with the merchant id loading one place is in struct NPCType, it is int8 merchanttype, when it should be something like uint32 merchanttype. I'm not looking at the source at this second and there may be other places than this one.
|
That last bug sounds like it's the reason that only merchant IDs below 256 work.. since the ID gets mistakenly converted to a single-byte INT it can't store numbers higher than that.
|
Yep that's exactly it =)
|
This fixes it, but makes the first item of the list dissapear instead :p
|
It fixes it if you follow it to the letter (or number in this case), as you found out =)
|
All times are GMT -4. The time now is 04:25 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.