Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.64 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. #define QuestID_Ally 24556
  4. #define QuestID_Horde 20438
  5. #define QuestItem 49648
  6.  
  7.  
  8. class gossip_shandy_glossgleam : public CreatureScript
  9. {
  10. public: gossip_shandy_glossgleam() : CreatureScript("gossip_shandy_glossgleam") { }
  11.  
  12.         bool OnGossipHello( Player* Plr, Creature* pCreature )
  13.         {
  14.                
  15.                 Plr->ADD_GOSSIP_ITEM( 0, "Ich brauche den Geliehenen Wappenrock!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1 );
  16.                 Plr->SEND_GOSSIP_MENU( DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID() );
  17.                 return true;
  18.         }
  19.  
  20.         void SendDefaultMenu_ACTION( Player* Plr, Creature* pCreature, uint32 uiAction )
  21.         {
  22.                 switch( uiAction )
  23.                 {
  24.                         // Hauptmenü
  25.                         case GOSSIP_ACTION_INFO_DEF +1:
  26.                                 if (Plr->hasQuest(QuestID_Ally) || Plr->hasQuest(QuestID_Horde))
  27.                                 {
  28.                                     Plr->AddItem(QuestItem, 1);
  29.                                 }
  30.                                 else
  31.                                 {
  32.                                     NACHRICHT
  33.                                 }
  34.                                 Plr->SEND_GOSSIP_MENU( DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID() );
  35.                                 break;
  36.                 }
  37.         }
  38.  
  39.  
  40.         bool OnGossipSelect( Player* Plr, Creature* pCreature, uint32 uiSender, uint32 uiAction )
  41.         {
  42.                 Plr->PlayerTalkClass->ClearMenus();
  43.                 if( uiSender == GOSSIP_SENDER_MAIN )
  44.                 {
  45.                         SendDefaultMenu_ACTION( Plr, pCreature, uiAction );
  46.                 }
  47.  
  48.                 return true;
  49.         }
  50. };
  51.  
  52. void AddSC_gossip_shandy_glossgleam()
  53. {
  54.         new gossip_shandy_glossgleam();
  55. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement