PDA

View Full Version : Alternate Currency merchant limits


chrsschb
10-12-2015, 04:47 PM
I'm wondering if they retain the same 80(?) item limit as regular merchants or do they have a different limitation (hopefully higher) due to their different window and sorting features.

I found this but haven't had a chance to test yet (currently populating slowly):

I think this is limited because the client can only see a certain number of items on a merchant.. but not 100% sure on that.. if you want to mess with it.. you can though :p


client_process.cpp

void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
const Item_Struct* handyitem = nullptr;
uint32 numItemSlots=80; //The max number of items passed in the transaction.
const Item_Struct *item;
std::list<MerchantList> merlist = zone->merchanttable[merchant_id];




It seems other merchants like alternate currency ones can list up to 255 items.. (i think)

I'm on the UF client, so if that 255 item limit applies that'd be super nice.

Thanks!

demonstar55
10-12-2015, 05:22 PM
asdhjkiofwjuiopbtrhu9w3hipe


Try it :P

Kingly_Krab
10-12-2015, 05:24 PM
Well, according to that code snippet, it seems to be hard-coded at 80 regardless of merchant type, so putting 255 items on an NPC may not even work; however, if you want to remove that limitation you can try the below Perl file that auto-generates merchant entries to a .SQL file using the first 255 items (1001-1255). sub A {
open $file, ">test.sql";
my $n = 1;
for ($i = 1001; $i < 1256; $i++) {
say $file "INSERT INTO `merchantlist` VALUES ('1', '$n', '$i', '-1100', '0', '0', '65535', '100');";
$n++;
}
close $file;
}
A();

chrsschb
10-12-2015, 06:00 PM
asdhjkiofwjuiopbtrhu9w3hipe


Try it :P

Working on it, I have 120 items to put on this currency. Gonna take a while to create them all though :D

Kingly_Krab
10-12-2015, 06:16 PM
Likely a better idea to test the limitations first using placeholder items so you know how many you can put on each NPC.

chrsschb
10-12-2015, 06:20 PM
I already have a solution in place if I can't. Not a huge deal. Soon as I hit 81 gonna reboot and test. I have to do this work anyways, so it's not any extra time.

Noport
10-12-2015, 07:03 PM
chrmgold.pl

sub EVENT_SCALE_CALC {
my $money = $client->GetCarriedMoney();

if($money < 0) {
$money = 0;
}
if($money > 64425000) {
$money = 64425000
}

$questitem->SetScale($money/64425000);
}

Kingly_Krab
10-12-2015, 07:40 PM
Don't think that's related to what he's wanting to do, haha.