| 28 | | class SurristraszGossipScript : public GossipScript |
| 29 | | { |
| 30 | | public: |
| 31 | | void GossipHello(Object* pObject, Player* plr, bool AutoSend) |
| 32 | | { |
| 33 | | GossipMenu *Menu; |
| 34 | | objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, plr); |
| 35 | | Menu->AddItem( 0, "I'd like passage to the Transitus Shield.", 0); |
| 36 | | Menu->AddItem( 0, "May I use a drake to fly elsewhere?", 1); |
| 37 | | Menu->SendTo(plr); |
| 38 | | } |
| 39 | | |
| 40 | | void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode) |
| 41 | | { |
| 42 | | Creature* pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?(TO_CREATURE(pObject)):NULL; |
| 43 | | if(pCreature==NULL) |
| 44 | | return; |
| 45 | | |
| 46 | | switch(IntId) |
| 47 | | { |
| 48 | | case 0: |
| 49 | | { |
| 50 | | TaxiPath * path = sTaxiMgr.GetTaxiPath( 795 ); // Flight Path |
| 51 | | plr->TaxiStart( path, 25854, 0 ); // Dragon |
| 52 | | }break; |
| 53 | | case 1: |
| 54 | | { |
| 55 | | plr->GetSession()->SendTaxiList(pCreature); |
| 56 | | }break; |
| 57 | | } |
| 58 | | } |
| 59 | | |
| 60 | | void Destroy() |
| 61 | | { |
| 62 | | delete this; |
| 63 | | } |
| 64 | | }; |
| 65 | | |