I'm having an issue creating custom vendors through sql and I've spend some time trying to figure it out with no success, hoping someone can help:
What I want:
To be able to add items to custom vendors, like those provided by brotalnia in the elysium repack, through a db manager (I'm currently using dbeaver).
What is wrong:
I can add all my loot tables using INSERT INTO `npc_vendor`, however only 1 or 2 vendors display their items, then the rest of them only display 1 or 2 items or none at all. If I try and add items to the vendors in game after this issue, it says the item is already in the loot table (but it is not displayed in the in game loot menu).
An example of what I'm trying:
I copied my initial entry from creature_table from a random vendor, and changed some things like the entry, model id, ect. Generally the entries go 41000, 41001, 41002...
INSERT INTO mangos.creature_template
(entry, patch, KillCredit1, KillCredit2, modelid_1, modelid_2, modelid_3, modelid_4, name, subname, gossip_menu_id, minlevel, maxlevel, minhealth, maxhealth, minmana, maxmana, armor, faction_A, faction_H, npcflag, speed_walk, speed_run, `scale`, `rank`, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, `type`, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, spells_template, PetSpellDataId, mingold, maxgold, AIName, MovementType, InhabitType, Civilian, RacialLeader, RegenHealth, equipment_id, trainer_id, vendor_id, MechanicImmuneMask, SchoolImmuneMask, flags_extra, ScriptName)
VALUES (41001, 0, 0, 0, 3114, 0, 0, 0, 'Hunter', 'Set Vendor', 9360, 30, 30, 1605, 1605, 0, 0, 1200, 875, 875, 4, 1.24, 1.14286, 1.15, 0, 42, 53, 0, 122, 1, 2000, 2000, 1, 4608, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'EventAI', 0, 3, 0, 0, 1, 1887, 0, 0, 0, 0, 2, '');
Then I'll input multiple item sets for each vendor like so(however in practice it generally has teir 1, 2 and 3 + pvp gear):
INSERT INTO `npc_vendor`(`entry`, `item`, `maxcount`, `incrtime`) VALUES (41000, 16820, 0, 0);
INSERT INTO `npc_vendor`(`entry`, `item`, `maxcount`, `incrtime`) VALUES (41000, 16821, 0, 0);
INSERT INTO `npc_vendor`(`entry`, `item`, `maxcount`, `incrtime`) VALUES (41001, 16822, 0, 0);
INSERT INTO `npc_vendor`(`entry`, `item`, `maxcount`, `incrtime`) VALUES (41001, 16823, 0, 0);
INSERT INTO `npc_vendor`(`entry`, `item`, `maxcount`, `incrtime`) VALUES (41002, 16824, 0, 0);
INSERT INTO `npc_vendor`(`entry`, `item`, `maxcount`, `incrtime`) VALUES (41002, 16825, 0, 0);
INSERT INTO `npc_vendor`(`entry`, `item`, `maxcount`, `incrtime`) VALUES (41003, 16826, 0, 0);
I've tried inserting less items into each vendor, but it doesnt change anything.
Thanks for any help.