casucristy

gqwe

Jul 17th, 2012
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.83 KB | None | 0 0
  1. From 9de61ee43a5f5fdab9dcf3e15e422d489332b6f5 Mon Sep 17 00:00:00 2001
  2. From: unknown <cristi@cristis-PC.(none)>
  3. Date: Tue, 17 Jul 2012 23:00:05 +0300
  4. Subject: [PATCH] Fix quest Gunship Down
  5.  
  6. ---
  7.  src/server/scripts/Maelstrom/deepholm.cpp |   66 +++++++++++++++++++++++++++++
  8.  1 file changed, 66 insertions(+)
  9.  
  10. diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
  11. index feb3ca6..f6fae69 100644
  12. --- a/src/server/scripts/Maelstrom/deepholm.cpp
  13. +++ b/src/server/scripts/Maelstrom/deepholm.cpp
  14. @@ -180,9 +180,75 @@ class npc_energized_geode : public CreatureScript
  15.         }
  16.  };
  17.  
  18. +/*#####
  19. +## Support for quest Gunship Down - 26245
  20. +#########*/
  21. +
  22. +enum eGunshipDownEntries
  23. +{
  24. +   QUEST_GUNSHIP_DOWN          =   26245,
  25. +   NPC_UNEXPLODED_ARTILLERY    =   43044,
  26. +   NPC_SLAIN_CANNONEER         =   43032,
  27. +   NPC_CAPTAIN_SKULLSHATTER    =   43048,
  28. +   CREDIT_FIRST_CLUE           =   43027,
  29. +   CREDIT_SECOND_CLUE          =   43028,
  30. +   CREDIT_THIRD_CLUE           =   43029
  31. +};
  32. +
  33. +#define GOSSIP_FIRST_CLUE      "Retrieve First Clue..."
  34. +#define GOSSIP_SECOND_CLUE     "Retrieve Second Clue..."
  35. +#define GOSSIP_THIRD_CLUE      "Retrieve Third Clue..."
  36. +
  37. +class npc_clues_gunship_down : public CreatureScript
  38. +{
  39. +public:
  40. +    npc_clues_gunship_down() : CreatureScript("npc_clues_gunship_down") { }
  41. +
  42. +    bool OnGossipHello(Player* player, Creature* creature)
  43. +    {
  44. +       if(player->GetQuestStatus(QUEST_GUNSHIP_DOWN)==QUEST_STATUS_INCOMPLETE)
  45. +       {
  46. +           switch (creature->GetEntry())
  47. +           {
  48. +               case NPC_UNEXPLODED_ARTILLERY:
  49. +                   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_THIRD_CLUE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);break;
  50. +               case NPC_SLAIN_CANNONEER:
  51. +                   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SECOND_CLUE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);break;
  52. +               case NPC_CAPTAIN_SKULLSHATTER:
  53. +                   player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FIRST_CLUE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);break;
  54. +               default: break;
  55. +           }
  56. +       }
  57. +      
  58. +       player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
  59. +        return true;
  60. +    }
  61. +
  62. +    bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
  63. +    {
  64. +        player->PlayerTalkClass->ClearMenus();
  65. +        
  66. +       switch (action)
  67. +       {
  68. +           case GOSSIP_ACTION_INFO_DEF + 1:
  69. +               player->KilledMonsterCredit(CREDIT_THIRD_CLUE,0);break;
  70. +           case GOSSIP_ACTION_INFO_DEF + 2:
  71. +               player->KilledMonsterCredit(CREDIT_SECOND_CLUE,0);break;
  72. +           case GOSSIP_ACTION_INFO_DEF + 3:
  73. +               player->KilledMonsterCredit(CREDIT_FIRST_CLUE,0);break;
  74. +           default: break;
  75. +       }
  76. +
  77. +       player->CLOSE_GOSSIP_MENU();
  78. +
  79. +        return true;
  80. +    }
  81. +};
  82. +
  83.  void AddSC_deepholm()
  84.  {
  85.      new npc_lodestone();
  86.      new npc_slaincrewmember();
  87.     new npc_energized_geode();
  88. +   new npc_clues_gunship_down();
  89.  }
  90. --
  91. 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment