change CRLF files to LF This needs to be done in the main TC2 repo too
--HG-- branch : trunk
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+450
-450
@@ -1,450 +1,450 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Blades_Edge_Mountains
|
||||
SD%Complete: 90
|
||||
SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete)
|
||||
SDCategory: Blade's Edge Mountains
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
mobs_bladespire_ogre
|
||||
mobs_nether_drake
|
||||
npc_daranelle
|
||||
npc_overseer_nuaar
|
||||
npc_saikkal_the_elder
|
||||
npc_skyguard_handler_irena
|
||||
go_legion_obelisk
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
//Support for quest: You're Fired! (10821)
|
||||
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
|
||||
|
||||
#define LEGION_OBELISK_ONE 185193
|
||||
#define LEGION_OBELISK_TWO 185195
|
||||
#define LEGION_OBELISK_THREE 185196
|
||||
#define LEGION_OBELISK_FOUR 185197
|
||||
#define LEGION_OBELISK_FIVE 185198
|
||||
|
||||
/*######
|
||||
## mobs_bladespire_ogre
|
||||
######*/
|
||||
|
||||
//TODO: add support for quest 10512 + creature abilities
|
||||
struct TRINITY_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI
|
||||
{
|
||||
mobs_bladespire_ogreAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (Killer->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)Killer)->KilledMonster(19995, m_creature->GetGUID());
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_mobs_bladespire_ogre(Creature *_Creature)
|
||||
{
|
||||
return new mobs_bladespire_ogreAI (_Creature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## mobs_nether_drake
|
||||
######*/
|
||||
|
||||
#define SAY_NIHIL_1 -1000396
|
||||
#define SAY_NIHIL_2 -1000397
|
||||
#define SAY_NIHIL_3 -1000398
|
||||
#define SAY_NIHIL_4 -1000399
|
||||
#define SAY_NIHIL_INTERRUPT -1000400
|
||||
|
||||
#define ENTRY_WHELP 20021
|
||||
#define ENTRY_PROTO 21821
|
||||
#define ENTRY_ADOLE 21817
|
||||
#define ENTRY_MATUR 21820
|
||||
#define ENTRY_NIHIL 21823
|
||||
|
||||
#define SPELL_T_PHASE_MODULATOR 37573
|
||||
|
||||
#define SPELL_ARCANE_BLAST 38881
|
||||
#define SPELL_MANA_BURN 38884
|
||||
#define SPELL_INTANGIBLE_PRESENCE 36513
|
||||
|
||||
struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI
|
||||
{
|
||||
mobs_nether_drakeAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
bool IsNihil;
|
||||
uint32 NihilSpeech_Timer;
|
||||
uint32 NihilSpeech_Phase;
|
||||
|
||||
uint32 ArcaneBlast_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 IntangiblePresence_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
IsNihil = false;
|
||||
NihilSpeech_Timer = 3000;
|
||||
NihilSpeech_Phase = 0;
|
||||
|
||||
ArcaneBlast_Timer = 7500;
|
||||
ManaBurn_Timer = 10000;
|
||||
IntangiblePresence_Timer = 15000;
|
||||
}
|
||||
|
||||
void Aggro(Unit* who) { }
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
//in case creature was not summoned (not expected)
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (id == 0)
|
||||
{
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->SetHealth(0);
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
const uint32 entry_list[4] = {ENTRY_PROTO, ENTRY_ADOLE, ENTRY_MATUR, ENTRY_NIHIL};
|
||||
int cid = rand()%(4-1);
|
||||
|
||||
if (entry_list[cid] == m_creature->GetEntry())
|
||||
++cid;
|
||||
|
||||
//we are nihil, so say before transform
|
||||
if (m_creature->GetEntry() == ENTRY_NIHIL)
|
||||
{
|
||||
DoScriptText(SAY_NIHIL_INTERRUPT, m_creature);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
IsNihil = false;
|
||||
}
|
||||
|
||||
if (m_creature->UpdateEntry(entry_list[cid]))
|
||||
{
|
||||
if (entry_list[cid] == ENTRY_NIHIL)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
IsNihil = true;
|
||||
}else
|
||||
AttackStart(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (IsNihil)
|
||||
{
|
||||
if (NihilSpeech_Timer <= diff)
|
||||
{
|
||||
switch(NihilSpeech_Phase)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_NIHIL_1, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 1:
|
||||
DoScriptText(SAY_NIHIL_2, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_NIHIL_3, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SAY_NIHIL_4, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 4:
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//take off to location above
|
||||
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ()+50.0f);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
}
|
||||
NihilSpeech_Timer = 5000;
|
||||
}else NihilSpeech_Timer -=diff;
|
||||
|
||||
//anything below here is not interesting for Nihil, so skip it
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (IntangiblePresence_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE);
|
||||
IntangiblePresence_Timer = 15000+rand()%15000;
|
||||
}else IntangiblePresence_Timer -= diff;
|
||||
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
Unit* target = m_creature->getVictim();
|
||||
if (target && target->getPowerType() == POWER_MANA)
|
||||
DoCast(target,SPELL_MANA_BURN);
|
||||
ManaBurn_Timer = 8000+rand()%8000;
|
||||
}else ManaBurn_Timer -= diff;
|
||||
|
||||
if (ArcaneBlast_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST);
|
||||
ArcaneBlast_Timer = 2500+rand()%5000;
|
||||
}else ArcaneBlast_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mobs_nether_drake(Creature *_Creature)
|
||||
{
|
||||
return new mobs_nether_drakeAI (_Creature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_daranelle
|
||||
######*/
|
||||
|
||||
#define SAY_SPELL_INFLUENCE -1000174
|
||||
|
||||
struct TRINITY_DLL_DECL npc_daranelleAI : public ScriptedAI
|
||||
{
|
||||
npc_daranelleAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void Aggro(Unit* who) { }
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (who->HasAura(36904,0) && m_creature->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
DoScriptText(SAY_SPELL_INFLUENCE, m_creature, who);
|
||||
//TODO: Move the below to updateAI and run if this statement == true
|
||||
((Player*)who)->KilledMonster(21511, m_creature->GetGUID());
|
||||
((Player*)who)->RemoveAurasDueToSpell(36904);
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_daranelle(Creature *_Creature)
|
||||
{
|
||||
return new npc_daranelleAI (_Creature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_overseer_nuaar
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_overseer_nuaar(Player *player, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(10532, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_overseer_nuaar(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->SEND_GOSSIP_MENU(10533, _Creature->GetGUID());
|
||||
player->AreaExploredOrEventHappens(10682);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_saikkal_the_elder
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_saikkal_the_elder(Player *player, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(10794, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM( 0, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(10795, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->TalkedToCreature(_Creature->GetEntry(), _Creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(10796, _Creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_skyguard_handler_irena
|
||||
######*/
|
||||
|
||||
#define GOSSIP_SKYGUARD "Fly me to Skettis please"
|
||||
|
||||
bool GossipHello_npc_skyguard_handler_irena(Player *player, Creature *_Creature )
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
|
||||
if (player->GetReputationRank(1031) >= REP_HONORED)
|
||||
player->ADD_GOSSIP_ITEM( 2, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_skyguard_handler_irena(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,41278,true); //TaxiPath 706
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## go_legion_obelisk
|
||||
######*/
|
||||
|
||||
bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO)
|
||||
{
|
||||
if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE )
|
||||
{
|
||||
switch( _GO->GetEntry() )
|
||||
{
|
||||
case LEGION_OBELISK_ONE:
|
||||
obelisk_one = true;
|
||||
break;
|
||||
case LEGION_OBELISK_TWO:
|
||||
obelisk_two = true;
|
||||
break;
|
||||
case LEGION_OBELISK_THREE:
|
||||
obelisk_three = true;
|
||||
break;
|
||||
case LEGION_OBELISK_FOUR:
|
||||
obelisk_four = true;
|
||||
break;
|
||||
case LEGION_OBELISK_FIVE:
|
||||
obelisk_five = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true )
|
||||
{
|
||||
_GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
|
||||
//reset global var
|
||||
obelisk_one = false;
|
||||
obelisk_two = false;
|
||||
obelisk_three = false;
|
||||
obelisk_four = false;
|
||||
obelisk_five = false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## AddSC
|
||||
######*/
|
||||
|
||||
void AddSC_blades_edge_mountains()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mobs_bladespire_ogre";
|
||||
newscript->GetAI = &GetAI_mobs_bladespire_ogre;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mobs_nether_drake";
|
||||
newscript->GetAI = &GetAI_mobs_nether_drake;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_daranelle";
|
||||
newscript->GetAI = &GetAI_npc_daranelle;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_overseer_nuaar";
|
||||
newscript->pGossipHello = &GossipHello_npc_overseer_nuaar;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_saikkal_the_elder";
|
||||
newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="go_legion_obelisk";
|
||||
newscript->pGOHello = &GOHello_go_legion_obelisk;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_skyguard_handler_irena";
|
||||
newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Blades_Edge_Mountains
|
||||
SD%Complete: 90
|
||||
SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete)
|
||||
SDCategory: Blade's Edge Mountains
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
mobs_bladespire_ogre
|
||||
mobs_nether_drake
|
||||
npc_daranelle
|
||||
npc_overseer_nuaar
|
||||
npc_saikkal_the_elder
|
||||
npc_skyguard_handler_irena
|
||||
go_legion_obelisk
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
//Support for quest: You're Fired! (10821)
|
||||
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
|
||||
|
||||
#define LEGION_OBELISK_ONE 185193
|
||||
#define LEGION_OBELISK_TWO 185195
|
||||
#define LEGION_OBELISK_THREE 185196
|
||||
#define LEGION_OBELISK_FOUR 185197
|
||||
#define LEGION_OBELISK_FIVE 185198
|
||||
|
||||
/*######
|
||||
## mobs_bladespire_ogre
|
||||
######*/
|
||||
|
||||
//TODO: add support for quest 10512 + creature abilities
|
||||
struct TRINITY_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI
|
||||
{
|
||||
mobs_bladespire_ogreAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
if (Killer->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)Killer)->KilledMonster(19995, m_creature->GetGUID());
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_mobs_bladespire_ogre(Creature *_Creature)
|
||||
{
|
||||
return new mobs_bladespire_ogreAI (_Creature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## mobs_nether_drake
|
||||
######*/
|
||||
|
||||
#define SAY_NIHIL_1 -1000396
|
||||
#define SAY_NIHIL_2 -1000397
|
||||
#define SAY_NIHIL_3 -1000398
|
||||
#define SAY_NIHIL_4 -1000399
|
||||
#define SAY_NIHIL_INTERRUPT -1000400
|
||||
|
||||
#define ENTRY_WHELP 20021
|
||||
#define ENTRY_PROTO 21821
|
||||
#define ENTRY_ADOLE 21817
|
||||
#define ENTRY_MATUR 21820
|
||||
#define ENTRY_NIHIL 21823
|
||||
|
||||
#define SPELL_T_PHASE_MODULATOR 37573
|
||||
|
||||
#define SPELL_ARCANE_BLAST 38881
|
||||
#define SPELL_MANA_BURN 38884
|
||||
#define SPELL_INTANGIBLE_PRESENCE 36513
|
||||
|
||||
struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI
|
||||
{
|
||||
mobs_nether_drakeAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
bool IsNihil;
|
||||
uint32 NihilSpeech_Timer;
|
||||
uint32 NihilSpeech_Phase;
|
||||
|
||||
uint32 ArcaneBlast_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
uint32 IntangiblePresence_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
IsNihil = false;
|
||||
NihilSpeech_Timer = 3000;
|
||||
NihilSpeech_Phase = 0;
|
||||
|
||||
ArcaneBlast_Timer = 7500;
|
||||
ManaBurn_Timer = 10000;
|
||||
IntangiblePresence_Timer = 15000;
|
||||
}
|
||||
|
||||
void Aggro(Unit* who) { }
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
//in case creature was not summoned (not expected)
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (id == 0)
|
||||
{
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
m_creature->RemoveCorpse();
|
||||
m_creature->SetHealth(0);
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit *caster, const SpellEntry *spell)
|
||||
{
|
||||
if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
const uint32 entry_list[4] = {ENTRY_PROTO, ENTRY_ADOLE, ENTRY_MATUR, ENTRY_NIHIL};
|
||||
int cid = rand()%(4-1);
|
||||
|
||||
if (entry_list[cid] == m_creature->GetEntry())
|
||||
++cid;
|
||||
|
||||
//we are nihil, so say before transform
|
||||
if (m_creature->GetEntry() == ENTRY_NIHIL)
|
||||
{
|
||||
DoScriptText(SAY_NIHIL_INTERRUPT, m_creature);
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
IsNihil = false;
|
||||
}
|
||||
|
||||
if (m_creature->UpdateEntry(entry_list[cid]))
|
||||
{
|
||||
if (entry_list[cid] == ENTRY_NIHIL)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
IsNihil = true;
|
||||
}else
|
||||
AttackStart(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (IsNihil)
|
||||
{
|
||||
if (NihilSpeech_Timer <= diff)
|
||||
{
|
||||
switch(NihilSpeech_Phase)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_NIHIL_1, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 1:
|
||||
DoScriptText(SAY_NIHIL_2, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_NIHIL_3, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SAY_NIHIL_4, m_creature);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
case 4:
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//take off to location above
|
||||
m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ()+50.0f);
|
||||
++NihilSpeech_Phase;
|
||||
break;
|
||||
}
|
||||
NihilSpeech_Timer = 5000;
|
||||
}else NihilSpeech_Timer -=diff;
|
||||
|
||||
//anything below here is not interesting for Nihil, so skip it
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (IntangiblePresence_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE);
|
||||
IntangiblePresence_Timer = 15000+rand()%15000;
|
||||
}else IntangiblePresence_Timer -= diff;
|
||||
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
Unit* target = m_creature->getVictim();
|
||||
if (target && target->getPowerType() == POWER_MANA)
|
||||
DoCast(target,SPELL_MANA_BURN);
|
||||
ManaBurn_Timer = 8000+rand()%8000;
|
||||
}else ManaBurn_Timer -= diff;
|
||||
|
||||
if (ArcaneBlast_Timer <= diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST);
|
||||
ArcaneBlast_Timer = 2500+rand()%5000;
|
||||
}else ArcaneBlast_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mobs_nether_drake(Creature *_Creature)
|
||||
{
|
||||
return new mobs_nether_drakeAI (_Creature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_daranelle
|
||||
######*/
|
||||
|
||||
#define SAY_SPELL_INFLUENCE -1000174
|
||||
|
||||
struct TRINITY_DLL_DECL npc_daranelleAI : public ScriptedAI
|
||||
{
|
||||
npc_daranelleAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void Aggro(Unit* who) { }
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (who->HasAura(36904,0) && m_creature->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
DoScriptText(SAY_SPELL_INFLUENCE, m_creature, who);
|
||||
//TODO: Move the below to updateAI and run if this statement == true
|
||||
((Player*)who)->KilledMonster(21511, m_creature->GetGUID());
|
||||
((Player*)who)->RemoveAurasDueToSpell(36904);
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_daranelle(Creature *_Creature)
|
||||
{
|
||||
return new npc_daranelleAI (_Creature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_overseer_nuaar
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_overseer_nuaar(Player *player, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(10532, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_overseer_nuaar(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->SEND_GOSSIP_MENU(10533, _Creature->GetGUID());
|
||||
player->AreaExploredOrEventHappens(10682);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_saikkal_the_elder
|
||||
######*/
|
||||
|
||||
bool GossipHello_npc_saikkal_the_elder(Player *player, Creature *_Creature)
|
||||
{
|
||||
if (player->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(10794, _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uint32 sender, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM( 0, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
|
||||
player->SEND_GOSSIP_MENU(10795, _Creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->TalkedToCreature(_Creature->GetEntry(), _Creature->GetGUID());
|
||||
player->SEND_GOSSIP_MENU(10796, _Creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_skyguard_handler_irena
|
||||
######*/
|
||||
|
||||
#define GOSSIP_SKYGUARD "Fly me to Skettis please"
|
||||
|
||||
bool GossipHello_npc_skyguard_handler_irena(Player *player, Creature *_Creature )
|
||||
{
|
||||
if (_Creature->isQuestGiver())
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
|
||||
if (player->GetReputationRank(1031) >= REP_HONORED)
|
||||
player->ADD_GOSSIP_ITEM( 2, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_skyguard_handler_irena(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
if (action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->CastSpell(player,41278,true); //TaxiPath 706
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## go_legion_obelisk
|
||||
######*/
|
||||
|
||||
bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO)
|
||||
{
|
||||
if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE )
|
||||
{
|
||||
switch( _GO->GetEntry() )
|
||||
{
|
||||
case LEGION_OBELISK_ONE:
|
||||
obelisk_one = true;
|
||||
break;
|
||||
case LEGION_OBELISK_TWO:
|
||||
obelisk_two = true;
|
||||
break;
|
||||
case LEGION_OBELISK_THREE:
|
||||
obelisk_three = true;
|
||||
break;
|
||||
case LEGION_OBELISK_FOUR:
|
||||
obelisk_four = true;
|
||||
break;
|
||||
case LEGION_OBELISK_FIVE:
|
||||
obelisk_five = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true )
|
||||
{
|
||||
_GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000);
|
||||
//reset global var
|
||||
obelisk_one = false;
|
||||
obelisk_two = false;
|
||||
obelisk_three = false;
|
||||
obelisk_four = false;
|
||||
obelisk_five = false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## AddSC
|
||||
######*/
|
||||
|
||||
void AddSC_blades_edge_mountains()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mobs_bladespire_ogre";
|
||||
newscript->GetAI = &GetAI_mobs_bladespire_ogre;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="mobs_nether_drake";
|
||||
newscript->GetAI = &GetAI_mobs_nether_drake;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_daranelle";
|
||||
newscript->GetAI = &GetAI_npc_daranelle;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_overseer_nuaar";
|
||||
newscript->pGossipHello = &GossipHello_npc_overseer_nuaar;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_saikkal_the_elder";
|
||||
newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="go_legion_obelisk";
|
||||
newscript->pGOHello = &GOHello_go_legion_obelisk;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_skyguard_handler_irena";
|
||||
newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+121
-121
@@ -1,121 +1,121 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Broggok
|
||||
SD%Complete: 70
|
||||
SDComment: pre-event not made
|
||||
SDCategory: Hellfire Citadel, Blood Furnace
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SAY_AGGRO -1542008
|
||||
|
||||
#define SPELL_SLIME_SPRAY 30913
|
||||
#define SPELL_POISON_CLOUD 30916
|
||||
#define SPELL_POISON_BOLT 30917
|
||||
|
||||
#define SPELL_POISON 30914
|
||||
|
||||
struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
|
||||
{
|
||||
boss_broggokAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 AcidSpray_Timer;
|
||||
uint32 PoisonSpawn_Timer;
|
||||
uint32 PoisonBolt_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
AcidSpray_Timer = 10000;
|
||||
PoisonSpawn_Timer = 5000;
|
||||
PoisonBolt_Timer = 7000;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->setFaction(16);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
summoned->CastSpell(summoned,SPELL_POISON,false,0,0,m_creature->GetGUID());
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (AcidSpray_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SLIME_SPRAY);
|
||||
AcidSpray_Timer = 4000+rand()%8000;
|
||||
}else AcidSpray_Timer -=diff;
|
||||
|
||||
if (PoisonBolt_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_POISON_BOLT);
|
||||
PoisonBolt_Timer = 4000+rand()%8000;
|
||||
}else PoisonBolt_Timer -=diff;
|
||||
|
||||
if (PoisonSpawn_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_POISON_CLOUD);
|
||||
PoisonSpawn_Timer = 20000;
|
||||
}else PoisonSpawn_Timer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI
|
||||
{
|
||||
mob_broggok_poisoncloudAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset() { }
|
||||
void MoveInLineOfSight(Unit *who) { }
|
||||
void AttackStart(Unit *who) { }
|
||||
void Aggro(Unit* who) { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_broggok(Creature *_Creature)
|
||||
{
|
||||
return new boss_broggokAI (_Creature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_broggok_poisoncloud(Creature *_Creature)
|
||||
{
|
||||
return new mob_broggok_poisoncloudAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_broggok()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_broggok";
|
||||
newscript->GetAI = &GetAI_boss_broggok;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_broggok_poisoncloud";
|
||||
newscript->GetAI = &GetAI_mob_broggok_poisoncloud;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Broggok
|
||||
SD%Complete: 70
|
||||
SDComment: pre-event not made
|
||||
SDCategory: Hellfire Citadel, Blood Furnace
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SAY_AGGRO -1542008
|
||||
|
||||
#define SPELL_SLIME_SPRAY 30913
|
||||
#define SPELL_POISON_CLOUD 30916
|
||||
#define SPELL_POISON_BOLT 30917
|
||||
|
||||
#define SPELL_POISON 30914
|
||||
|
||||
struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
|
||||
{
|
||||
boss_broggokAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 AcidSpray_Timer;
|
||||
uint32 PoisonSpawn_Timer;
|
||||
uint32 PoisonBolt_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
AcidSpray_Timer = 10000;
|
||||
PoisonSpawn_Timer = 5000;
|
||||
PoisonBolt_Timer = 7000;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
summoned->setFaction(16);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
summoned->CastSpell(summoned,SPELL_POISON,false,0,0,m_creature->GetGUID());
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (AcidSpray_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_SLIME_SPRAY);
|
||||
AcidSpray_Timer = 4000+rand()%8000;
|
||||
}else AcidSpray_Timer -=diff;
|
||||
|
||||
if (PoisonBolt_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature->getVictim(),SPELL_POISON_BOLT);
|
||||
PoisonBolt_Timer = 4000+rand()%8000;
|
||||
}else PoisonBolt_Timer -=diff;
|
||||
|
||||
if (PoisonSpawn_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature,SPELL_POISON_CLOUD);
|
||||
PoisonSpawn_Timer = 20000;
|
||||
}else PoisonSpawn_Timer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI
|
||||
{
|
||||
mob_broggok_poisoncloudAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset() { }
|
||||
void MoveInLineOfSight(Unit *who) { }
|
||||
void AttackStart(Unit *who) { }
|
||||
void Aggro(Unit* who) { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_broggok(Creature *_Creature)
|
||||
{
|
||||
return new boss_broggokAI (_Creature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_mob_broggok_poisoncloud(Creature *_Creature)
|
||||
{
|
||||
return new mob_broggok_poisoncloudAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_broggok()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_broggok";
|
||||
newscript->GetAI = &GetAI_boss_broggok;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_broggok_poisoncloud";
|
||||
newscript->GetAI = &GetAI_mob_broggok_poisoncloud;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -1,201 +1,201 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Curator
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Karazhan
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SAY_AGGRO -1532057
|
||||
#define SAY_SUMMON1 -1532058
|
||||
#define SAY_SUMMON2 -1532059
|
||||
#define SAY_EVOCATE -1532060
|
||||
#define SAY_ENRAGE -1532061
|
||||
#define SAY_KILL1 -1532062
|
||||
#define SAY_KILL2 -1532063
|
||||
#define SAY_DEATH -1532064
|
||||
|
||||
//Flare spell info
|
||||
#define SPELL_ASTRAL_FLARE_PASSIVE 30234 //Visual effect + Flare damage
|
||||
|
||||
//Curator spell info
|
||||
#define SPELL_HATEFUL_BOLT 30383
|
||||
#define SPELL_EVOCATION 30254
|
||||
#define SPELL_ENRAGE 30403 //Arcane Infusion: Transforms Curator and adds damage.
|
||||
#define SPELL_BERSERK 26662
|
||||
|
||||
struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI
|
||||
{
|
||||
boss_curatorAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 AddTimer;
|
||||
uint32 HatefulBoltTimer;
|
||||
uint32 BerserkTimer;
|
||||
|
||||
bool Enraged;
|
||||
bool Evocating;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
AddTimer = 10000;
|
||||
HatefulBoltTimer = 15000; //This time may be wrong
|
||||
BerserkTimer = 720000; //12 minutes
|
||||
Enraged = false;
|
||||
Evocating = false;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//always decrease BerserkTimer
|
||||
if (BerserkTimer < diff)
|
||||
{
|
||||
//if evocate, then break evocate
|
||||
if (Evocating)
|
||||
{
|
||||
if (m_creature->HasAura(SPELL_EVOCATION))
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION);
|
||||
|
||||
Evocating = false;
|
||||
}
|
||||
|
||||
//may not be correct SAY (generic hard enrage)
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
|
||||
//don't know if he's supposed to do summon/evocate after hard enrage (probably not)
|
||||
Enraged = true;
|
||||
}else BerserkTimer -= diff;
|
||||
|
||||
if (Evocating)
|
||||
{
|
||||
//not supposed to do anything while evocate
|
||||
if (m_creature->HasAura(SPELL_EVOCATION))
|
||||
return;
|
||||
else
|
||||
Evocating = false;
|
||||
}
|
||||
|
||||
if (!Enraged)
|
||||
{
|
||||
if (AddTimer < diff)
|
||||
{
|
||||
//Summon Astral Flare
|
||||
Creature* AstralFlare = DoSpawnCreature(17096, rand()%37, rand()%37, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (AstralFlare && target)
|
||||
{
|
||||
AstralFlare->CastSpell(AstralFlare, SPELL_ASTRAL_FLARE_PASSIVE, false);
|
||||
AstralFlare->AI()->AttackStart(target);
|
||||
AstralFlare->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||
AstralFlare->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||
}
|
||||
|
||||
//Reduce Mana by 10% of max health
|
||||
if (int32 mana = m_creature->GetMaxPower(POWER_MANA))
|
||||
{
|
||||
mana /= 10;
|
||||
m_creature->ModifyPower(POWER_MANA, -mana);
|
||||
|
||||
//if this get's us below 10%, then we evocate (the 10th should be summoned now)
|
||||
if (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA) < 10)
|
||||
{
|
||||
DoScriptText(SAY_EVOCATE, m_creature);
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature, SPELL_EVOCATION);
|
||||
Evocating = true;
|
||||
//no AddTimer cooldown, this will make first flare appear instantly after evocate end, like expected
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(rand()%4)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AddTimer = 10000;
|
||||
}else AddTimer -= diff;
|
||||
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 15)
|
||||
{
|
||||
Enraged = true;
|
||||
DoCast(m_creature, SPELL_ENRAGE);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
}
|
||||
}
|
||||
|
||||
if (HatefulBoltTimer < diff)
|
||||
{
|
||||
if (Enraged)
|
||||
HatefulBoltTimer = 7000;
|
||||
else
|
||||
HatefulBoltTimer = 15000;
|
||||
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
|
||||
DoCast(target, SPELL_HATEFUL_BOLT);
|
||||
|
||||
}else HatefulBoltTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_curator(Creature *_Creature)
|
||||
{
|
||||
return new boss_curatorAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_curator()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_curator";
|
||||
newscript->GetAI = &GetAI_boss_curator;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Curator
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Karazhan
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#define SAY_AGGRO -1532057
|
||||
#define SAY_SUMMON1 -1532058
|
||||
#define SAY_SUMMON2 -1532059
|
||||
#define SAY_EVOCATE -1532060
|
||||
#define SAY_ENRAGE -1532061
|
||||
#define SAY_KILL1 -1532062
|
||||
#define SAY_KILL2 -1532063
|
||||
#define SAY_DEATH -1532064
|
||||
|
||||
//Flare spell info
|
||||
#define SPELL_ASTRAL_FLARE_PASSIVE 30234 //Visual effect + Flare damage
|
||||
|
||||
//Curator spell info
|
||||
#define SPELL_HATEFUL_BOLT 30383
|
||||
#define SPELL_EVOCATION 30254
|
||||
#define SPELL_ENRAGE 30403 //Arcane Infusion: Transforms Curator and adds damage.
|
||||
#define SPELL_BERSERK 26662
|
||||
|
||||
struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI
|
||||
{
|
||||
boss_curatorAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
uint32 AddTimer;
|
||||
uint32 HatefulBoltTimer;
|
||||
uint32 BerserkTimer;
|
||||
|
||||
bool Enraged;
|
||||
bool Evocating;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
AddTimer = 10000;
|
||||
HatefulBoltTimer = 15000; //This time may be wrong
|
||||
BerserkTimer = 720000; //12 minutes
|
||||
Enraged = false;
|
||||
Evocating = false;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0: DoScriptText(SAY_KILL1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_KILL2, m_creature); break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, m_creature);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//always decrease BerserkTimer
|
||||
if (BerserkTimer < diff)
|
||||
{
|
||||
//if evocate, then break evocate
|
||||
if (Evocating)
|
||||
{
|
||||
if (m_creature->HasAura(SPELL_EVOCATION))
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION);
|
||||
|
||||
Evocating = false;
|
||||
}
|
||||
|
||||
//may not be correct SAY (generic hard enrage)
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
|
||||
m_creature->InterruptNonMeleeSpells(true);
|
||||
DoCast(m_creature, SPELL_BERSERK);
|
||||
|
||||
//don't know if he's supposed to do summon/evocate after hard enrage (probably not)
|
||||
Enraged = true;
|
||||
}else BerserkTimer -= diff;
|
||||
|
||||
if (Evocating)
|
||||
{
|
||||
//not supposed to do anything while evocate
|
||||
if (m_creature->HasAura(SPELL_EVOCATION))
|
||||
return;
|
||||
else
|
||||
Evocating = false;
|
||||
}
|
||||
|
||||
if (!Enraged)
|
||||
{
|
||||
if (AddTimer < diff)
|
||||
{
|
||||
//Summon Astral Flare
|
||||
Creature* AstralFlare = DoSpawnCreature(17096, rand()%37, rand()%37, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
Unit* target = NULL;
|
||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (AstralFlare && target)
|
||||
{
|
||||
AstralFlare->CastSpell(AstralFlare, SPELL_ASTRAL_FLARE_PASSIVE, false);
|
||||
AstralFlare->AI()->AttackStart(target);
|
||||
AstralFlare->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||
AstralFlare->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
|
||||
}
|
||||
|
||||
//Reduce Mana by 10% of max health
|
||||
if (int32 mana = m_creature->GetMaxPower(POWER_MANA))
|
||||
{
|
||||
mana /= 10;
|
||||
m_creature->ModifyPower(POWER_MANA, -mana);
|
||||
|
||||
//if this get's us below 10%, then we evocate (the 10th should be summoned now)
|
||||
if (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA) < 10)
|
||||
{
|
||||
DoScriptText(SAY_EVOCATE, m_creature);
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
DoCast(m_creature, SPELL_EVOCATION);
|
||||
Evocating = true;
|
||||
//no AddTimer cooldown, this will make first flare appear instantly after evocate end, like expected
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(rand()%4)
|
||||
{
|
||||
case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
|
||||
case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AddTimer = 10000;
|
||||
}else AddTimer -= diff;
|
||||
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 15)
|
||||
{
|
||||
Enraged = true;
|
||||
DoCast(m_creature, SPELL_ENRAGE);
|
||||
DoScriptText(SAY_ENRAGE, m_creature);
|
||||
}
|
||||
}
|
||||
|
||||
if (HatefulBoltTimer < diff)
|
||||
{
|
||||
if (Enraged)
|
||||
HatefulBoltTimer = 7000;
|
||||
else
|
||||
HatefulBoltTimer = 15000;
|
||||
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
|
||||
DoCast(target, SPELL_HATEFUL_BOLT);
|
||||
|
||||
}else HatefulBoltTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_curator(Creature *_Creature)
|
||||
{
|
||||
return new boss_curatorAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_curator()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_curator";
|
||||
newscript->GetAI = &GetAI_boss_curator;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -1,227 +1,227 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Vexallus
|
||||
SD%Complete: 90
|
||||
SDComment: Heroic and Normal support. Needs further testing.
|
||||
SDCategory: Magister's Terrace
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_magisters_terrace.h"
|
||||
|
||||
#define SAY_AGGRO -1585007
|
||||
#define SAY_ENERGY -1585008
|
||||
#define SAY_OVERLOAD -1585009
|
||||
#define SAY_KILL -1585010
|
||||
#define EMOTE_DISCHARGE_ENERGY -1585011
|
||||
|
||||
//is this text for real?
|
||||
//#define SAY_DEATH "What...happen...ed."
|
||||
|
||||
//Pure energy spell info
|
||||
#define SPELL_ENERGY_BOLT 46156
|
||||
#define SPELL_ENERGY_FEEDBACK 44335
|
||||
|
||||
//Vexallus spell info
|
||||
#define SPELL_CHAIN_LIGHTNING 44318
|
||||
#define SPELL_OVERLOAD 44353
|
||||
#define SPELL_ARCANE_SHOCK 44319
|
||||
|
||||
#define SPELL_SUMMON_PURE_ENERGY 44322 //mod scale -10
|
||||
#define H_SPELL_SUMMON_PURE_ENERGY1 46154 //mod scale -5
|
||||
#define H_SPELL_SUMMON_PURE_ENERGY2 46159 //mod scale -5
|
||||
|
||||
//Creatures
|
||||
#define CREATURE_PURE_ENERGY 24745
|
||||
|
||||
struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
||||
{
|
||||
boss_vexallusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Heroic = c->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
bool Heroic;
|
||||
|
||||
uint32 ChainLightningTimer;
|
||||
uint32 ArcaneShockTimer;
|
||||
uint32 OverloadTimer;
|
||||
uint32 SpawnAddInterval;
|
||||
uint32 AlreadySpawnedAmount;
|
||||
bool Enraged;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ChainLightningTimer = 10000;
|
||||
ArcaneShockTimer = 8000;
|
||||
OverloadTimer = 2200;
|
||||
SpawnAddInterval = 15;
|
||||
AlreadySpawnedAmount = 0;
|
||||
Enraged = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_KILL, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
if (Unit *temp = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->GetMotionMaster()->MoveFollow(temp,0,0);
|
||||
|
||||
//spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok
|
||||
summoned->SetOwnerGUID(m_creature->GetGUID());
|
||||
summoned->CastSpell(summoned,SPELL_ENERGY_BOLT,false,0,0,m_creature->GetGUID());
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10)
|
||||
{
|
||||
Enraged = true;
|
||||
}
|
||||
|
||||
if (!Enraged)
|
||||
{
|
||||
//used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25%
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(SpawnAddInterval*(AlreadySpawnedAmount+1))))
|
||||
{
|
||||
DoScriptText(SAY_ENERGY, m_creature);
|
||||
DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature);
|
||||
|
||||
if (Heroic)
|
||||
{
|
||||
m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY1,false);
|
||||
m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY2,false);
|
||||
}
|
||||
else
|
||||
m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false);
|
||||
|
||||
//below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos
|
||||
DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
if (Heroic)
|
||||
DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
++AlreadySpawnedAmount;
|
||||
}
|
||||
|
||||
if (ChainLightningTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
|
||||
ChainLightningTimer = 10000;
|
||||
}else ChainLightningTimer -= diff;
|
||||
|
||||
if (ArcaneShockTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ARCANE_SHOCK);
|
||||
|
||||
ArcaneShockTimer = 8000;
|
||||
}else ArcaneShockTimer -= diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (OverloadTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_OVERLOAD);
|
||||
|
||||
OverloadTimer = 2200;
|
||||
}else OverloadTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_vexallus(Creature *_Creature)
|
||||
{
|
||||
return new boss_vexallusAI (_Creature);
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI
|
||||
{
|
||||
mob_pure_energyAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
if (Unit *temp = m_creature->GetOwner())
|
||||
{
|
||||
if (temp && temp->isAlive())
|
||||
slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) { }
|
||||
void MoveInLineOfSight(Unit *who) { }
|
||||
void AttackStart(Unit *who) { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_pure_energy(Creature *_Creature)
|
||||
{
|
||||
return new mob_pure_energyAI (_Creature);
|
||||
};
|
||||
|
||||
void AddSC_boss_vexallus()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_vexallus";
|
||||
newscript->GetAI = &GetAI_boss_vexallus;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_pure_energy";
|
||||
newscript->GetAI = &GetAI_mob_pure_energy;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Vexallus
|
||||
SD%Complete: 90
|
||||
SDComment: Heroic and Normal support. Needs further testing.
|
||||
SDCategory: Magister's Terrace
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "def_magisters_terrace.h"
|
||||
|
||||
#define SAY_AGGRO -1585007
|
||||
#define SAY_ENERGY -1585008
|
||||
#define SAY_OVERLOAD -1585009
|
||||
#define SAY_KILL -1585010
|
||||
#define EMOTE_DISCHARGE_ENERGY -1585011
|
||||
|
||||
//is this text for real?
|
||||
//#define SAY_DEATH "What...happen...ed."
|
||||
|
||||
//Pure energy spell info
|
||||
#define SPELL_ENERGY_BOLT 46156
|
||||
#define SPELL_ENERGY_FEEDBACK 44335
|
||||
|
||||
//Vexallus spell info
|
||||
#define SPELL_CHAIN_LIGHTNING 44318
|
||||
#define SPELL_OVERLOAD 44353
|
||||
#define SPELL_ARCANE_SHOCK 44319
|
||||
|
||||
#define SPELL_SUMMON_PURE_ENERGY 44322 //mod scale -10
|
||||
#define H_SPELL_SUMMON_PURE_ENERGY1 46154 //mod scale -5
|
||||
#define H_SPELL_SUMMON_PURE_ENERGY2 46159 //mod scale -5
|
||||
|
||||
//Creatures
|
||||
#define CREATURE_PURE_ENERGY 24745
|
||||
|
||||
struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
||||
{
|
||||
boss_vexallusAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Heroic = c->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
bool Heroic;
|
||||
|
||||
uint32 ChainLightningTimer;
|
||||
uint32 ArcaneShockTimer;
|
||||
uint32 OverloadTimer;
|
||||
uint32 SpawnAddInterval;
|
||||
uint32 AlreadySpawnedAmount;
|
||||
bool Enraged;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ChainLightningTimer = 10000;
|
||||
ArcaneShockTimer = 8000;
|
||||
OverloadTimer = 2200;
|
||||
SpawnAddInterval = 15;
|
||||
AlreadySpawnedAmount = 0;
|
||||
Enraged = false;
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoScriptText(SAY_KILL, m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
|
||||
|
||||
if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR)))
|
||||
Door->SetGoState(0);
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, m_creature);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
if (Unit *temp = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->GetMotionMaster()->MoveFollow(temp,0,0);
|
||||
|
||||
//spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok
|
||||
summoned->SetOwnerGUID(m_creature->GetGUID());
|
||||
summoned->CastSpell(summoned,SPELL_ENERGY_BOLT,false,0,0,m_creature->GetGUID());
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10)
|
||||
{
|
||||
Enraged = true;
|
||||
}
|
||||
|
||||
if (!Enraged)
|
||||
{
|
||||
//used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25%
|
||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(SpawnAddInterval*(AlreadySpawnedAmount+1))))
|
||||
{
|
||||
DoScriptText(SAY_ENERGY, m_creature);
|
||||
DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature);
|
||||
|
||||
if (Heroic)
|
||||
{
|
||||
m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY1,false);
|
||||
m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY2,false);
|
||||
}
|
||||
else
|
||||
m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false);
|
||||
|
||||
//below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos
|
||||
DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
if (Heroic)
|
||||
DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
++AlreadySpawnedAmount;
|
||||
}
|
||||
|
||||
if (ChainLightningTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHAIN_LIGHTNING);
|
||||
|
||||
ChainLightningTimer = 10000;
|
||||
}else ChainLightningTimer -= diff;
|
||||
|
||||
if (ArcaneShockTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_ARCANE_SHOCK);
|
||||
|
||||
ArcaneShockTimer = 8000;
|
||||
}else ArcaneShockTimer -= diff;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (OverloadTimer < diff)
|
||||
{
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_OVERLOAD);
|
||||
|
||||
OverloadTimer = 2200;
|
||||
}else OverloadTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_vexallus(Creature *_Creature)
|
||||
{
|
||||
return new boss_vexallusAI (_Creature);
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI
|
||||
{
|
||||
mob_pure_energyAI(Creature *c) : ScriptedAI(c) {Reset();}
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void JustDied(Unit* slayer)
|
||||
{
|
||||
if (Unit *temp = m_creature->GetOwner())
|
||||
{
|
||||
if (temp && temp->isAlive())
|
||||
slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void Aggro(Unit *who) { }
|
||||
void MoveInLineOfSight(Unit *who) { }
|
||||
void AttackStart(Unit *who) { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_pure_energy(Creature *_Creature)
|
||||
{
|
||||
return new mob_pure_energyAI (_Creature);
|
||||
};
|
||||
|
||||
void AddSC_boss_vexallus()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_vexallus";
|
||||
newscript->GetAI = &GetAI_boss_vexallus;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_pure_energy";
|
||||
newscript->GetAI = &GetAI_mob_pure_energy;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user