Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 17a5e93513e74efa11c8cbfb83c6830099ac15d2 Mon Sep 17 00:00:00 2001
- From: unknown <cristi@cristis-PC.(none)>
- Date: Mon, 16 Jul 2012 01:52:45 +0300
- Subject: [PATCH] FixQuest Get Me Outta Here
- ---
- src/server/scripts/World/npcs_special.cpp | 78 +++++++++++++++++++++++++++++
- 1 file changed, 78 insertions(+)
- diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
- index f6325aa..e7a849f 100644
- --- a/src/server/scripts/World/npcs_special.cpp
- +++ b/src/server/scripts/World/npcs_special.cpp
- @@ -3522,6 +3522,83 @@ public:
- }
- };
- +/*######
- +## Support for quest Get Me Outta Here
- +## NPC 39640
- +########*/
- +
- +enum GetMeOuttaHereEntries
- +{
- + QUEST_GET_ME_OUTTA_HERE = 25332,
- +
- + SAY_START = -1559000,
- + SAY_AGGRO = -1559001,
- + SAY_FINISH = -1559002,
- +};
- +
- +class npc_kristoff_manheim : public CreatureScript
- +{
- +public:
- + npc_kristoff_manheim() : CreatureScript("npc_kristoff_manheim") { }
- +
- + bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
- + {
- + if (quest->GetQuestId() == QUEST_GET_ME_OUTTA_HERE)
- + {
- + if (npc_escortAI* pEscortAI = CAST_AI(npc_escortAI, creature->AI()))
- + {
- + pEscortAI->Start(true, false, player->GetGUID());
- + DoScriptText(SAY_START,creature,player);
- + }
- + }
- + return true;
- + }
- +
- + CreatureAI* GetAI(Creature* creature) const
- + {
- + return new npc_kristoff_manheimAI(creature);
- + }
- +
- + struct npc_kristoff_manheimAI : public npc_escortAI
- + {
- + npc_kristoff_manheimAI(Creature* creature) : npc_escortAI(creature) {}
- +
- + void WaypointReached(uint32 waypointId)
- + {
- + if (Player* player = GetPlayerForEscort())
- + {
- + switch (waypointId)
- + {
- + case 13:
- + me->SetFacingToObject(player);
- + DoScriptText(SAY_FINISH, me, player);
- + player->KilledMonsterCredit(39808,0);
- + me->DespawnOrUnsummon(15000);
- + break;
- + }
- + }
- + }
- +
- + void EnterCombat(Unit* who)
- + {
- + if(HasEscortState(STATE_ESCORT_ESCORTING))
- + DoScriptText(SAY_AGGRO, me, who);
- + }
- +
- + void JustDied(Unit* killer)
- + {
- + if (HasEscortState(STATE_ESCORT_ESCORTING))
- + {
- + if (Player* player = GetPlayerForEscort())
- + player->SetQuestStatus(QUEST_GET_ME_OUTTA_HERE,QUEST_STATUS_FAILED);
- + }
- + }
- +
- + void Reset() {}
- + };
- +
- +};
- +
- void AddSC_npcs_special()
- {
- new npc_air_force_bots;
- @@ -3560,4 +3637,5 @@ void AddSC_npcs_special()
- new npc_power_word_barrier;
- new npc_shadowy_apparition;
- new npc_crucible_of();
- + new npc_kristoff_manheim();
- }
- --
- 1.7.10.msysgit.1
Advertisement
Add Comment
Please, Sign In to add comment