*Merge with Trinity 783.
--HG-- branch : trunk
This commit is contained in:
@@ -375,6 +375,7 @@ scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp \
|
||||
scripts/zone/terokkar_forest/terokkar_forest.cpp \
|
||||
scripts/zone/thunder_bluff/thunder_bluff.cpp \
|
||||
scripts/zone/tirisfal_glades/tirisfal_glades.cpp \
|
||||
scripts/zone/thousand_needles/thousand_needles.cpp \
|
||||
scripts/zone/uldaman/boss_archaedas.cpp \
|
||||
scripts/zone/uldaman/instance_uldaman.cpp \
|
||||
scripts/zone/uldaman/boss_ironaya.cpp \
|
||||
|
||||
@@ -545,6 +545,8 @@ extern void AddSC_instance_temple_of_ahnqiraj();
|
||||
extern void AddSC_terokkar_forest();
|
||||
|
||||
//Thousand Needles
|
||||
extern void AddSC_thousand_needles();
|
||||
|
||||
//Thunder Bluff
|
||||
extern void AddSC_thunder_bluff();
|
||||
|
||||
@@ -1749,6 +1751,8 @@ void ScriptsInit()
|
||||
AddSC_terokkar_forest();
|
||||
|
||||
//Thousand Needles
|
||||
AddSC_thousand_needles();
|
||||
|
||||
//Thunder Bluff
|
||||
AddSC_thunder_bluff();
|
||||
|
||||
|
||||
@@ -1072,6 +1072,10 @@
|
||||
<Filter
|
||||
Name="Thousand Needles"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\thousand_needles\thousand_needles.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Silithus"
|
||||
|
||||
@@ -1334,6 +1334,10 @@
|
||||
<Filter
|
||||
Name="Thousand Needles"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\thousand_needles\thousand_needles.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Silithus"
|
||||
|
||||
@@ -1354,6 +1354,10 @@
|
||||
<Filter
|
||||
Name="Thousand Needles"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\thousand_needles\thousand_needles.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Silithus"
|
||||
|
||||
@@ -432,7 +432,7 @@ void ScriptedAI::SelectUnitList(std::list<Unit*> &targetList, uint32 num, Select
|
||||
std::list<HostilReference*> m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
std::list<HostilReference*>::iterator i;
|
||||
Unit *target;
|
||||
while(m_threatlist.size())
|
||||
while(m_threatlist.size() && num)
|
||||
{
|
||||
if(targetType == SELECT_TARGET_BOTTOMAGGRO)
|
||||
{
|
||||
@@ -455,6 +455,7 @@ void ScriptedAI::SelectUnitList(std::list<Unit*> &targetList, uint32 num, Select
|
||||
continue;
|
||||
}
|
||||
targetList.push_back(target);
|
||||
--num;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+152
-198
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
/* 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
|
||||
@@ -36,22 +36,20 @@ EndScriptData */
|
||||
#define SPELL_RAIN_OF_FIRE 33617
|
||||
#define H_SPELL_RAIN_OF_FIRE 39363
|
||||
|
||||
#define SPELL_DRAWN_SHADOWS 33563
|
||||
#define SPELL_DRAW_SHADOWS 33563
|
||||
#define SPELL_SHADOWBOLT_VOLLEY 33841
|
||||
#define SPELL_BANISH 38791
|
||||
|
||||
#define MOB_VOID_TRAVELER 19226
|
||||
#define SPELL_SACRIFICE 33587
|
||||
#define SPELL_SHADOW_NOVA 33846
|
||||
#define SPELL_HEALVORPIL 33783
|
||||
#define H_SPELL_HEALVORPIL 39364
|
||||
#define SPELL_EMPOWERING_SHADOWS 33783
|
||||
#define H_SPELL_EMPOWERING_SHADOWS 39364
|
||||
|
||||
#define MOB_VOID_PORTAL 19224
|
||||
#define SPELL_VOID_PORTAL_VISUAL 33569
|
||||
|
||||
float VorpilPosition[1][3] =
|
||||
{
|
||||
{-252.8820,-264.3030,17.1}
|
||||
};
|
||||
float VorpilPosition[3] = {-252.8820,-264.3030,17.1};
|
||||
|
||||
float VoidPortalCoords[5][3] =
|
||||
{
|
||||
@@ -62,76 +60,154 @@ float VoidPortalCoords[5][3] =
|
||||
{-261.4533, -297.3298, 17.1}
|
||||
};
|
||||
|
||||
class EmpoweringShadowsAura: public Aura
|
||||
{
|
||||
public:
|
||||
EmpoweringShadowsAura(SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) {}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL mob_voidtravelerAI : public ScriptedAI
|
||||
{
|
||||
mob_voidtravelerAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool HeroicMode;
|
||||
Unit *Vorpil;
|
||||
uint32 move;
|
||||
bool sacrificed;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Vorpil = NULL;
|
||||
move = 0;
|
||||
sacrificed = false;
|
||||
}
|
||||
|
||||
void Aggro(Unit *who){}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!Vorpil)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return;
|
||||
}
|
||||
if(move < diff)
|
||||
{
|
||||
if(sacrificed)
|
||||
{
|
||||
SpellEntry *spell = (SpellEntry *)GetSpellStore()->LookupEntry(HeroicMode?H_SPELL_EMPOWERING_SHADOWS:SPELL_EMPOWERING_SHADOWS);
|
||||
if( spell )
|
||||
Vorpil->AddAura(new EmpoweringShadowsAura(spell, 0, NULL, Vorpil, m_creature));
|
||||
Vorpil->SetHealth(Vorpil->GetHealth()+Vorpil->GetMaxHealth()/25);
|
||||
DoCast(m_creature, SPELL_SHADOW_NOVA, true);
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return;
|
||||
}
|
||||
m_creature->GetMotionMaster()->MoveFollow(Vorpil,0,0);
|
||||
if(m_creature->GetDistance(Vorpil) < 3)
|
||||
{
|
||||
DoCast(m_creature, SPELL_SACRIFICE, false);
|
||||
sacrificed = true;
|
||||
move = 500;
|
||||
return;
|
||||
}
|
||||
if(!Vorpil->isInCombat() || Vorpil->isDead())
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return;
|
||||
}
|
||||
move = 1000;
|
||||
}else move -= diff;
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_mob_voidtraveler(Creature *_Creature)
|
||||
{
|
||||
return new mob_voidtravelerAI (_Creature);
|
||||
}
|
||||
|
||||
struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
{
|
||||
boss_grandmaster_vorpilAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
Intro = false;
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
bool Intro;
|
||||
bool Intro, HelpYell;
|
||||
bool sumportals;
|
||||
bool HeroicMode;
|
||||
|
||||
uint32 ShadowBoltVolley_Timer;
|
||||
uint32 DrawnShadows_Timer;
|
||||
uint32 sumportals_Timer;
|
||||
uint32 DrawShadows_Timer;
|
||||
uint32 summonTraveler_Timer;
|
||||
uint64 PortalsGuid[5];
|
||||
uint32 banish_Timer;
|
||||
uint64 PortalsGuid[5];
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowBoltVolley_Timer = 15000;
|
||||
DrawShadows_Timer = 45000;
|
||||
summonTraveler_Timer = 90000;
|
||||
banish_Timer = 17000;
|
||||
HelpYell = false;
|
||||
destroyPortals();
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void summonPortals()
|
||||
{
|
||||
for (int i = 0;i<5;i++)
|
||||
if(!sumportals)
|
||||
{
|
||||
Creature *Portal = NULL;
|
||||
Portal = m_creature->SummonCreature(MOB_VOID_PORTAL,VoidPortalCoords[i][0],VoidPortalCoords[i][1],VoidPortalCoords[i][2],0,TEMPSUMMON_CORPSE_DESPAWN,3000000);
|
||||
PortalsGuid[i] = Portal->GetGUID();
|
||||
Portal->CastSpell(Portal,SPELL_VOID_PORTAL_VISUAL,false);
|
||||
for (int i = 0;i<5;i++)
|
||||
{
|
||||
Creature *Portal = NULL;
|
||||
Portal = m_creature->SummonCreature(MOB_VOID_PORTAL,VoidPortalCoords[i][0],VoidPortalCoords[i][1],VoidPortalCoords[i][2],0,TEMPSUMMON_CORPSE_DESPAWN,3000000);
|
||||
PortalsGuid[i] = Portal->GetGUID();
|
||||
Portal->CastSpell(Portal,SPELL_VOID_PORTAL_VISUAL,false);
|
||||
}
|
||||
sumportals = true;
|
||||
summonTraveler_Timer = 5000;
|
||||
}
|
||||
sumportals = true;
|
||||
summonTraveler_Timer = 5000;
|
||||
}
|
||||
|
||||
void destroyPortals()
|
||||
{
|
||||
for (int i = 0;i < 5; i ++)
|
||||
if(sumportals)
|
||||
{
|
||||
Unit *Portal = Unit::GetUnit((*m_creature), PortalsGuid[i]);
|
||||
if (Portal)
|
||||
if (Portal->isAlive())
|
||||
for (int i = 0;i < 5; i ++)
|
||||
{
|
||||
Unit *Portal = Unit::GetUnit((*m_creature), PortalsGuid[i]);
|
||||
if (Portal && Portal->isAlive())
|
||||
Portal->DealDamage(Portal, Portal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
PortalsGuid[i] = 0;
|
||||
}
|
||||
PortalsGuid[i] = 0;
|
||||
}
|
||||
sumportals = false;
|
||||
}
|
||||
}
|
||||
|
||||
void spawnVoidTraveler()
|
||||
{
|
||||
srand( (unsigned) time(NULL) ) ;
|
||||
int pos = rand()%5;
|
||||
Creature *traveler;
|
||||
traveler = m_creature->SummonCreature(MOB_VOID_TRAVELER,VoidPortalCoords[pos][0],VoidPortalCoords[pos][1],VoidPortalCoords[pos][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000);
|
||||
m_creature->SummonCreature(MOB_VOID_TRAVELER,VoidPortalCoords[pos][0],VoidPortalCoords[pos][1],VoidPortalCoords[pos][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,5000);
|
||||
if(!HelpYell)
|
||||
{
|
||||
DoScriptText(SAY_HELP, m_creature);
|
||||
HelpYell = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void JustSummoned(Creature *summoned)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
if( HeroicMode )
|
||||
debug_log("SD2: creature %u is in heroic mode",m_creature->GetEntry());
|
||||
|
||||
ShadowBoltVolley_Timer = 15000;
|
||||
DrawnShadows_Timer = 45000;
|
||||
sumportals_Timer = 10000;
|
||||
summonTraveler_Timer = 90000;
|
||||
|
||||
InCombat = false;
|
||||
sumportals = false;
|
||||
destroyPortals();
|
||||
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, NOT_STARTED);
|
||||
if (summoned && summoned->GetEntry() == MOB_VOID_TRAVELER)
|
||||
((mob_voidtravelerAI*)summoned->AI())->Vorpil = m_creature;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -151,7 +227,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, DONE);
|
||||
}
|
||||
|
||||
void StartEvent()
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
@@ -159,55 +235,27 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||
}
|
||||
|
||||
summonPortals();
|
||||
if(pInstance)
|
||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who)
|
||||
{
|
||||
if(!InCombat)
|
||||
{
|
||||
InCombat = true;
|
||||
StartEvent();
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!who || m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
|
||||
{
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who))
|
||||
{
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
else if (!Intro && m_creature->IsWithinLOSInMap(who)&& m_creature->IsWithinDistInMap(who, 100) ) //not sure about right radius
|
||||
if(who && !m_creature->getVictim() && m_creature->canStartAttack(who))
|
||||
AttackStart(who);
|
||||
if (!Intro && who && m_creature->IsWithinLOSInMap(who)&& m_creature->IsWithinDistInMap(who, 100) && m_creature->IsHostileTo(who))
|
||||
{
|
||||
DoScriptText(SAY_INTRO, m_creature);
|
||||
Intro = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
return;
|
||||
|
||||
if (!sumportals)
|
||||
if (sumportals_Timer < diff)
|
||||
{
|
||||
DoScriptText(SAY_HELP, m_creature);
|
||||
summonPortals();
|
||||
sumportals_Timer = 1000000;
|
||||
|
||||
}else sumportals_Timer -= diff;
|
||||
|
||||
if (ShadowBoltVolley_Timer < diff)
|
||||
{
|
||||
@@ -215,23 +263,41 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
ShadowBoltVolley_Timer = 15000;
|
||||
}else ShadowBoltVolley_Timer -= diff;
|
||||
|
||||
if ( DrawnShadows_Timer < diff)
|
||||
if (HeroicMode && banish_Timer < diff)
|
||||
{
|
||||
DoTeleportAll(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0);
|
||||
m_creature->Relocate(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0);
|
||||
DoCast(m_creature,SPELL_DRAWN_SHADOWS,true);
|
||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0,30,false);
|
||||
if (target)
|
||||
{
|
||||
DoCast(target,SPELL_BANISH);
|
||||
banish_Timer = 16000;
|
||||
}
|
||||
}else banish_Timer -= diff;
|
||||
|
||||
if(!HeroicMode) DoCast(m_creature,SPELL_RAIN_OF_FIRE);
|
||||
else DoCast(m_creature,H_SPELL_RAIN_OF_FIRE);
|
||||
if ( DrawShadows_Timer < diff)
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->getSource())
|
||||
if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH,0))
|
||||
i_pl->TeleportTo(m_creature->GetMapId(), VorpilPosition[0],VorpilPosition[1],VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
|
||||
m_creature->Relocate(VorpilPosition[0],VorpilPosition[1],VorpilPosition[2]);
|
||||
DoCast(m_creature,SPELL_DRAW_SHADOWS,true);
|
||||
|
||||
DoCast(m_creature,HeroicMode?H_SPELL_RAIN_OF_FIRE:SPELL_RAIN_OF_FIRE);
|
||||
|
||||
ShadowBoltVolley_Timer = 6000;
|
||||
DrawnShadows_Timer = 45000;
|
||||
}else DrawnShadows_Timer -= diff;
|
||||
DrawShadows_Timer = 30000;
|
||||
}else DrawShadows_Timer -= diff;
|
||||
|
||||
if ( summonTraveler_Timer < diff)
|
||||
{
|
||||
spawnVoidTraveler();
|
||||
summonTraveler_Timer = 10000;
|
||||
//enrage at 20%
|
||||
if((m_creature->GetHealth()*5) < m_creature->GetMaxHealth())
|
||||
summonTraveler_Timer = 5000;
|
||||
}else summonTraveler_Timer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -242,118 +308,6 @@ CreatureAI* GetAI_boss_grandmaster_vorpil(Creature *_Creature)
|
||||
return new boss_grandmaster_vorpilAI (_Creature);
|
||||
}
|
||||
|
||||
struct TRINITY_DLL_DECL mob_voidtravelerAI : public ScriptedAI
|
||||
{
|
||||
mob_voidtravelerAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
uint32 VorpilCheck_Timer;
|
||||
uint32 eventCheck_Timer;
|
||||
bool sacrifice;
|
||||
bool sacrificed;
|
||||
bool oneTarget;
|
||||
bool HeroicMode;
|
||||
|
||||
uint32 target_timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
if( HeroicMode )
|
||||
debug_log("SD2: creature %u is in heroic mode",m_creature->GetEntry());
|
||||
|
||||
VorpilCheck_Timer = 5000;
|
||||
eventCheck_Timer = 1000;
|
||||
target_timer = 2000;
|
||||
oneTarget = false;
|
||||
sacrificed = false;
|
||||
sacrifice = false;
|
||||
}
|
||||
void EnterEvadeMode(){}
|
||||
void Aggro(Unit *who) {}
|
||||
void AttackStart(Unit *who){}
|
||||
void MoveInLineOfSight(Unit *who){}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (eventCheck_Timer < diff)
|
||||
{
|
||||
if(pInstance)
|
||||
{
|
||||
Unit *Vorpil = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_GRANDMASTERVORPIL));
|
||||
if (Vorpil)
|
||||
{
|
||||
if (Vorpil->isDead())
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
|
||||
if (Vorpil->getVictim())
|
||||
{
|
||||
if((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE)
|
||||
(*m_creature).GetMotionMaster()->MoveFollow(Vorpil,1,0);
|
||||
}
|
||||
}
|
||||
if(pInstance->GetData(DATA_GRANDMASTERVORPILEVENT) != IN_PROGRESS)
|
||||
{
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
}
|
||||
eventCheck_Timer = 5000;
|
||||
}else eventCheck_Timer -=diff;
|
||||
|
||||
if (VorpilCheck_Timer < diff)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
if (!sacrificed)
|
||||
{
|
||||
if (!sacrifice)
|
||||
{
|
||||
Unit *Vorpil = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_GRANDMASTERVORPIL));
|
||||
if (Vorpil)
|
||||
if (Vorpil->isAlive())
|
||||
{
|
||||
if (m_creature->IsWithinDistInMap(Vorpil, 2))
|
||||
{
|
||||
sacrifice = true;
|
||||
DoCast(m_creature,SPELL_SACRIFICE);
|
||||
VorpilCheck_Timer = 2000;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sacrifice)
|
||||
VorpilCheck_Timer = 3000;
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit *Vorpil = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_GRANDMASTERVORPIL));
|
||||
if (Vorpil)
|
||||
if (Vorpil->isAlive())
|
||||
{
|
||||
if(!HeroicMode) Vorpil->CastSpell(Vorpil,SPELL_HEALVORPIL,true);
|
||||
else Vorpil->CastSpell(Vorpil,H_SPELL_HEALVORPIL,true);
|
||||
};
|
||||
DoCast(m_creature,SPELL_SHADOW_NOVA);
|
||||
sacrificed = true;
|
||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
VorpilCheck_Timer = 100000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else VorpilCheck_Timer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_voidtraveler(Creature *_Creature)
|
||||
{
|
||||
return new mob_voidtravelerAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_boss_grandmaster_vorpil()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
/* Copyright (C) 2006 - 2008 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: Thousand Needles
|
||||
SD%Complete: 100
|
||||
SDComment: Support for Quest: 4770
|
||||
SDCategory: Thousand Needles
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_swiftmountain
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "../../npc/npc_escortAI.h"
|
||||
|
||||
#define SAY_READY -1000147
|
||||
#define SAY_AGGRO -1000148
|
||||
#define SAY_FINISH -1000149
|
||||
|
||||
#define QUEST_HOMEWARD_BOUND 4770
|
||||
#define ENTRY_WYVERN 4107
|
||||
|
||||
|
||||
|
||||
struct TRINITY_DLL_DECL npc_swiftmountainAI : public npc_escortAI
|
||||
{
|
||||
npc_swiftmountainAI(Creature *c) : npc_escortAI(c) {Reset();}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 46:
|
||||
DoScriptText(SAY_AGGRO, m_creature, player);
|
||||
break;
|
||||
case 47:
|
||||
m_creature->SummonCreature(ENTRY_WYVERN, -5016.45, -935.01, -5.46, 5.36,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
m_creature->SummonCreature(ENTRY_WYVERN, -5001.98, -934.96, -5.55, 3.18,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
m_creature->SummonCreature(ENTRY_WYVERN, -4999.06, -949.61, -5.42, 2.04,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
break;
|
||||
case 70:
|
||||
DoScriptText(SAY_FINISH, m_creature, player);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)player)->GroupEventHappens(QUEST_HOMEWARD_BOUND,m_creature);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Aggro(Unit* who)
|
||||
{}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (PlayerGUID)
|
||||
{
|
||||
if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID))
|
||||
((Player*)player)->FailQuest(QUEST_HOMEWARD_BOUND);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_swiftmountain(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_HOMEWARD_BOUND)
|
||||
{
|
||||
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
DoScriptText(SAY_READY, creature, player);
|
||||
// Change faction so mobs attack
|
||||
creature->setFaction(775);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_npc_swiftmountain(Creature *_Creature)
|
||||
{
|
||||
npc_swiftmountainAI* thisAI = new npc_swiftmountainAI(_Creature);
|
||||
|
||||
thisAI->AddWaypoint(0, -5156.69, -1220.49, 48.78, 5000);
|
||||
thisAI->AddWaypoint(1, -5157.12, -1220.13, 48.67);
|
||||
thisAI->AddWaypoint(2, -5171.7, -1205.36, 47.43);
|
||||
thisAI->AddWaypoint(3, -5174.08, -1197.7, 46.90);
|
||||
thisAI->AddWaypoint(4, -5178.24, -1183.78, 45.97);
|
||||
thisAI->AddWaypoint(5, -5181.52, -1171.03, 45.29);
|
||||
thisAI->AddWaypoint(6, -5184.29, -1159.21, 44.62);
|
||||
thisAI->AddWaypoint(7, -5184.84, -1152.95, 44.84);
|
||||
thisAI->AddWaypoint(8, -5182.04, -1142.83, 44.07);
|
||||
thisAI->AddWaypoint(9, -5178.44, -1133.57, 43.91);
|
||||
thisAI->AddWaypoint(10, -5176.68, -1129.48, 43.81);
|
||||
thisAI->AddWaypoint(11, -5164.85, -1123.33, 43.99);
|
||||
thisAI->AddWaypoint(12, -5153.07, -1117.7, 43.66);
|
||||
thisAI->AddWaypoint(13, -5143.52, -1113.14, 43.78);
|
||||
thisAI->AddWaypoint(14, -5135.86, -1104.42, 47.23);
|
||||
thisAI->AddWaypoint(15, -5129.86, -1097.22, 49.52);
|
||||
thisAI->AddWaypoint(16, -5127.48, -1087.29, 49.03);
|
||||
thisAI->AddWaypoint(17, -5127.57, -1080.4, 46.64);
|
||||
thisAI->AddWaypoint(18, -5129.65, -1077.58, 45.29);
|
||||
thisAI->AddWaypoint(19, -5135.86, -1069.12, 39.53);
|
||||
thisAI->AddWaypoint(20, -5141.97, -1060.58, 32.70);
|
||||
thisAI->AddWaypoint(21, -5145.99, -1054.85, 28.98);
|
||||
thisAI->AddWaypoint(22, -5147.08, -1050.35, 26.36);
|
||||
thisAI->AddWaypoint(23, -5147.5, -1043.37, 21.84);
|
||||
thisAI->AddWaypoint(24, -5147.68, -1036.37, 17.05);
|
||||
thisAI->AddWaypoint(25, -5147.68, -1029.37, 14.59);
|
||||
thisAI->AddWaypoint(26, -5144.62, -1023.9, 11.67);
|
||||
thisAI->AddWaypoint(27, -5138.67, -1020.23, 7.81);
|
||||
thisAI->AddWaypoint(28, -5135.6, -1018.55, 6.19);
|
||||
thisAI->AddWaypoint(29, -5126.25, -1014.76, 1.08);
|
||||
thisAI->AddWaypoint(30, -5120.03, -1013.12, -1.11);
|
||||
thisAI->AddWaypoint(31, -5112.3, -1027.65, -5.39);
|
||||
thisAI->AddWaypoint(32, -5106.99, -1023.09, -5.10);
|
||||
thisAI->AddWaypoint(33, -5099.07, -1016.19, -4.92);
|
||||
thisAI->AddWaypoint(34, -5091.23, -1009.21, -5.22);
|
||||
thisAI->AddWaypoint(35, -5083.62, -1001.97, -5.22);
|
||||
thisAI->AddWaypoint(36, -5076.1, -994.652, -4.92);
|
||||
thisAI->AddWaypoint(37, -5066.71, -985.507, -4.97);
|
||||
thisAI->AddWaypoint(38, -5065.13, -978.689, -5.02);
|
||||
thisAI->AddWaypoint(39, -5062.33, -968.57, -5.08);
|
||||
thisAI->AddWaypoint(40, -5059.46, -958.469, -5.16);
|
||||
thisAI->AddWaypoint(41, -5056.59, -948.375, -5.10);
|
||||
thisAI->AddWaypoint(42, -5053.73, -938.274, -5.69);
|
||||
thisAI->AddWaypoint(43, -5043.06, -934.822, -5.35);
|
||||
thisAI->AddWaypoint(44, -5029.35, -932.007, -5.27);
|
||||
thisAI->AddWaypoint(45, -5024.58, -933.781, -5.40);
|
||||
thisAI->AddWaypoint(46, -5019.13, -938.172, -5.54);
|
||||
thisAI->AddWaypoint(47, -5011, -944.812, -5.47);
|
||||
thisAI->AddWaypoint(48, -5002.86, -951.455, -5.44);
|
||||
thisAI->AddWaypoint(49, -4994.73, -958.099, -5.41);
|
||||
thisAI->AddWaypoint(50, -4990.57, -963.782, -5.33);
|
||||
thisAI->AddWaypoint(51, -4987.43, -970.041, -5.17);
|
||||
thisAI->AddWaypoint(52, -4981.41, -982.678, -5.10);
|
||||
thisAI->AddWaypoint(53, -4977.03, -992.221, -4.97);
|
||||
thisAI->AddWaypoint(54, -4972.6, -1001.74, -5.24);
|
||||
thisAI->AddWaypoint(55, -4968.15, -1011.25, -5.49);
|
||||
thisAI->AddWaypoint(56, -4963.75, -1020.78, -5.07);
|
||||
thisAI->AddWaypoint(57, -4959.3, -1030.3, -5.28);
|
||||
thisAI->AddWaypoint(58, -4956.28, -1036.61, -5.84);
|
||||
thisAI->AddWaypoint(59, -4952.05, -1043.75, -9.04);
|
||||
thisAI->AddWaypoint(60, -4943.8, -1055.06, -17.91);
|
||||
thisAI->AddWaypoint(61, -4939.47, -1055.61, -20.73);
|
||||
thisAI->AddWaypoint(62, -4929.16, -1053.64, -25.65);
|
||||
thisAI->AddWaypoint(63, -4922.28, -1052.37, -28.72);
|
||||
thisAI->AddWaypoint(64, -4913.26, -1051.3, -31.80);
|
||||
thisAI->AddWaypoint(65, -4903.54, -1054.17, -33.48);
|
||||
thisAI->AddWaypoint(66, -4905.95, -1056.71, -33.68);
|
||||
thisAI->AddWaypoint(67, -4913.18, -1064.32, -39.46);
|
||||
thisAI->AddWaypoint(68, -4925.27, -1076.98, -47.39);
|
||||
thisAI->AddWaypoint(69, -4932.68, -1084.42, -51.00);
|
||||
thisAI->AddWaypoint(70, -4938.3, -1100.41, -50.71, 5000);
|
||||
thisAI->AddWaypoint(71, -4937.34, -1102.87, -49.82);
|
||||
|
||||
return (CreatureAI*)thisAI;
|
||||
}
|
||||
|
||||
void AddSC_thousand_needles()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_swiftmountain";
|
||||
newscript->GetAI = &GetAI_npc_swiftmountain;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_swiftmountain;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
Reference in New Issue
Block a user