casucristy

q

Jul 18th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.02 KB | None | 0 0
  1. From d219bcc9d223b91575bfde31768f70a9189eb66b Mon Sep 17 00:00:00 2001
  2. From: unknown <cristi@cristis-PC.(none)>
  3. Date: Wed, 18 Jul 2012 21:27:24 +0300
  4. Subject: [PATCH] Fix quest Petrified Delicacies
  5.  
  6. ---
  7.  src/server/scripts/Maelstrom/deepholm.cpp |   45 +++++++++++++++++++++++++++++
  8.  1 file changed, 45 insertions(+)
  9.  
  10. diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
  11. index d169461..61918b2 100644
  12. --- a/src/server/scripts/Maelstrom/deepholm.cpp
  13. +++ b/src/server/scripts/Maelstrom/deepholm.cpp
  14. @@ -285,6 +285,50 @@ class npc_violent_gale_credit_bunny : public CreatureScript
  15.      }
  16.  };
  17.  
  18. +/*###
  19. +## Support for quest Petrified Delicacies - 26507
  20. +######*/
  21. +
  22. +enum ePetrifiedDelicaciesEntries
  23. +{
  24. +   QUEST_PETRIFIED_DELICACIES      =   26507,
  25. +   SPELL_PETRIFIED_BAT             =   80952,
  26. +};
  27. +
  28. +class npc_petrified_stone_bat : public CreatureScript
  29. +{
  30. +    public:
  31. +        npc_petrified_stone_bat() : CreatureScript("npc_petrified_stone_bat") { }
  32. +
  33. +       bool OnGossipHello(Player* player, Creature* creature)
  34. +       {
  35. +           if(player->GetQuestStatus(QUEST_PETRIFIED_DELICACIES)==QUEST_STATUS_INCOMPLETE)
  36. +           {
  37. +               player->CastSpell(player,SPELL_PETRIFIED_BAT);
  38. +               creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
  39. +               creature->DespawnOrUnsummon(1000);
  40. +           }
  41. +           return true;
  42. +       }
  43. +
  44. +       struct npc_petrified_stone_batAI : public ScriptedAI
  45. +       {
  46. +           npc_petrified_stone_batAI(Creature* creature) : ScriptedAI(creature) { }
  47. +
  48. +           void Reset()
  49. +           {
  50. +               me->SetFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP);
  51. +               me->HandleEmoteCommand(65);
  52. +               me->SetByteFlag(UNIT_FIELD_BYTES_1, 0, 7);
  53. +           }
  54. +       };
  55. +
  56. +       CreatureAI* GetAI(Creature *creature) const
  57. +       {
  58. +           return new npc_petrified_stone_batAI(creature);
  59. +       }
  60. +};
  61. +
  62.  void AddSC_deepholm()
  63.  {
  64.      new npc_lodestone();
  65. @@ -292,4 +336,5 @@ void AddSC_deepholm()
  66.     new npc_energized_geode();
  67.     new npc_clues_gunship_down();
  68.     new npc_violent_gale_credit_bunny();
  69. +   new npc_petrified_stone_bat();
  70.  }
  71. --
  72. 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment