Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- #include <cstring>
- class example_gossip_codebox : public CreatureScript
- {
- public:
- example_gossip_codebox()
- : CreatureScript("example_gossip_codebox")
- {
- }
- bool OnGossipHello(Player* player, Creature* creature)
- {
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Arenas..." , GOSSIP_SENDER_MAIN, 1001);
- player->PlayerTalkClass->SendGossipMenu(907, creature->GetGUID());
- return true;
- }
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- if(player->isInCombat())
- return true;
- switch(uiAction)
- {
- case 1001:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport me to Nagrand Arena" , GOSSIP_SENDER_MAIN, 10000);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport me to Blades Edge Arena" , GOSSIP_SENDER_MAIN, 10001);
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport me to Gurubashi Arena" , GOSSIP_SENDER_MAIN, 10002);
- break;
- case 10000:
- player->TeleportTo(nagrand arena....
- break;
- case 10001:
- player->TeleportTo(blades edge arena....
- break;
- case 10002:
- player->TeleportTo(gurubashi arena....
- break;
- }
- return true;
- }
- };
- void AddSC_example_gossip_codebox()
- {
- new example_gossip_codebox();
- }
Add Comment
Please, Sign In to add comment