Rochet2 / TrinityCore

Rochet2's stuff for TC
https://rochet2.github.io
90 stars 143 forks source link

Multi Vendor #112

Closed V3nomAnc3r closed 4 years ago

V3nomAnc3r commented 4 years ago

Hey @Rochet2 How can i create Multi multi shop:D

i mean when i select Head gossip i want add another gossip to the head gossip 😄

Rochet2 commented 4 years ago

Not sure what you mean. Complex submenus are supported if you mean those. like

opt01
opt02
opt03 -> opt11
         opt12 -> opt21
         opt13    opt22
                  opt23

where any of those could open a vendor - or any other gossip like bank or whatever.

V3nomAnc3r commented 4 years ago

yeah something like that

When i click on opt03, i want see opt11, opt12, opt13

Rochet2 commented 4 years ago

Are you trying to use SQL or C++? In SQL you can make an option open another menu (another menu_id) through ActionMenuID in the gossip_menu_option tables.

V3nomAnc3r commented 4 years ago

@Rochet2 can you give me sample please SQL

And can you fix transmog vendor For azerothcore if you have time!

Rochet2 commented 4 years ago

Hmm .. here is some kind of pseudo code

INSERT INTO gossip_menu_option
(MenuId, OptionId, OptionText, OptionType, ActionMenuId) VALUES

(1000, 1, "opt01", 1, 0),
(1000, 2, "opt02", 1, 0),
(1000, 3, "opt03", 1, 1001), -- see how this references 1001, so it redirects to the menuid 1001

(1001, 1, "opt11", 1, 0),
(1001, 2, "opt12", 1, 0),
(1001, 3, "opt13", 3, 465); -- optiontype 3 signals we want to open a vendor and actionmenuid signals which vendor

and with that setting the gossip_menu_id of a creature to 1000 in creature_template would open the first menu. Dont forget to add vendor and gossip npcflags (129).

V3nomAnc3r commented 4 years ago

@Rochet2 Thank You <3