Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. class LoveBoat_Gossip : public GossipScript
  2. {
  3. public:
  4. void GossipHello(Object* pObject, Player * plr, bool AutoSend)
  5. {
  6. GossipMenu *Menu;
  7. objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 40002, plr);
  8. Menu->AddItem( 0, "Fly to the Chimaera spot", 1 );
  9. if(AutoSend)
  10. Menu->SendTo(plr);
  11. }
  12. void GossipSelectOption(Object* pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code)
  13. {
  14. Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
  15. if(pCreature==NULL)
  16. return;
  17. switch(IntId)
  18. {
  19. case 1:
  20. {
  21. objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
  22. if (Plr->getClass() == 2||Plr->getClass() == 3||Plr->getClass() == 4||Plr->getClass() == 5||Plr->getClass() == 6||Plr->getClass() == 7||Plr->getClass() == 8||Plr->getClass() == 9||Plr->getClass() == 10||Plr->getClass() == 11) // Gets the class WARRIOR
  23. Menu->AddItem(2, "You must be a Warrior to learn Warrior spells.");
  24. else
  25. {Menu->AddItem(0, "Teach me my spells!", 2);} // Warrior Spells Only
  26. Menu->SendTo(Plr);
  27.  
  28. }break;
  29.  
  30. }
  31. }
  32. void Destroy()
  33. {
  34. delete this;
  35. }
  36. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement