Advertisement
Rochet2

GossipChange

May 11th, 2017
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. #include "ScriptMgr.h"
  2. #include "Player.h"
  3. #include "Creature.h"
  4.  
  5. class TestGossip : public CreatureScript
  6. {
  7. public:
  8.     TestGossip() : CreatureScript("TestGossip") { }
  9.  
  10.     bool OnGossipHello(Player* player, Creature* creature) override
  11.     {
  12.         // code
  13.         return true;
  14.     }
  15.  
  16.     bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override
  17.     {
  18.         player->PlayerTalkClass->ClearMenus();
  19.         // code
  20.         return true;
  21.     }
  22.  
  23.     bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, char const* code) override
  24.     {
  25.         player->PlayerTalkClass->ClearMenus();
  26.         // code
  27.         return true;
  28.     }
  29. };
  30.  
  31. void AddSC_TestGossip()
  32. {
  33.     new TestGossip;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement