Advertisement
Guest User

Quest_Rettung_NPC_Grabel.cpp

a guest
Feb 9th, 2016
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.90 KB | None | 0 0
  1. #include "ScriptMgr.h"
  2. #include "ScriptedCreature.h"
  3. #include "ObjectMgr.h"
  4. #include "Player.h"
  5. #include "QuestDef.h"
  6. #include "ScriptedGossip.h"
  7. #include "Quest_rettung.h"
  8.  
  9. class QuestRettungGrabel : public CreatureScript
  10. {
  11. public:
  12.     QuestRettungGrabel() : CreatureScript("QuestRettungGrabel") { }
  13.  
  14.     bool OnGossipHello(Player* player, Creature* creature) override
  15.     {
  16.         if (player->GetQuestStatus(60001) == QUEST_STATUS_INCOMPLETE)
  17.         {
  18.             player->ADD_GOSSIP_ITEM(4, "Save Grabel.", GOSSIP_SENDER_MAIN, 1);
  19.         }
  20.         player->SEND_GOSSIP_MENU(1, creature->GetGUID());
  21.  
  22.         return true;
  23.     }
  24.  
  25.     bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 actions) override
  26.     {
  27.         if (actions == GOSSIP_ACTION_INFO_DEF + 1)
  28.         {
  29.             EventStartetOnPlayer = true;
  30.             player->CLOSE_GOSSIP_MENU();
  31.         }
  32.         return true;
  33.     }
  34. };
  35.  
  36. void AddSC_QuestRettungGrabel()
  37. {
  38.     new QuestRettungGrabel();
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement