Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2014, 11:27 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default 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.
Reply With Quote
  #2  
Old 10-19-2014, 11:54 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

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;
}
Reply With Quote
  #3  
Old 10-20-2014, 06:00 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

@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.
Reply With Quote
  #4  
Old 10-20-2014, 07:26 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

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.
Reply With Quote
  #5  
Old 10-20-2014, 11:41 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

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.
Reply With Quote
  #6  
Old 10-21-2014, 10:46 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

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.

Reply With Quote
  #7  
Old 10-22-2014, 04:41 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

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?
Reply With Quote
  #8  
Old 10-22-2014, 07:22 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

October 12
Reply With Quote
  #9  
Old 10-22-2014, 07:28 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Update the source to at least include 10/13 and let us know.
Reply With Quote
  #10  
Old 10-22-2014, 08:06 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I imagine it is just zone file change, maybe I can get to it this afternoon.
Reply With Quote
  #11  
Old 10-22-2014, 10:55 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Yep, that one space fixed it. I see it broke the query because of the order statement not having the space.
Reply With Quote
  #12  
Old 10-15-2015, 10:44 PM
Azrealvect
Sarnak
 
Join Date: May 2011
Posts: 53
Default

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.
Reply With Quote
  #13  
Old 10-15-2015, 10:49 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Mine was just a space in the query, but I would imagine that was fixed way back in January.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:21 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3