casucristy

ss

Jul 23rd, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.21 KB | None | 0 0
  1. From 999cefa5765348c5a0036a947e97f54457025c06 Mon Sep 17 00:00:00 2001
  2. From: unknown <cristi@cristis-PC.(none)>
  3. Date: Tue, 24 Jul 2012 00:25:31 +0300
  4. Subject: [PATCH] Fix quest Putting the Pieces Toghether
  5.  
  6. ---
  7.  src/server/scripts/Maelstrom/deepholm.cpp |   47 +++++++++++++++++++++++++++++
  8.  1 file changed, 47 insertions(+)
  9.  
  10. diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
  11. index 8027806..ed3451d 100644
  12. --- a/src/server/scripts/Maelstrom/deepholm.cpp
  13. +++ b/src/server/scripts/Maelstrom/deepholm.cpp
  14. @@ -1171,6 +1171,52 @@ class npc_therazane: public CreatureScript
  15.         }
  16.  };
  17.  
  18. +/*####
  19. +## Support for quest Putting the Pieces Together
  20. +########*/
  21. +
  22. +enum PuttingPiecesTogetherEntries
  23. +{
  24. +   QUEST_PUTTING_PIECES_TOGHETHER      =   26439,
  25. +   NPC_DORMANT_STONEBOUND_ELEMENTAL    =   43115,
  26. +};
  27. +
  28. +class npc_dormant_stonebound_elemental : public CreatureScript
  29. +{
  30. +    public:
  31. +        npc_dormant_stonebound_elemental() : CreatureScript("npc_dormant_stonebound_elemental") { }
  32. +
  33. +       bool OnGossipHello(Player* player, Creature* creature)
  34. +       {
  35. +           if(player->GetQuestStatus(QUEST_PUTTING_PIECES_TOGHETHER)==QUEST_STATUS_INCOMPLETE)
  36. +           {
  37. +               player->KilledMonsterCredit(NPC_DORMANT_STONEBOUND_ELEMENTAL,0);
  38. +               creature->RemoveFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP);
  39. +               creature->DespawnOrUnsummon(2000);
  40. +           }
  41. +           return true;
  42. +       }
  43. +
  44. +       struct npc_dormant_stonebound_elementalAI : public ScriptedAI
  45. +       {
  46. +           npc_dormant_stonebound_elementalAI(Creature* creature) : ScriptedAI(creature){}
  47. +
  48. +           void Reset()
  49. +           {
  50. +               me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE);
  51. +               me->SetFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP);
  52. +               me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
  53. +               me->HandleEmoteCommand(65);
  54. +               me->SetByteFlag(UNIT_FIELD_BYTES_1, 0, 7);
  55. +           }
  56. +       };
  57. +
  58. +       CreatureAI* GetAI(Creature *creature) const
  59. +       {
  60. +           return new npc_dormant_stonebound_elementalAI(creature);
  61. +       }
  62. +};
  63. +
  64.  void AddSC_deepholm()
  65.  {
  66.      new npc_lodestone();
  67. @@ -1193,4 +1239,5 @@ void AddSC_deepholm()
  68.     new go_rod_of_subjugations();
  69.     new spell_smash_chains();
  70.     new npc_therazane();
  71. +   new npc_dormant_stonebound_elemental();
  72.  }
  73. --
  74. 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment