Advertisement
Guest User

item_gossip

a guest
Sep 25th, 2013
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. class item_gossip : public ItemScript
  2. {
  3. public:
  4.     item_gossip() : ItemScript("item_gossip") { }
  5.        
  6.     bool OnUse(Player* player, Item* item, SpellCastTargets const & /* targets */) OVERRIDE
  7.     {
  8.         player->ADD_GOSSIP_ITEM(2, "Teleport", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
  9.         player->ADD_GOSSIP_ITEM(2, "Gurubashi Arena",   GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25);
  10.         player->ADD_GOSSIP_ITEM(9, "|cffFF0000Nevermind..", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+99);
  11.         player->SEND_GOSSIP_MENU(1, item->GetGUID());
  12.         return true;
  13.     }
  14.        
  15.     void OnGossipSelect(Player* player, Item* item, uint32 /* sender */, uint32 actions) OVERRIDE
  16.     {
  17.         player->PlayerTalkClass->ClearMenus();
  18.                
  19.         if (actions == 1)
  20.             player->GetSession()->SendNotification("MENU ONE");
  21.         return;
  22.     }
  23. };
  24.  
  25. void AddSC_gossip()
  26. {
  27.     new item_gossip;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement