Are merchant lists with more than 28 items possible?
Currently in EQEmu if a merchant's item list has more than 28 items, it will appear blank.
Merchants on the EQ live servers often have many more items than this (usually when players sell things to them), so it must be possible somehow. Being able to have more than 28 items per list would be VERY handy for tradeskill item merchants, which I'm working on ATM. There are so many different moulds, patterns etc. that there aren't enough merchants for the number of lists needed! |
I maybe wrong but i think the limit is 28 or 30 items
|
Heres where we send the number of items
int cpisize = sizeof(MerchantItem_Struct) + (29 * sizeof(MerchantItemD_S truct));^M MerchantItem_Struct* cpi = (MerchantItem_Struct*) new uchar[cpisize];^M memset(cpi, 0, cpisize);^M const Item_Struct *item; for (unsigned int i=0;i<database.GetMerchantListNumb(merchant_id) && i < 29; i++) Im not much of a packet mangler, so Im not sure if we can just up this number, but we can always check.. I'll see if I can up it to 36 tonight and see if it works. |
Do this:
int cpisize = sizeof(MerchantItem_Struct) + (36 * sizeof(MerchantItemD_S truct)); MerchantItem_Struct* cpi = (MerchantItem_Struct*) new uchar[cpisize]; memset(cpi, 0, cpisize); const Item_Struct *item; for (unsigned int i=0;i<database.GetMerchantListNumb(merchant_id) && i < 36; i++) Although I'm pretty sure you could make it dynamic by doing something like this... int32 numitems = database.GetMerchantListNumb(merchant_id); int cpisize = sizeof(MerchantItem_Struct) + (numitems * sizeof(MerchantItemD_Struct)); MerchantItem_Struct* cpi = (MerchantItem_Struct*) new uchar[cpisize]; memset(cpi, 0, cpisize); const Item_Struct *item; for (unsigned int i=0; i < numitems; i++) |
Probably a better idea.. Be alot more flexible to do it that way..
|
EQlive merchant max atm is 80 items. They did this so it would allow bazaar traders to sell more items, since I believe that code is based off of merchant code.
|
So it was 29 Now its more, well i was halfass right, lol
But i think Kill is right about the bazaar code |
EQLive does send an 80 item list, however the server side merchant list is > 80.
Code:
--- ../../../cvs/NightDumps/Source/zone/client_process.cpp 2003-02-03 08:38:21.000000000 -0700 |
Have you been able to test this out? If it works ok, I'll look into rolling it into the code.
|
Aye, not sure about the >= 81 check. cpi->check shouldn't/can't ever go above 80.
|
I think 80 items is more than enough...
I might try to do it dynamiclly like Lyn suggested that way we only pass what we need to pass, and just put a cap on it at 80 like you did. I'll try to tinker with it tonight. |
That would be really useful, especially for merchants selling spell scrolls or tradeskill supplies.
80 items is more than enough (probably about 40-50 items is the max that you'd ever need), larger numbers might cause too much lag anyway (clicking on a merchant with a lot of items often causes brief server lag whilst the item data is loaded from the DB) |
All times are GMT -4. The time now is 12:52 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.