Advertisement
EmuDevs

EmuDevs: TrinityCore - Getting Familiar with GetPet method

Jun 29th, 2013
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. /*
  2. Messing with the Pet system - Tutorial
  3. (http://emudevs.com)
  4. */
  5. #include "Pet.h"
  6.  
  7. class npc_pet_tutorial : public CreatureScript
  8. {
  9. public:
  10. npc_pet_tutorial() : CreatureScript("npc_pet_tutorial") { }
  11.  
  12. bool OnGossipHello(Player* player, Creature* creature)
  13. {
  14. if (player->getClass() != CLASS_HUNTER || player->getClass() != CLASS_WARLOCK)
  15. return false;
  16.  
  17. if (Pet* pet = player->GetPet())
  18. {
  19.  
  20. }
  21. return true;
  22. }
  23. };
  24.  
  25. void AddSC_pet_tut()
  26. {
  27. new npc_pet_tutorial();
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement