• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Increase vendor space

Status
Not open for further replies.

Tok124

Respected Member
Hello,

I am making a Mount Vendor. I selected all the mounts from item_template and exported the results into an SQL file and edited the SQL file so it inserts to npc_vendor. However... when i restarted my server i can only see 5 pages. I cannot see any flying mounts. If i try add a flying mounts with ingame command to mount vendor it says that it's already in the list. Then i tried to add the flying mount to starter vendor with ingame command and i could see the flying mount. The starter vendor only have 4 pages. So i guess 5 pages is the cap since i cannot add any more stuff to that vendor. Is there any way to increase the space so that i can have all my mounts in that vendor?

Link to the SQL that i inserted: http://pastebin.com/8pHp371y
 

Rochet2

Moderator / Eluna Dev
#define MAX_VENDOR_ITEMS 150 // Limitation in 3.x.x item count in SMSG_LIST_INVENTORY

Seems to be max 15 pages with 10 items per page.
You have way more than that.
See startup errors.

If you want to have all the mounts in one vendor you need to split them to different vendor views and use multivendor.
Otherwise you need to use trainer or separate NPCs.
 
Last edited:

Tok124

Respected Member
#define MAX_VENDOR_ITEMS 150 // Limitation in 3.x.x item count in SMSG_LIST_INVENTORY

Seems to be max 15 pages with 10 items per page.
You have way more than that.
See startup errors.

If you want to have all the mounts in one vendor you need to split them to different vendor views and use multivendor.
Otherwise you need to use trainer or separate NPCs.
Alright, I found "#define MAX_VENDOR_ITEMS 150" in Creature.h, But if i change the value from 150 to 500 what would happen? Wouldn't that increase the space? I found your MultiVendor too. I might use it if i dont find any other option to fix this
 

Zero

Noble Member
Might be a silly question, but are the mounts you're adding usable by your characters race? If not they won't be displayed unless you've got a GM tag on.

You can only view 150 items per vendor though, so if you've got 150 ground mounts added first then you won't be able to see the rest of the mounts even if they're in npc_vendor or not.
 

Tok124

Respected Member
Might be a silly question, but are the mounts you're adding usable by your characters race? If not they won't be displayed unless you've got a GM tag on.

You can only view 150 items per vendor though, so if you've got 150 ground mounts added first then you won't be able to see the rest of the mounts even if they're in npc_vendor or not.
Yeah, I know that Class Mounts wont be visible to players. But for example the Paladin Mount is not added because there is no item to learn that mount. The Class Trainer teaches the paladin that spell/mount. So i already know about that. I think the only mount i added that requires a class is the Death Knight Flying Mount

And i tried to check the vendor with .gm on. Then it actualy shows 6 pages

And it's not completly true either that players can't see mounts that are not usable by their race. I think players can't only see items/mounts that is not usuable by their class. As you can see here
2lclcgy.png


There is no GM Tag on and i can see the Alliance Mount
 
Last edited:

Zero

Noble Member
They shouldn't be able to see the item mounts which they can't use though, such as race restricted ones as well.

Try inserting them into a different vendor.
Code:
INSERT INTO npc_vendor (entry, item) SELECT 60051 AS entry, entry AS item FROM item_template WHERE class = 15 AND subclass = 5 LIMIT 150;
Change "SELECT 60051" to whatever entry you want for your new vendor.

Also run this and see if they actually got inserted properly.
Code:
SELECT * FROM npc_vendor WHERE entry = 60051;
 
Last edited:

Tok124

Respected Member
They shouldn't be able to see the item mounts which they can't use though, such as race restricted ones as well.

Try inserting them into a different vendor.
Code:
INSERT INTO npc_vendor (entry, item) SELECT 60051 AS entry, entry AS item FROM item_template WHERE class = 15 AND subclass = 5 LIMIT 150;
Change "SELECT 60051" to whatever entry you want for your new vendor.

Also run this and see if they actually got inserted properly.
Code:
SELECT * FROM npc_vendor WHERE entry = 60051;
They are all inserted correctly. I have tried diffrent vendors and all that. But it wont work... Anyway, I will use the MultiVendor made by rochet
 

Rochet2

Moderator / Eluna Dev
Alright, I found "#define MAX_VENDOR_ITEMS 150" in Creature.h, But if i change the value from 150 to 500 what would happen?
Client would crash.



The page amount does seem very low, so it doesnt seem to be overflowing. Zero is right ..
hmm

I see.
The mount items are not bound on pickup so if they are not for your race or class you can still see them.
if (!(itemTemplate->AllowableClass & _player->getClassMask()) && itemTemplate->Bonding == BIND_WHEN_PICKED_UP && !_player->IsGameMaster())
continue;

Or hmm . in your SS they are ..
so you must be having GM on ?_?

What core are you using?
 
Last edited:

Tok124

Respected Member
Client would crash.



The page amount does seem very low, so it doesnt seem to be overflowing. Zero is right ..
hmm

I see.
The mount items are not bound on pickup so if they are not for your race or class you can still see them.


Or hmm . in your SS they are ..
so you must be having GM on ?_?

What core are you using?
Eluna 3.3.5
 

Zero

Noble Member
I filled up a vendor with your query (310 items) and I have the same issue you're having. It's overflowing I'd assume.

Removed 160 items and I am seeing 13 pages without the GM tag on, 15 with the tag on.

Split your mounts into different vendors. :)
 

Tok124

Respected Member
I filled up a vendor with your query (310 items) and I have the same issue you're having. It's overflowing I'd assume.

Removed 160 items and I am seeing 13 pages without the GM tag on, 15 with the tag on.

Split your mounts into different vendors. :)
Alright, Thanks for the help, Dunno why i can only see 5 tho. Anyway... I will try to put Ground Mounts in 1 Vendor and Flying Mounts in another
 
Status
Not open for further replies.
Top