Merchant Issues Thread

Old bugs stored here for reference.
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Merchant Issues Thread

Post by John Adams » Tue Oct 16, 2012 6:45 pm

Shit, there could be something wrong with my item. Now my Templar does not see my templar item :D Hold pls.

dunno how tho, it is *exactly* the same item, just with the skill_req value changed from Paladin to Templar.


Edit: k, this is why this shit pisses me off. 2 identical records:

Code: Select all

INSERT INTO `items`(`id`,`name`,`item_type`,`icon`,`count`,`tier`,`skill_id_req`,`skill_id_req2`,`skill_min`,`skill_max`,`weight`,`description`,`show_name`,`attuneable`,`artifact`,`lore`,`temporary`,`notrade`,`novalue`,`nozone`,`nodestroy`,`crafted`,`good_only`,`evil_only`,`lore_equip`,`ornate`,`heirloom`,`appearance_only`,`usable`,`slots`,`set_name`,`sell_price`,`stack_count`,`collectable`,`adornment_description`,`offers_quest_id`,`part_of_quest_id`,`quest_unknown`,`max_charges`,`display_charges`,`recommended_level`,`adventure_default_level`,`tradeskill_default_level`,`adventure_classes`,`tradeskill_classes`,`soe_id`,`lua_script`) VALUES ( NULL,'Paladin','Spell','0','1','1','0','0','0','0','0',NULL,'1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',NULL,'0','1','0',NULL,'0','0','0','0','0','0','1','1','0','0','0',NULL); 
INSERT INTO `items`(`id`,`name`,`item_type`,`icon`,`count`,`tier`,`skill_id_req`,`skill_id_req2`,`skill_min`,`skill_max`,`weight`,`description`,`show_name`,`attuneable`,`artifact`,`lore`,`temporary`,`notrade`,`novalue`,`nozone`,`nodestroy`,`crafted`,`good_only`,`evil_only`,`lore_equip`,`ornate`,`heirloom`,`appearance_only`,`usable`,`slots`,`set_name`,`sell_price`,`stack_count`,`collectable`,`adornment_description`,`offers_quest_id`,`part_of_quest_id`,`quest_unknown`,`max_charges`,`display_charges`,`recommended_level`,`adventure_default_level`,`tradeskill_default_level`,`adventure_classes`,`tradeskill_classes`,`soe_id`,`lua_script`) VALUES ( NULL,'Templar','Spell','0','1','1','0','0','0','0','0',NULL,'1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0',NULL,'0','1','0',NULL,'0','0','0','0','0','0','1','1','0','0','0',NULL); 
UPDATE `items` SET `skill_id_req`='90523872' WHERE `id`='1'; -- Paladin
UPDATE `items` SET `skill_id_req`='2581053277' WHERE `id`='2'; -- Templar
INSERT INTO `merchants`(`id`,`merchant_id`,`inventory_id`,`description`) VALUES ( NULL,'1','1','skills test'); 
INSERT INTO `merchant_inventory`(`id`,`inventory_id`,`item_id`,`quantity`) VALUES ( NULL,'1','1','65535'); 
UPDATE `spawn` SET `merchant_id`='1' WHERE `id`='10000'; 
I created a brand new spawn in GMHall, and assigned it Merchant_ID = 1 after building 2 brand new items identical to each other except their skill_req fields, and stuck them in the merchants table.

The only one I see, at all, is Paladin.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Merchant Issues Thread

Post by John Adams » Tue Oct 16, 2012 7:04 pm

Oh, but if I click the Sell tab, I see both Paladin and Templar. Hmm... Jabantiz? :)

I do not possess either of those 2 items, so I probably shouldn't see jack on the Sell tab?

And either way, now that I know it's not my data... I can still see both anyway. So something's all jacked up, and it's time for Castle and The Walking Dead. Have fun :)

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Tue Oct 16, 2012 7:24 pm

I will look into this in a little bit and see if I can figure out what is going on.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Tue Oct 16, 2012 8:19 pm

My tests where quick, I added a defiler adept to merchant list 1 and logged on my guardian and went to a merchant.
Image

I changed the spawns merchant type field in the DB to 4 (spell merchant) and did a /reload spawns
Image

This is using items already in the db, items only show in the buy tab. All I did was add an entry in merchant_inventory table. Will go find some armor and test with that now.

EDIT: I had to change the skill_req of an item to something my char didn't have but afterwards it worked the same, merchant type 0 everything was displayed, merchant type 4 only stuff I had skills for was displayed. It is possible for stuff you can't use to be displayed on merchant type 4 as it only checks skill_id_req and skill_id_req2.
Last edited by Jabantiz on Tue Oct 16, 2012 8:40 pm, edited 1 time in total.
Reason: Did more tests

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Tue Oct 16, 2012 8:48 pm

Looking at the sql you posted above skill_id_req2 = 0 for both items, for the item to show on a merchant type 4 both skill_id_req1 and skill_id_req2 needs to be 0xFFFFFFFF or the player has to have both skills or the player has one skill and the other is 0xFFFFFFFF. Not sure why the items are not showing on a merchant type 0 though.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Merchant Issues Thread

Post by John Adams » Wed Oct 17, 2012 6:24 am

Hmm, good research. No idea if you're saying the items are actually showing wrong or not tho. My DB is entirely empty, and the only items I tested with were type "Spells", so not really apples to apples. My intent was to figure out if "spell merchants" only showed spells for my class. After an hour of thinking my 2 simple item inserts were wrong, I discovered both my Paladin and Templar items appeared on my Sell tab, and not on my Buy tab (only the Paladin one was on Buy), which is why I dragged you into it because you recently fixed something with merchants, while seemingly unrelated, maybe had some other undesired effect. OR... somehow the inserts I did are somehow invalid, causing the data to corrupt loading the merchant list (though that still does not explain why items are on the Sell tab for me when I have zero items to Sell).

My intent was to implement a "class merchant" - not Skills related. Not for any other reason than to see if I could, because I doubt EQ2 Live has such a thing. But, I wanted to see merchant lists of items my CLASS could use. I thought it would be simple, but as usual, ran into a ton of buggy road blocks preventing me from feeling even remotely successful.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Wed Oct 17, 2012 12:47 pm

It is working correctly for me for both spell books and armor. The sql you posted only has 1 item inserted into merchant_inventory, I had assumed item 2 got left out in the copy paste. Not sure why this isn't working for you.

I will play with the data you posted later today and see if I can find the problem.

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Merchant Issues Thread

Post by alfa » Wed Oct 17, 2012 1:35 pm

John Adams wrote:So this is now a question:
Does Everquest 2 (live) show players items they CANNOT use anymore? I recall long ago, items would still be shown (for Templars, when I was a Paladin, for example), but the item would be RED text if I could not use it - either due to class or level restrictions. Is this not the case anymore in EQ2 Live?
It's depend of merchant John, some merchant sall everything for everyone (like some npc sale equipement, cause you can trade it with an alt for ex.), some npc just show you items by archetype, by class, by faction.
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Wed Oct 17, 2012 3:53 pm

Empty DB, I sourced the items posted above into my DB and did a /spawn create and set every thing up for a merchant and got nothing...

When I select the merchant I only get a sell tab, so not sure what I am missing when manually setting up a merchant.

EDIT: NM, stupid mistake on my part forgot to /reload items, my merchant is set up both items are displaying and changing to merchant type 4 only the paladin item is displaying (my char is a paladin) so it is working as intended. I tried with skill_id_req1 and skill_id_req2 both set to the same value as well as req2 being 0 as in the example above.

I also noticed when making a new DB and connecting to the DB Patcher 2 items were placed in the items table so I had id's of 3 and 4 for the test items, modified merchant_inventory to those id's and every thing works as it should. I have no clue what else to try to reproduce the issues you are having.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Merchant Issues Thread

Post by John Adams » Wed Oct 17, 2012 6:37 pm

Thank you for taking the time to look into this. I believe I may have worked too hard and slept too little yesterday to make sense of the Buy/Sell tabs ;)

The merchant in my world showed 1 item in the Buy tab. "Paladin". That could be explained by the missing item #2 in my merchant_inventory table (I do not see it there now, but swear it was there before).

Secondly, I had no items in my character inventory whatsoever, and the Sell tab showed both merchant items - even though one was clearly not on the merchant's list (oops). Unless you are saying that the blank tables from Patcher are setting my player up with items 1 and 2, which are FK'd and constrained to Items (which was empty, so impossible) or I would have gotten sql insert errors?

Thirdly, and more to the absolute point of everything I really was asking, is why is the non-spells merchant list "if" forcing me to only see class or skill=generic items, when I believe I should see everything on the list, regardless of my skills or class or anything else, even if the skill ID is 0, or 0xFFFFFFFF, or set to a player skill or otherwise... AND, my merchant is <> type 4.

Meaning, I do not think it should be restricting items to classes for non-spells merchants.

So the check (merchant_type & MERCHANT_TYPE_SPELLS) == 0 .... is this correct, or not?


Edit: Oh, and fourth... Why would items in a merchants inventory (only) ever show up in my Sell tab, when I do not own them? Tied to the Secondly :)


If you truly cannot reproduce this, I could package up my entire DB for you. Or, you can let it go because all I was asking you about really was the bitwise checker, if I was reading it correctly. I will spend more time this weekend after I have slept more than 3 hours a night.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Wed Oct 17, 2012 7:12 pm

I can not reproduce this at all, when the merchant is not a spell merchant all items are shown for me no matter what the skill req is, I never seen the merchant inventory populate the sell tab (I have seen sell and buy tabs get flipped but that is a diffrent issue).

(merchant_type & MERCHANT_TYPE_SPELLS) == 0 is saying is not a spell merchant, and that is correct for the if statement that it is in.

If you want to send me the entire DB go ahead, I would like to try and figure out why we are having such diffrent results and I am out of ideas on how to test this.

On a side note, not sure if it is related, one of my chars on my local server seems to have gotten corrupted, mainly inventory, when crafting it said I didn't have the 2 coal even though I had 216 in my bag and in the DB. No matter what I did I couldn't resolve that. Some how that chars inventory was being corrupted even though the DB tables looked fine, I wonder if this could be the same issue and why items are showing in your sell tab. No clue how or why the info seems to get corrupted though so if this is the problem no clue how to track it down.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Merchant Issues Thread

Post by John Adams » Thu Oct 18, 2012 3:40 pm

It is possible, tho this particular DB is a fresh one from PatchServer. All I did initially was populate it with raw data, which I have since removed.

Attached are both my loginserver and worldserver databases ( so you even have MY characters ), if you run a local loginserver that is. Otherwise, I am pretty sure it'll behave the same for you with new chars.

Again, don't waste your time if you think this is working fine. You have more important tasks, and I no longer trust my own data so that could certainly be it. But, if you are curious, here's the data.
You do not have the required permissions to view the files attached to this post.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Thu Oct 18, 2012 4:29 pm

I believe it is all data issues, in merchant_inventory it only has 1 item listed, the paladin spell. The paladin char sees it no matter what the templar only sees it when merchant type is not 4 so this is all working correctly.

The issue with both items showing in the sell tab is that in the DB both chars have both items (character_items) in the DB it says the items are in slot 250 and 251, that might be why they don't show in the inventory. They were both probably put there because starting_items is set up to give items 1 and 2 to all new chars, no clue how slot id's got set to what they are though.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Merchant Issues Thread

Post by John Adams » Thu Oct 18, 2012 4:47 pm

Oh for fuck sake... that's embarrassing :D

Thanks for wasting your time on your sleep-deprived Admin's non-bug, Jab. I'll sleep for a few days before trying anything again.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Merchant Issues Thread

Post by Jabantiz » Mon Dec 31, 2012 8:29 pm

- As a new toon, I get a stack of 20 'flask of water' to start. If I /summon another of the same type, then go to Sell to Merchant, I cannot select the top-most 'flask of water' item if I have the second one selected. Like the list is getting confused.
This should be fixed on Dev SVN now.

This issue seemed to be caused by the fact we didn't identify the unique_id in the struct and send the proper id's for the sell list. After figuring out how they do it it should now work properly, only tested it in DoV (1096) and CoE (1193)

Locked

Who is online

Users browsing this forum: No registered users and 0 guests