Advertisement
Guest User

Untitled

a guest
May 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.25 KB | None | 0 0
  1. diff --git a/src/bindings/ScriptDev2/scripts/northrend/howling_fjord.cpp b/src/bindings/ScriptDev2/scripts/northrend/howling_fjord.cpp
  2. index 0229ef8..c81d780 100644
  3. --- a/src/bindings/ScriptDev2/scripts/northrend/howling_fjord.cpp
  4. +++ b/src/bindings/ScriptDev2/scripts/northrend/howling_fjord.cpp
  5. @@ -671,6 +671,43 @@ CreatureAI* GetAI_npc_olga(Creature* pCreature)
  6.      return new npc_olgaAI(pCreature);
  7.  }
  8.  
  9. +/*#####
  10. +## go_dragonflayer_cage
  11. +#####*/
  12. +
  13. +enum
  14. +{
  15. +    QUEST_PRISONERS_OF_WYRMSKULL = 11255,
  16. +    NPC_VALGARDE_PRISONER1       = 24086,
  17. +    NPC_VALGARDE_PRISONER2       = 24088,
  18. +    NPC_VALGARDE_PRISONER3       = 24089,
  19. +    NPC_VALGARDE_PRISONER4       = 24090,
  20. +    CAPTURED_VALGARDE_PRISONER   = 24124,
  21. +    SPELL_DESPAWN_SELF           = 43014,
  22. +    SAY_THANKS                   = -1999843 // "I'm free? I'm free!"
  23. +};
  24. +
  25. +bool GOHello_go_dragonflayer_cage(Player* pPlayer, GameObject* pGo)
  26. +{
  27. +    if (pPlayer->GetQuestStatus(QUEST_PRISONERS_OF_WYRMSKULL) == QUEST_STATUS_INCOMPLETE)
  28. +    {
  29. +        Creature *pPrisoner = GetClosestCreatureWithEntry(pPlayer, NPC_VALGARDE_PRISONER1, INTERACTION_DISTANCE);
  30. +        if(!pPrisoner)
  31. +            pPrisoner = GetClosestCreatureWithEntry(pPlayer, NPC_VALGARDE_PRISONER2, INTERACTION_DISTANCE);
  32. +        if(!pPrisoner)
  33. +            pPrisoner = GetClosestCreatureWithEntry(pPlayer, NPC_VALGARDE_PRISONER3, INTERACTION_DISTANCE);
  34. +        if(!pPrisoner)
  35. +            pPrisoner = GetClosestCreatureWithEntry(pPlayer, NPC_VALGARDE_PRISONER4, INTERACTION_DISTANCE);
  36. +        if(pPrisoner)
  37. +        {
  38. +            pPlayer->KilledMonsterCredit(CAPTURED_VALGARDE_PRISONER, pPrisoner->GetGUID());
  39. +            DoScriptText(SAY_THANKS, pPrisoner);
  40. +            pPrisoner->CastSpell(pPrisoner, SPELL_DESPAWN_SELF, false);
  41. +        }
  42. +    }
  43. +    return false;
  44. +};
  45. +
  46.  void AddSC_howling_fjord()
  47.  {
  48.      Script* newscript;
  49. @@ -724,4 +761,9 @@ void AddSC_howling_fjord()
  50.      newscript->pGossipHello = &GossipHello_npc_jack_adams;
  51.      newscript->pGossipSelect = &GossipSelect_npc_jack_adams;
  52.      newscript->RegisterSelf();
  53. +
  54. +    newscript = new Script;
  55. +    newscript->Name = "go_dragonflayer_cage";
  56. +    newscript->pGOHello = &GOHello_go_dragonflayer_cage;
  57. +    newscript->RegisterSelf();
  58.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement