Advertisement
Emulation

Untitled

May 20th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class vip_vendor : public CreatureScript
  4. {
  5. public:
  6.     vip_vendor() : CreatureScript("vip_vendor") { }
  7.  
  8.     bool OnGossipHello(Player* player, Creature* creature)
  9.     {
  10.         if (player->GetSession()->GetSecurity() >= 1)
  11.             player->ADD_GOSSIP_ITEM(6, "VIP Vendor", GOSSIP_SENDER_MAIN, 914322);
  12.         else
  13.             player->ADD_GOSSIP_ITEM(6, "VIP Preview Vendor", GOSSIP_SENDER_MAIN, 914321);
  14.  
  15.         player->SEND_GOSSIP_MENU(1, creature->GetGUID());
  16.         return true;
  17.     }
  18.  
  19.     bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action)
  20.     {
  21.         player->PlayerTalkClass->ClearMenus();
  22.  
  23.         player->GetSession()->SendListInventory(creature->GetGUID(), action);
  24.         return true;
  25.     }
  26. };
  27.  
  28. void AddSC_vip_vendor()
  29. {
  30.     new vip_vendor();
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement