Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LoveBoat_Gossip : public GossipScript
- {
- public:
- void GossipHello(Object* pObject, Player * plr, bool AutoSend)
- {
- GossipMenu *Menu;
- objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 40002, plr);
- Menu->AddItem( 0, "Fly to the Chimaera spot", 1 );
- if(AutoSend)
- Menu->SendTo(plr);
- }
- void GossipSelectOption(Object* pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code)
- {
- Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
- if(pCreature==NULL)
- return;
- switch(IntId)
- {
- case 1:
- {
- objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
- 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
- Menu->AddItem(2, "You must be a Warrior to learn Warrior spells.");
- else
- {Menu->AddItem(0, "Teach me my spells!", 2);} // Warrior Spells Only
- Menu->SendTo(Plr);
- }break;
- }
- }
- void Destroy()
- {
- delete this;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement