void MyAddOn::OpenMainMenu(Player* player) { GossipMenu* menu = new GossipMenu("Welcome to my addon", 0, player); menu->AddItem(0, "Option 1", 1); menu->AddItem(0, "Option 2", 2); menu->Send(); }
void MyAddOn::Option1Selected(Player* player) { GossipMenu* menu = new GossipMenu("Option 1 submenu", 0, player); menu->AddItem(0, "Suboption 1.1", 11); menu->AddItem(0, "Suboption 1.2", 12); menu->Send(); }This example creates a submenu for option 1 and displays it to the player when option 1 is selected. Based on the use of C++ and the reference to World of Warcraft game, it can be determined that GossipMenu is a library or addon for the game developed in C++.