|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Support::Windows Servers Support forum for Windows EQEMu users. |
10-19-2014, 11:27 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Merchant Temp Items
What determines what actually shows on the temporary merchant list? I am looking at the table, the slots, etc and when I see the merchants actual inventory in game it only shows a small portion of what the table shows for that NPCid. This particular merchant even has 4 rows with one the same item with different quantities and only shows one of those rows.
|
|
|
|
10-19-2014, 11:54 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
I believe the code in the source just grabs one of them, here's the code for it:
Code:
void Zone::LoadTempMerchantData() {
LogFile->write(EQEMuLog::Status, "Loading Temporary Merchant Lists...");
std::string query = StringFormat(
"SELECT "
"ml.npcid, "
"ml.slot, "
"ml.charges, "
"ml.itemid "
"FROM "
"merchantlist_temp ml, "
"spawnentry se, "
"spawn2 s2 "
"WHERE "
"ml.npcid = se.npcid "
"AND se.spawngroupid = s2.spawngroupid "
"AND s2.zone = '%s' AND s2.version = %i "
"ORDER BY ml.slot ", GetShortName(), GetInstanceVersion());
auto results = database.QueryDatabase(query);
if (!results.Success()) {
LogFile->write(EQEMuLog::Error, "Error in LoadTempMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
std::map<uint32, std::list<TempMerchantList> >::iterator cur;
uint32 npcid = 0;
for (auto row = results.begin(); row != results.end(); ++row) {
TempMerchantList ml;
ml.npcid = atoul(row[0]);
if (npcid != ml.npcid){
cur = tmpmerchanttable.find(ml.npcid);
if (cur == tmpmerchanttable.end()) {
std::list<TempMerchantList> empty;
tmpmerchanttable[ml.npcid] = empty;
cur = tmpmerchanttable.find(ml.npcid);
}
npcid = ml.npcid;
}
ml.slot = atoul(row[1]);
ml.charges = atoul(row[2]);
ml.item = atoul(row[3]);
ml.origslot = ml.slot;
cur->second.push_back(ml);
}
pQueuedMerchantsWorkID = 0;
}
|
|
|
|
10-20-2014, 06:00 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
@prov: How old is your source? I just did some work on perm and temp items.
@krab: Actually it depends on how many perm items the merchant has. They have 80 visible slots. The previous issue was that if the merchant had 79 items it wouldn't grab a temp item as the 80th slot. There is still a sort needed after temp item purchase or a different gap fix.
|
10-20-2014, 07:26 AM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
My source is very, very new.
This is confusing then, why is that query going after the spawn group and such? It looks like the query is matching only items that are dropped in that zone, and that would make no sense at all. Maybe I just need more coffee and then look at it again.
|
10-20-2014, 11:41 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Don't ask me, I didn't write the query...
But, no. The query checks if the NPC is a merchant from that zone, not if the item drops from there.
|
10-21-2014, 10:46 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
This is where I am not understanding it. If you look at this NPC, this is in game after I rebooted just to make sure. But actually, the table shows him having 71 items in the temp table. It looks to me when the zone is booting, even though there are entries in the temporary merchant list, it is not loading them like it used to. My rule is set to not clear the merchant list on boot, but it definitely is not loading them.
|
10-22-2014, 04:41 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
This could be one of two issues. Either your temp table is getting erased on server boot (which is happening on my test server), or there are slot gaps in the table. Recheck the table after boot-up.
When you say your working very, very new, are you running at least beyond OCT 13 updates?
|
10-22-2014, 07:22 AM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
October 12
|
10-22-2014, 07:28 AM
|
|
Developer
|
|
Join Date: Mar 2003
Posts: 1,497
|
|
Update the source to at least include 10/13 and let us know.
|
10-22-2014, 08:06 AM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
I imagine it is just zone file change, maybe I can get to it this afternoon.
|
10-22-2014, 10:55 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Yep, that one space fixed it. I see it broke the query because of the order statement not having the space.
|
10-15-2015, 10:44 PM
|
Sarnak
|
|
Join Date: May 2011
Posts: 53
|
|
So how was this fixed? Im on akkas repack and I am still having this problem after multiple installs. Clear merchant temp list rule is turned to false, Temp list is populated in heidi however it is not loading. With the repack I dont really have access to the source, and latest install and update was today october 15, 2015. Any ideas would be great! Again it is doing the same thing, sell an item and its there until you leave the merchant screen, immediately click back on merchant and item is gone.
|
10-15-2015, 10:49 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Mine was just a space in the query, but I would imagine that was fixed way back in January.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:21 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|