casucristy

Untitled

Jul 25th, 2012
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.38 KB | None | 0 0
  1. From e08dd6b573b64a7968fa7b39c964c820c6c8b18c Mon Sep 17 00:00:00 2001
  2. From: unknown <cristi@cristis-PC.(none)>
  3. Date: Wed, 25 Jul 2012 18:53:05 +0300
  4. Subject: [PATCH] Fix quest Rallying the Earthen Ring
  5.  
  6. ---
  7.  src/server/scripts/Maelstrom/deepholm.cpp |   55 +++++++++++++++++++++++++++++
  8.  1 file changed, 55 insertions(+)
  9.  
  10. diff --git a/src/server/scripts/Maelstrom/deepholm.cpp b/src/server/scripts/Maelstrom/deepholm.cpp
  11. index 0906093..f87ae1c 100644
  12. --- a/src/server/scripts/Maelstrom/deepholm.cpp
  13. +++ b/src/server/scripts/Maelstrom/deepholm.cpp
  14. @@ -1457,6 +1457,60 @@ public:
  15.      };
  16.  };
  17.  
  18. +/*#####
  19. +## Support for quest Rallyng the Earthen Ring - 26827
  20. +#########*/
  21. +
  22. +enum eRallyingTheEarthenRing
  23. +{
  24. +   QUEST_RALLYING_THE_EARTHEN_RING =   26827,
  25. +   NPC_EARTHEN_RING_SHAMAN         =   44088,
  26. +   NPC_EARTHEN_RING_SHAMAN_CREDIT  =   44133,
  27. +
  28. +};
  29. +
  30. +#define GOSSIP_EARTHEN_RING_SHAMAN     "Rally the Shaman... "
  31. +
  32. +class npc_earthen_ring_shaman : public CreatureScript
  33. +{
  34. +public:
  35. +    npc_earthen_ring_shaman() : CreatureScript("npc_earthen_ring_shaman") { }
  36. +
  37. +    bool OnGossipHello(Player* player, Creature* creature)
  38. +    {
  39. +       if(player->GetQuestStatus(QUEST_RALLYING_THE_EARTHEN_RING)==QUEST_STATUS_INCOMPLETE)
  40. +           player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_EARTHEN_RING_SHAMAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
  41. +      
  42. +       player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
  43. +        return true;
  44. +    }
  45. +
  46. +    bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
  47. +    {
  48. +        player->PlayerTalkClass->ClearMenus();
  49. +       player->KilledMonsterCredit(NPC_EARTHEN_RING_SHAMAN_CREDIT,0);
  50. +       player->CLOSE_GOSSIP_MENU();
  51. +       creature->DespawnOrUnsummon();
  52. +
  53. +        return true;
  54. +    }
  55. +
  56. +   struct npc_earthen_ring_shamanAI : public ScriptedAI
  57. +       {
  58. +           npc_earthen_ring_shamanAI(Creature* creature) : ScriptedAI(creature){}
  59. +
  60. +           void Reset()
  61. +           {
  62. +               me->SetFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP);
  63. +           }
  64. +       };
  65. +
  66. +       CreatureAI* GetAI(Creature *creature) const
  67. +       {
  68. +           return new npc_earthen_ring_shamanAI(creature);
  69. +       }
  70. +};
  71. +
  72.  void AddSC_deepholm()
  73.  {
  74.      new npc_lodestone();
  75. @@ -1483,4 +1537,5 @@ void AddSC_deepholm()
  76.     new npc_boden_the_imposing();
  77.     new spell_earthen_ring_proclamation();
  78.     new npc_ricket_ticker();
  79. +   new npc_earthen_ring_shaman();
  80.  }
  81. --
  82. 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment