casucristy

ss

Jul 19th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.78 KB | None | 0 0
  1. From 0ac5f708fea37c9a4208268b7b552139ee5cbd19 Mon Sep 17 00:00:00 2001
  2. From: unknown <cristi@cristis-PC.(none)>
  3. Date: Thu, 19 Jul 2012 21:55:19 +0300
  4. Subject: [PATCH] Fix quest A head full of Wind
  5.  
  6. ---
  7.  src/server/scripts/Maelstrom/deepholm.cpp |   43 +++++++++++++++++++++++++++++
  8.  1 file changed, 43 insertions(+)
  9.  
  10. diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
  11. index 350a605..0449e04 100644
  12. --- a/src/server/scripts/Maelstrom/deepholm.cpp
  13. +++ b/src/server/scripts/Maelstrom/deepholm.cpp
  14. @@ -433,6 +433,48 @@ class npc_pebble : public CreatureScript
  15.         }
  16.  };
  17.  
  18. +/*###
  19. +## Support for quest A head Full of Wind 26581
  20. +######*/
  21. +
  22. +enum eRedMistEntries
  23. +{
  24. +   QUEST_A_HEAD_FULL_OF_WIND           =   26581,
  25. +   SPELL_RED_MIST_AURA                 =   77707,
  26. +   SPELL_CREDIT                        =   84510
  27. +};
  28. +
  29. +class npc_red_mist : public CreatureScript
  30. +{
  31. +    public:
  32. +        npc_red_mist() : CreatureScript("npc_red_mist") { }
  33. +
  34. +       struct npc_red_mistAI : public ScriptedAI
  35. +       {
  36. +           npc_red_mistAI(Creature* creature) : ScriptedAI(creature) { }
  37. +
  38. +           void Reset()
  39. +           {
  40. +               me->CastSpell(me,SPELL_RED_MIST_AURA);
  41. +           }
  42. +
  43. +           void MoveInLineOfSight(Unit* who)
  44. +           {
  45. +               Player* player = who->ToPlayer();
  46. +
  47. +               if(player && (me->GetDistance(player) < 10.0f) && (player->GetQuestStatus(QUEST_A_HEAD_FULL_OF_WIND)==QUEST_STATUS_INCOMPLETE))
  48. +               {
  49. +                   player->CastSpell(player,SPELL_CREDIT);
  50. +               }
  51. +           }
  52. +       };
  53. +
  54. +       CreatureAI* GetAI(Creature *creature) const
  55. +       {
  56. +           return new npc_red_mistAI(creature);
  57. +       }
  58. +};
  59. +
  60.  void AddSC_deepholm()
  61.  {
  62.      new npc_lodestone();
  63. @@ -443,4 +485,5 @@ void AddSC_deepholm()
  64.     new npc_petrified_stone_bat();
  65.     new npc_kor_the_immovable();
  66.     new npc_pebble();
  67. +   new npc_red_mist();
  68.  }
  69. --
  70. 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment