2009-02-17 18:08:26 +01:00
|
|
|
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
2008-12-27 21:29:09 +01:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
*/
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-12-27 21:29:09 +01:00
|
|
|
/* ScriptData
|
|
|
|
|
SDName: Arathi Highlands
|
|
|
|
|
SD%Complete: 100
|
|
|
|
|
SDComment: Quest support: 665
|
|
|
|
|
SDCategory: Arathi Highlands
|
|
|
|
|
EndScriptData */
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-12-27 21:29:09 +01:00
|
|
|
/* ContentData
|
|
|
|
|
npc_professor_phizzlethorpe
|
|
|
|
|
EndContentData */
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2010-01-19 11:36:05 +01:00
|
|
|
#include "ScriptedPch.h"
|
|
|
|
|
#include "ScriptedEscortAI.h"
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-12-27 21:29:09 +01:00
|
|
|
/*######
|
|
|
|
|
## npc_professor_phizzlethorpe
|
|
|
|
|
######*/
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-17 07:42:48 -07:00
|
|
|
enum eEnums
|
2009-08-14 15:58:37 +02:00
|
|
|
{
|
|
|
|
|
SAY_PROGRESS_1 = -1000235,
|
|
|
|
|
SAY_PROGRESS_2 = -1000236,
|
|
|
|
|
SAY_PROGRESS_3 = -1000237,
|
|
|
|
|
EMOTE_PROGRESS_4 = -1000238,
|
|
|
|
|
SAY_AGGRO = -1000239,
|
|
|
|
|
SAY_PROGRESS_5 = -1000240,
|
|
|
|
|
SAY_PROGRESS_6 = -1000241,
|
|
|
|
|
SAY_PROGRESS_7 = -1000242,
|
|
|
|
|
EMOTE_PROGRESS_8 = -1000243,
|
|
|
|
|
SAY_PROGRESS_9 = -1000244,
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 15:58:37 +02:00
|
|
|
QUEST_SUNKEN_TREASURE = 665,
|
|
|
|
|
MOB_VENGEFUL_SURGE = 2776
|
|
|
|
|
};
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2010-02-05 00:31:28 +01:00
|
|
|
struct npc_professor_phizzlethorpeAI : public npc_escortAI
|
2008-12-27 21:29:09 +01:00
|
|
|
{
|
2009-03-31 18:12:49 -06:00
|
|
|
npc_professor_phizzlethorpeAI(Creature *c) : npc_escortAI(c) {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 15:58:37 +02:00
|
|
|
void WaypointReached(uint32 uiPointId)
|
2009-02-12 09:23:56 -05:00
|
|
|
{
|
2009-08-17 00:29:53 +02:00
|
|
|
Player* pPlayer = GetPlayerForEscort();
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-17 00:29:53 +02:00
|
|
|
if (!pPlayer)
|
|
|
|
|
return;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 15:58:37 +02:00
|
|
|
switch(uiPointId)
|
2009-02-12 09:23:56 -05:00
|
|
|
{
|
2009-08-14 00:02:13 +02:00
|
|
|
case 4:DoScriptText(SAY_PROGRESS_2, m_creature, pPlayer);break;
|
|
|
|
|
case 5:DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer);break;
|
2009-02-12 09:23:56 -05:00
|
|
|
case 8:DoScriptText(EMOTE_PROGRESS_4, m_creature);break;
|
|
|
|
|
case 9:
|
|
|
|
|
{
|
|
|
|
|
m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
|
|
|
m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
2009-08-14 00:02:13 +02:00
|
|
|
case 10:DoScriptText(SAY_PROGRESS_5, m_creature, pPlayer);break;
|
2009-08-14 15:58:37 +02:00
|
|
|
case 11:
|
|
|
|
|
DoScriptText(SAY_PROGRESS_6, m_creature, pPlayer);
|
|
|
|
|
SetRun();
|
|
|
|
|
break;
|
2009-08-14 00:02:13 +02:00
|
|
|
case 19:DoScriptText(SAY_PROGRESS_7, m_creature, pPlayer); break;
|
2009-02-12 09:23:56 -05:00
|
|
|
case 20:
|
|
|
|
|
DoScriptText(EMOTE_PROGRESS_8, m_creature);
|
2009-08-14 00:02:13 +02:00
|
|
|
DoScriptText(SAY_PROGRESS_9, m_creature, pPlayer);
|
|
|
|
|
if (pPlayer)
|
|
|
|
|
CAST_PLR(pPlayer)->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature);
|
2009-02-12 09:23:56 -05:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 15:58:37 +02:00
|
|
|
void JustSummoned(Creature* pSummoned)
|
2009-01-22 20:09:47 +01:00
|
|
|
{
|
2009-08-14 15:58:37 +02:00
|
|
|
pSummoned->AI()->AttackStart(m_creature);
|
2009-01-22 20:09:47 +01:00
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 15:58:37 +02:00
|
|
|
void EnterCombat(Unit* pWho)
|
2009-02-12 09:23:56 -05:00
|
|
|
{
|
2009-08-14 15:58:37 +02:00
|
|
|
DoScriptText(SAY_AGGRO, m_creature);
|
2009-02-12 09:23:56 -05:00
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-02-12 09:23:56 -05:00
|
|
|
void UpdateAI(const uint32 diff)
|
|
|
|
|
{
|
|
|
|
|
npc_escortAI::UpdateAI(diff);
|
|
|
|
|
}
|
2008-12-27 21:29:09 +01:00
|
|
|
};
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 15:58:37 +02:00
|
|
|
bool QuestAccept_npc_professor_phizzlethorpe(Player* pPlayer, Creature* pCreature, Quest const* pQuest)
|
2008-12-27 21:29:09 +01:00
|
|
|
{
|
2009-08-14 15:58:37 +02:00
|
|
|
if (pQuest->GetQuestId() == QUEST_SUNKEN_TREASURE)
|
2008-12-27 21:29:09 +01:00
|
|
|
{
|
2009-08-14 04:21:52 +02:00
|
|
|
DoScriptText(SAY_PROGRESS_1, pCreature, pPlayer);
|
|
|
|
|
if (npc_escortAI* pEscortAI = CAST_AI(npc_professor_phizzlethorpeAI, (pCreature->AI())))
|
2009-08-14 15:58:37 +02:00
|
|
|
pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest);
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 04:21:52 +02:00
|
|
|
pCreature->setFaction(113);
|
2008-12-27 21:29:09 +01:00
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:39:07 +02:00
|
|
|
CreatureAI* GetAI_npc_professor_phizzlethorpeAI(Creature* pCreature)
|
2008-12-27 21:29:09 +01:00
|
|
|
{
|
2009-08-16 02:12:14 +02:00
|
|
|
return new npc_professor_phizzlethorpeAI(pCreature);
|
2008-12-27 21:29:09 +01:00
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-12-27 21:29:09 +01:00
|
|
|
void AddSC_arathi_highlands()
|
|
|
|
|
{
|
2009-02-12 09:23:56 -05:00
|
|
|
Script * newscript;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-02-12 09:23:56 -05:00
|
|
|
newscript = new Script;
|
|
|
|
|
newscript->Name = "npc_professor_phizzlethorpe";
|
|
|
|
|
newscript->GetAI = &GetAI_npc_professor_phizzlethorpeAI;
|
|
|
|
|
newscript->pQuestAccept = &QuestAccept_npc_professor_phizzlethorpe;
|
|
|
|
|
newscript->RegisterSelf();
|
2009-02-09 14:28:01 -05:00
|
|
|
}
|