2009-02-17 18:08:26 +01:00
|
|
|
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
2008-10-21 13:19:26 -05: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-10-21 13:19:26 -05:00
|
|
|
/* ScriptData
|
|
|
|
|
SDName: Eastern_Plaguelands
|
|
|
|
|
SD%Complete: 100
|
|
|
|
|
SDComment: Quest support: 5211, 5742. Special vendor Augustus the Touched
|
|
|
|
|
SDCategory: Eastern Plaguelands
|
|
|
|
|
EndScriptData */
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
/* ContentData
|
|
|
|
|
mobs_ghoul_flayer
|
|
|
|
|
npc_augustus_the_touched
|
|
|
|
|
npc_darrowshire_spirit
|
|
|
|
|
npc_tirion_fordring
|
|
|
|
|
EndContentData */
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2010-01-19 11:36:05 +01:00
|
|
|
#include "ScriptedPch.h"
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
//id8530 - cannibal ghoul
|
|
|
|
|
//id8531 - gibbering ghoul
|
|
|
|
|
//id8532 - diseased flayer
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2010-02-05 00:31:28 +01:00
|
|
|
struct mobs_ghoul_flayerAI : public ScriptedAI
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-03-31 18:12:49 -06:00
|
|
|
mobs_ghoul_flayerAI(Creature *c) : ScriptedAI(c) {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-18 16:07:41 -07:00
|
|
|
void Reset() {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-18 16:07:41 -07:00
|
|
|
void EnterCombat(Unit* who) {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
void JustDied(Unit* Killer)
|
|
|
|
|
{
|
2009-08-14 00:02:13 +02:00
|
|
|
if (Killer->GetTypeId() == TYPEID_PLAYER)
|
2009-08-06 20:35:18 +02:00
|
|
|
m_creature->SummonCreature(11064, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
2008-10-21 13:19:26 -05:00
|
|
|
}
|
|
|
|
|
};
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:39:07 +02:00
|
|
|
CreatureAI* GetAI_mobs_ghoul_flayer(Creature* pCreature)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-14 00:39:07 +02:00
|
|
|
return new mobs_ghoul_flayerAI (pCreature);
|
2008-10-21 13:19:26 -05:00
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
/*######
|
|
|
|
|
## npc_augustus_the_touched
|
|
|
|
|
######*/
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:39:07 +02:00
|
|
|
bool GossipHello_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-14 00:39:07 +02:00
|
|
|
if (pCreature->isQuestGiver())
|
|
|
|
|
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:39:07 +02:00
|
|
|
if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(6164))
|
2009-08-14 00:02:13 +02:00
|
|
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-12-20 13:35:08 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
|
2008-10-21 13:19:26 -05:00
|
|
|
return true;
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-15 00:32:04 +02:00
|
|
|
bool GossipSelect_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-15 00:32:04 +02:00
|
|
|
if (uiAction == GOSSIP_ACTION_TRADE)
|
2009-08-14 00:39:07 +02:00
|
|
|
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
|
2008-10-21 13:19:26 -05:00
|
|
|
return true;
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
/*######
|
|
|
|
|
## npc_darrowshire_spirit
|
|
|
|
|
######*/
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
#define SPELL_SPIRIT_SPAWNIN 17321
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2010-02-05 00:31:28 +01:00
|
|
|
struct npc_darrowshire_spiritAI : public ScriptedAI
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-03-31 18:12:49 -06:00
|
|
|
npc_darrowshire_spiritAI(Creature *c) : ScriptedAI(c) {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
void Reset()
|
|
|
|
|
{
|
2009-11-11 13:47:21 -08:00
|
|
|
DoCast(m_creature, SPELL_SPIRIT_SPAWNIN);
|
2008-10-21 13:19:26 -05:00
|
|
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-18 16:07:41 -07:00
|
|
|
void EnterCombat(Unit *who) {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
};
|
2009-08-14 00:39:07 +02:00
|
|
|
CreatureAI* GetAI_npc_darrowshire_spirit(Creature* pCreature)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-14 00:39:07 +02:00
|
|
|
return new npc_darrowshire_spiritAI (pCreature);
|
2008-10-21 13:19:26 -05:00
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:39:07 +02:00
|
|
|
bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-14 00:39:07 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(3873, pCreature->GetGUID());
|
|
|
|
|
pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID());
|
|
|
|
|
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
2008-10-21 13:19:26 -05:00
|
|
|
return true;
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
/*######
|
|
|
|
|
## npc_tirion_fordring
|
|
|
|
|
######*/
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-23 03:48:18 -04:00
|
|
|
#define GOSSIP_HELLO "I am ready to hear your tale, Tirion."
|
|
|
|
|
#define GOSSIP_SELECT1 "Thank you, Tirion. What of your identity?"
|
|
|
|
|
#define GOSSIP_SELECT2 "That is terrible."
|
|
|
|
|
#define GOSSIP_SELECT3 "I will, Tirion."
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:39:07 +02:00
|
|
|
bool GossipHello_npc_tirion_fordring(Player* pPlayer, Creature* pCreature)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-14 00:39:07 +02:00
|
|
|
if (pCreature->isQuestGiver())
|
|
|
|
|
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:02:13 +02:00
|
|
|
if (pPlayer->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && pPlayer->getStandState() == UNIT_STAND_STATE_SIT)
|
2009-08-23 03:48:18 -04:00
|
|
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-12-20 13:35:08 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
return true;
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-15 00:32:04 +02:00
|
|
|
bool GossipSelect_npc_tirion_fordring(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-15 00:32:04 +02:00
|
|
|
switch (uiAction)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
|
|
|
|
case GOSSIP_ACTION_INFO_DEF+1:
|
2009-08-23 03:48:18 -04:00
|
|
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
2009-08-14 00:39:07 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(4493, pCreature->GetGUID());
|
2008-10-21 13:19:26 -05:00
|
|
|
break;
|
|
|
|
|
case GOSSIP_ACTION_INFO_DEF+2:
|
2009-08-23 03:48:18 -04:00
|
|
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
2009-08-14 00:39:07 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(4494, pCreature->GetGUID());
|
2008-10-21 13:19:26 -05:00
|
|
|
break;
|
|
|
|
|
case GOSSIP_ACTION_INFO_DEF+3:
|
2009-08-23 03:48:18 -04:00
|
|
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
2009-08-14 00:39:07 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(4495, pCreature->GetGUID());
|
2008-10-21 13:19:26 -05:00
|
|
|
break;
|
|
|
|
|
case GOSSIP_ACTION_INFO_DEF+4:
|
2009-08-14 00:02:13 +02:00
|
|
|
pPlayer->CLOSE_GOSSIP_MENU();
|
|
|
|
|
pPlayer->AreaExploredOrEventHappens(5742);
|
2008-10-21 13:19:26 -05:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
void AddSC_eastern_plaguelands()
|
|
|
|
|
{
|
|
|
|
|
Script *newscript;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript = new Script;
|
2009-10-17 04:23:24 -07:00
|
|
|
newscript->Name = "mobs_ghoul_flayer";
|
2008-12-22 23:11:25 +01:00
|
|
|
newscript->GetAI = &GetAI_mobs_ghoul_flayer;
|
2008-11-20 16:16:57 -06:00
|
|
|
newscript->RegisterSelf();
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript = new Script;
|
2009-10-17 04:23:24 -07:00
|
|
|
newscript->Name = "npc_augustus_the_touched";
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript->pGossipHello = &GossipHello_npc_augustus_the_touched;
|
|
|
|
|
newscript->pGossipSelect = &GossipSelect_npc_augustus_the_touched;
|
2008-11-20 16:16:57 -06:00
|
|
|
newscript->RegisterSelf();
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript = new Script;
|
2009-10-17 04:23:24 -07:00
|
|
|
newscript->Name = "npc_darrowshire_spirit";
|
2008-12-22 23:11:25 +01:00
|
|
|
newscript->GetAI = &GetAI_npc_darrowshire_spirit;
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit;
|
2008-11-20 16:16:57 -06:00
|
|
|
newscript->RegisterSelf();
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript = new Script;
|
2009-10-17 04:23:24 -07:00
|
|
|
newscript->Name = "npc_tirion_fordring";
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript->pGossipHello = &GossipHello_npc_tirion_fordring;
|
|
|
|
|
newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring;
|
2008-11-20 16:16:57 -06:00
|
|
|
newscript->RegisterSelf();
|
2008-10-21 13:19:26 -05:00
|
|
|
}
|
2009-02-17 20:07:49 -06:00
|
|
|
|