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: Thunder_Bluff
|
|
|
|
|
SD%Complete: 100
|
|
|
|
|
SDComment: Quest support: 925
|
|
|
|
|
SDCategory: Thunder Bluff
|
|
|
|
|
EndScriptData */
|
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
|
|
|
/*#####
|
|
|
|
|
# npc_cairne_bloodhoof
|
|
|
|
|
######*/
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
#define SPELL_BERSERKER_CHARGE 16636
|
|
|
|
|
#define SPELL_CLEAVE 16044
|
|
|
|
|
#define SPELL_MORTAL_STRIKE 16856
|
|
|
|
|
#define SPELL_THUNDERCLAP 23931
|
|
|
|
|
#define SPELL_UPPERCUT 22916
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-01-23 19:45:49 +01:00
|
|
|
#define GOSSIP_HCB "I know this is rather silly but a young ward who is a bit shy would like your hoofprint."
|
2008-10-21 13:19:26 -05:00
|
|
|
//TODO: verify abilities/timers
|
2010-02-05 00:31:28 +01:00
|
|
|
struct npc_cairne_bloodhoofAI : public ScriptedAI
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-03-31 18:12:49 -06:00
|
|
|
npc_cairne_bloodhoofAI(Creature* c) : ScriptedAI(c) {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
uint32 BerserkerCharge_Timer;
|
|
|
|
|
uint32 Cleave_Timer;
|
|
|
|
|
uint32 MortalStrike_Timer;
|
|
|
|
|
uint32 Thunderclap_Timer;
|
|
|
|
|
uint32 Uppercut_Timer;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
void Reset()
|
|
|
|
|
{
|
|
|
|
|
BerserkerCharge_Timer = 30000;
|
|
|
|
|
Cleave_Timer = 5000;
|
|
|
|
|
MortalStrike_Timer = 10000;
|
|
|
|
|
Thunderclap_Timer = 15000;
|
|
|
|
|
Uppercut_Timer = 10000;
|
|
|
|
|
}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-04-27 21:23:42 -05:00
|
|
|
void EnterCombat(Unit *who) {}
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
void UpdateAI(const uint32 diff)
|
|
|
|
|
{
|
2009-08-14 00:02:13 +02:00
|
|
|
if (!UpdateVictim())
|
2008-10-21 13:19:26 -05:00
|
|
|
return;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-27 21:28:20 -07:00
|
|
|
if (BerserkerCharge_Timer <= diff)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-10-27 21:28:20 -07:00
|
|
|
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
|
|
|
|
|
if (pTarget)
|
2009-11-11 13:47:21 -08:00
|
|
|
DoCast(pTarget, SPELL_BERSERKER_CHARGE);
|
2008-10-21 13:19:26 -05:00
|
|
|
BerserkerCharge_Timer = 25000;
|
2009-10-27 21:28:20 -07:00
|
|
|
} else BerserkerCharge_Timer -= diff;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-27 21:28:20 -07:00
|
|
|
if (Uppercut_Timer <= diff)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-11-11 13:47:21 -08:00
|
|
|
DoCast(m_creature->getVictim(), SPELL_UPPERCUT);
|
2008-10-21 13:19:26 -05:00
|
|
|
Uppercut_Timer = 20000;
|
2009-10-27 21:28:20 -07:00
|
|
|
} else Uppercut_Timer -= diff;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-27 21:28:20 -07:00
|
|
|
if (Thunderclap_Timer <= diff)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-11-11 13:47:21 -08:00
|
|
|
DoCast(m_creature->getVictim(), SPELL_THUNDERCLAP);
|
2008-10-21 13:19:26 -05:00
|
|
|
Thunderclap_Timer = 15000;
|
2009-10-27 21:28:20 -07:00
|
|
|
} else Thunderclap_Timer -= diff;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-27 21:28:20 -07:00
|
|
|
if (MortalStrike_Timer <= diff)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-11-11 13:47:21 -08:00
|
|
|
DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE);
|
2008-10-21 13:19:26 -05:00
|
|
|
MortalStrike_Timer = 15000;
|
2009-10-27 21:28:20 -07:00
|
|
|
} else MortalStrike_Timer -= diff;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-10-27 21:28:20 -07:00
|
|
|
if (Cleave_Timer <= diff)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-11-11 13:47:21 -08:00
|
|
|
DoCast(m_creature->getVictim(), SPELL_CLEAVE);
|
2008-10-21 13:19:26 -05:00
|
|
|
Cleave_Timer = 7000;
|
2009-10-27 21:28:20 -07:00
|
|
|
} else Cleave_Timer -= diff;
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2008-10-21 13:19:26 -05:00
|
|
|
DoMeleeAttackIfReady();
|
|
|
|
|
}
|
|
|
|
|
};
|
2009-08-14 00:39:07 +02:00
|
|
|
CreatureAI* GetAI_npc_cairne_bloodhoof(Creature* pCreature)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-14 00:39:07 +02:00
|
|
|
return new npc_cairne_bloodhoofAI (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_cairne_bloodhoof(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(925) == QUEST_STATUS_INCOMPLETE)
|
|
|
|
|
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HCB, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO);
|
2009-10-17 15:51:44 -07:00
|
|
|
|
2009-08-14 00:39:07 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(7013, 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_cairne_bloodhoof(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_SENDER_INFO)
|
2008-10-21 13:19:26 -05:00
|
|
|
{
|
2009-08-14 00:02:13 +02:00
|
|
|
pPlayer->CastSpell(pPlayer, 23123, false);
|
2009-08-14 00:39:07 +02:00
|
|
|
pPlayer->SEND_GOSSIP_MENU(7014, 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
|
|
|
void AddSC_thunder_bluff()
|
|
|
|
|
{
|
|
|
|
|
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 = "npc_cairne_bloodhoof";
|
2008-12-22 23:11:25 +01:00
|
|
|
newscript->GetAI = &GetAI_npc_cairne_bloodhoof;
|
2008-10-21 13:19:26 -05:00
|
|
|
newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof;
|
|
|
|
|
newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof;
|
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
|
|
|
|