mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
convert Arcatraz to new format
--HG-- branch : trunk extra : rebase_source : 9c77e524badeccac0c2adbe68110f741b5a3549b
This commit is contained in:
@@ -36,443 +36,489 @@ EndContentData */
|
||||
# npc_millhouse_manastorm
|
||||
#####*/
|
||||
|
||||
#define SAY_INTRO_1 -1552010
|
||||
#define SAY_INTRO_2 -1552011
|
||||
#define SAY_WATER -1552012
|
||||
#define SAY_BUFFS -1552013
|
||||
#define SAY_DRINK -1552014
|
||||
#define SAY_READY -1552015
|
||||
#define SAY_KILL_1 -1552016
|
||||
#define SAY_KILL_2 -1552017
|
||||
#define SAY_PYRO -1552018
|
||||
#define SAY_ICEBLOCK -1552019
|
||||
#define SAY_LOWHP -1552020
|
||||
#define SAY_DEATH -1552021
|
||||
#define SAY_COMPLETE -1552022
|
||||
|
||||
#define SPELL_CONJURE_WATER 36879
|
||||
#define SPELL_ARCANE_INTELLECT 36880
|
||||
#define SPELL_ICE_ARMOR 36881
|
||||
|
||||
#define SPELL_ARCANE_MISSILES 33833
|
||||
#define SPELL_CONE_OF_COLD 12611
|
||||
#define SPELL_FIRE_BLAST 13341
|
||||
#define SPELL_FIREBALL 14034
|
||||
#define SPELL_FROSTBOLT 15497
|
||||
#define SPELL_PYROBLAST 33975
|
||||
|
||||
struct npc_millhouse_manastormAI : public ScriptedAI
|
||||
enum eMillhouseSays
|
||||
{
|
||||
npc_millhouse_manastormAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
bool Init;
|
||||
bool LowHp;
|
||||
|
||||
uint32 Pyroblast_Timer;
|
||||
uint32 Fireball_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
EventProgress_Timer = 2000;
|
||||
LowHp = false;
|
||||
Init = false;
|
||||
Phase = 1;
|
||||
|
||||
Pyroblast_Timer = 1000;
|
||||
Fireball_Timer = 2500;
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(TYPE_WARDEN_2) == DONE)
|
||||
Init = true;
|
||||
|
||||
if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE)
|
||||
{
|
||||
DoScriptText(SAY_COMPLETE, me);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
{
|
||||
if (me->Attack(pWho, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
|
||||
me->GetMotionMaster()->MoveChase(pWho, 25.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
/*for questId 10886 (heroic mode only)
|
||||
if (pInstance && pInstance->GetData(TYPE_HARBINGERSKYRISS) != DONE)
|
||||
->FailQuest();*/
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!Init)
|
||||
{
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (Phase < 8)
|
||||
{
|
||||
switch(Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_INTRO_1, me);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_INTRO_2, me);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SAY_WATER, me);
|
||||
DoCast(me, SPELL_CONJURE_WATER);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(SAY_BUFFS, me);
|
||||
DoCast(me, SPELL_ICE_ARMOR);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(SAY_DRINK, me);
|
||||
DoCast(me, SPELL_ARCANE_INTELLECT);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(SAY_READY, me);
|
||||
EventProgress_Timer = 6000;
|
||||
break;
|
||||
case 7:
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_WARDEN_2,DONE);
|
||||
Init = true;
|
||||
break;
|
||||
}
|
||||
++Phase;
|
||||
}
|
||||
} else EventProgress_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!LowHp && ((me->GetHealth()*100 / me->GetMaxHealth()) < 20))
|
||||
{
|
||||
DoScriptText(SAY_LOWHP, me);
|
||||
LowHp = true;
|
||||
}
|
||||
|
||||
if (Pyroblast_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_PYRO, me);
|
||||
|
||||
DoCast(me->getVictim(), SPELL_PYROBLAST);
|
||||
Pyroblast_Timer = 40000;
|
||||
} else Pyroblast_Timer -=diff;
|
||||
|
||||
if (Fireball_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIREBALL);
|
||||
Fireball_Timer = 4000;
|
||||
} else Fireball_Timer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
SAY_INTRO_1 = -1552010,
|
||||
SAY_INTRO_2 = -1552011,
|
||||
SAY_WATER = -1552012,
|
||||
SAY_BUFFS = -1552013,
|
||||
SAY_DRINK = -1552014,
|
||||
SAY_READY = -1552015,
|
||||
SAY_KILL_1 = -1552016,
|
||||
SAY_KILL_2 = -1552017,
|
||||
SAY_PYRO = -1552018,
|
||||
SAY_ICEBLOCK = -1552019,
|
||||
SAY_LOWHP = -1552020,
|
||||
SAY_DEATH = -1552021,
|
||||
SAY_COMPLETE = -1552022,
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_millhouse_manastorm(Creature* pCreature)
|
||||
enum eMillhouseSpells
|
||||
{
|
||||
return new npc_millhouse_manastormAI (pCreature);
|
||||
}
|
||||
SPELL_CONJURE_WATER = 36879,
|
||||
SPELL_ARCANE_INTELLECT = 36880,
|
||||
SPELL_ICE_ARMOR = 36881,
|
||||
SPELL_ARCANE_MISSILES = 33833,
|
||||
SPELL_CONE_OF_COLD = 12611,
|
||||
SPELL_FIRE_BLAST = 13341,
|
||||
SPELL_FIREBALL = 14034,
|
||||
SPELL_FROSTBOLT = 15497,
|
||||
SPELL_PYROBLAST = 33975,
|
||||
};
|
||||
|
||||
class npc_millhouse_manastorm : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_millhouse_manastorm()
|
||||
: CreatureScript("npc_millhouse_manastorm")
|
||||
{
|
||||
}
|
||||
struct npc_millhouse_manastormAI : public ScriptedAI
|
||||
{
|
||||
npc_millhouse_manastormAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
pInstance = pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
bool Init;
|
||||
bool LowHp;
|
||||
|
||||
uint32 Pyroblast_Timer;
|
||||
uint32 Fireball_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
EventProgress_Timer = 2000;
|
||||
LowHp = false;
|
||||
Init = false;
|
||||
Phase = 1;
|
||||
|
||||
Pyroblast_Timer = 1000;
|
||||
Fireball_Timer = 2500;
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(TYPE_WARDEN_2) == DONE)
|
||||
Init = true;
|
||||
|
||||
if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE)
|
||||
DoScriptText(SAY_COMPLETE, me);
|
||||
}
|
||||
}
|
||||
|
||||
void AttackStart(Unit* pWho)
|
||||
{
|
||||
if (me->Attack(pWho, true))
|
||||
{
|
||||
me->AddThreat(pWho, 0.0f);
|
||||
me->SetInCombatWith(pWho);
|
||||
pWho->SetInCombatWith(me);
|
||||
me->GetMotionMaster()->MoveChase(pWho, 25.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/){}
|
||||
|
||||
void KilledUnit(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
/*for questId 10886 (heroic mode only)
|
||||
if (pInstance && pInstance->GetData(TYPE_HARBINGERSKYRISS) != DONE)
|
||||
->FailQuest();*/
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!Init)
|
||||
{
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (Phase < 8)
|
||||
{
|
||||
switch(Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_INTRO_1, me);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_INTRO_2, me);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SAY_WATER, me);
|
||||
DoCast(me, SPELL_CONJURE_WATER);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(SAY_BUFFS, me);
|
||||
DoCast(me, SPELL_ICE_ARMOR);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(SAY_DRINK, me);
|
||||
DoCast(me, SPELL_ARCANE_INTELLECT);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(SAY_READY, me);
|
||||
EventProgress_Timer = 6000;
|
||||
break;
|
||||
case 7:
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_WARDEN_2,DONE);
|
||||
Init = true;
|
||||
break;
|
||||
}
|
||||
++Phase;
|
||||
}
|
||||
}
|
||||
else
|
||||
EventProgress_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!LowHp && ((me->GetHealth()*100 / me->GetMaxHealth()) < 20))
|
||||
{
|
||||
DoScriptText(SAY_LOWHP, me);
|
||||
LowHp = true;
|
||||
}
|
||||
|
||||
if (Pyroblast_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_PYRO, me);
|
||||
|
||||
DoCast(me->getVictim(), SPELL_PYROBLAST);
|
||||
Pyroblast_Timer = 40000;
|
||||
}
|
||||
else
|
||||
Pyroblast_Timer -=diff;
|
||||
|
||||
if (Fireball_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_FIREBALL);
|
||||
Fireball_Timer = 4000;
|
||||
}
|
||||
else
|
||||
Fireball_Timer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* OnGetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_millhouse_manastormAI(creature);
|
||||
}
|
||||
};
|
||||
/*#####
|
||||
# npc_warden_mellichar
|
||||
#####*/
|
||||
|
||||
#define YELL_INTRO1 -1552023
|
||||
#define YELL_INTRO2 -1552024
|
||||
#define YELL_RELEASE1 -1552025
|
||||
#define YELL_RELEASE2A -1552026
|
||||
#define YELL_RELEASE2B -1552027
|
||||
#define YELL_RELEASE3 -1552028
|
||||
#define YELL_RELEASE4 -1552029
|
||||
#define YELL_WELCOME -1552030
|
||||
|
||||
//phase 2(acid mobs)
|
||||
#define ENTRY_TRICKSTER 20905
|
||||
#define ENTRY_PH_HUNTER 20906
|
||||
//phase 3
|
||||
#define ENTRY_MILLHOUSE 20977
|
||||
//phase 4(acid mobs)
|
||||
#define ENTRY_AKKIRIS 20908
|
||||
#define ENTRY_SULFURON 20909
|
||||
//phase 5(acid mobs)
|
||||
#define ENTRY_TW_DRAK 20910
|
||||
#define ENTRY_BL_DRAK 20911
|
||||
//phase 6
|
||||
#define ENTRY_SKYRISS 20912
|
||||
|
||||
//TARGET_SCRIPT
|
||||
#define SPELL_TARGET_ALPHA 36856
|
||||
#define SPELL_TARGET_BETA 36854
|
||||
#define SPELL_TARGET_DELTA 36857
|
||||
#define SPELL_TARGET_GAMMA 36858
|
||||
#define SPELL_TARGET_OMEGA 36852
|
||||
#define SPELL_BUBBLE_VISUAL 36849
|
||||
|
||||
struct npc_warden_mellicharAI : public ScriptedAI
|
||||
enum eWardenSays
|
||||
{
|
||||
npc_warden_mellicharAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
bool IsRunning;
|
||||
bool CanSpawn;
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
IsRunning = false;
|
||||
CanSpawn = false;
|
||||
|
||||
EventProgress_Timer = 22000;
|
||||
Phase = 1;
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (IsRunning)
|
||||
return;
|
||||
|
||||
if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
|
||||
{
|
||||
if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
return;
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
float attackRadius = me->GetAttackDistance(who)/10;
|
||||
if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
|
||||
EnterCombat(who);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(YELL_INTRO1, me);
|
||||
DoCast(me, SPELL_BUBBLE_VISUAL);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,IN_PROGRESS);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), false);
|
||||
IsRunning = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool CanProgress()
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
if (Phase == 7 && pInstance->GetData(TYPE_WARDEN_4) == DONE)
|
||||
return true;
|
||||
if (Phase == 6 && pInstance->GetData(TYPE_WARDEN_3) == DONE)
|
||||
return true;
|
||||
if (Phase == 5 && pInstance->GetData(TYPE_WARDEN_2) == DONE)
|
||||
return true;
|
||||
if (Phase == 4)
|
||||
return true;
|
||||
if (Phase == 3 && pInstance->GetData(TYPE_WARDEN_1) == DONE)
|
||||
return true;
|
||||
if (Phase == 2 && pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
if (Phase == 1 && pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void DoPrepareForPhase()
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAurasByType(SPELL_AURA_DUMMY);
|
||||
|
||||
switch(Phase)
|
||||
{
|
||||
case 2:
|
||||
DoCast(me, SPELL_TARGET_ALPHA);
|
||||
pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), false);
|
||||
break;
|
||||
case 3:
|
||||
DoCast(me, SPELL_TARGET_BETA);
|
||||
pInstance->SetData(TYPE_WARDEN_2,IN_PROGRESS);
|
||||
break;
|
||||
case 5:
|
||||
DoCast(me, SPELL_TARGET_DELTA);
|
||||
pInstance->SetData(TYPE_WARDEN_3,IN_PROGRESS);
|
||||
break;
|
||||
case 6:
|
||||
DoCast(me, SPELL_TARGET_GAMMA);
|
||||
pInstance->SetData(TYPE_WARDEN_4,IN_PROGRESS);
|
||||
break;
|
||||
case 7:
|
||||
pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS);
|
||||
break;
|
||||
}
|
||||
CanSpawn = true;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!IsRunning)
|
||||
return;
|
||||
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == FAIL)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (CanSpawn)
|
||||
{
|
||||
//continue beam omega pod, unless we are about to summon skyriss
|
||||
if (Phase != 7)
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
|
||||
switch(Phase)
|
||||
{
|
||||
case 2:
|
||||
switch (urand(0,1))
|
||||
{
|
||||
case 0: me->SummonCreature(ENTRY_TRICKSTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
|
||||
case 1: me->SummonCreature(ENTRY_PH_HUNTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
me->SummonCreature(ENTRY_MILLHOUSE,413.292,-148.378,42.56,6.27,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(YELL_RELEASE2B, me);
|
||||
break;
|
||||
case 5:
|
||||
switch (urand(0,1))
|
||||
{
|
||||
case 0: me->SummonCreature(ENTRY_AKKIRIS,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
|
||||
case 1: me->SummonCreature(ENTRY_SULFURON,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
switch (urand(0,1))
|
||||
{
|
||||
case 0: me->SummonCreature(ENTRY_TW_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
|
||||
case 1: me->SummonCreature(ENTRY_BL_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
me->SummonCreature(ENTRY_SKYRISS,445.763,-191.639,44.64,1.60,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
DoScriptText(YELL_WELCOME, me);
|
||||
break;
|
||||
}
|
||||
CanSpawn = false;
|
||||
++Phase;
|
||||
}
|
||||
if (CanProgress())
|
||||
{
|
||||
switch(Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(YELL_INTRO2, me);
|
||||
EventProgress_Timer = 10000;
|
||||
++Phase;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(YELL_RELEASE1, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(YELL_RELEASE2A, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 10000;
|
||||
break;
|
||||
case 4:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(YELL_RELEASE3, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(YELL_RELEASE4, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 7:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else EventProgress_Timer -= diff;
|
||||
}
|
||||
YELL_INTRO1 = -1552023,
|
||||
YELL_INTRO2 = -1552024,
|
||||
YELL_RELEASE1 = -1552025,
|
||||
YELL_RELEASE2A = -1552026,
|
||||
YELL_RELEASE2B = -1552027,
|
||||
YELL_RELEASE3 = -1552028,
|
||||
YELL_RELEASE4 = -1552029,
|
||||
YELL_WELCOME = -1552030,
|
||||
};
|
||||
CreatureAI* GetAI_npc_warden_mellichar(Creature* pCreature)
|
||||
|
||||
enum eWardenUnits
|
||||
{
|
||||
return new npc_warden_mellicharAI (pCreature);
|
||||
}
|
||||
//phase 2(acid mobs)
|
||||
ENTRY_TRICKSTER = 20905,
|
||||
ENTRY_PH_HUNTER = 20906,
|
||||
//phase 3
|
||||
ENTRY_MILLHOUSE = 20977,
|
||||
//phase 4(acid mobs)
|
||||
ENTRY_AKKIRIS = 20908,
|
||||
ENTRY_SULFURON = 20909,
|
||||
//phase 5(acid mobs)
|
||||
ENTRY_TW_DRAK = 20910,
|
||||
ENTRY_BL_DRAK = 20911,
|
||||
//phase 6
|
||||
ENTRY_SKYRISS = 20912,
|
||||
};
|
||||
|
||||
enum eWardenSpells
|
||||
{
|
||||
//TARGET_SCRIPT
|
||||
SPELL_TARGET_ALPHA = 36856,
|
||||
SPELL_TARGET_BETA = 36854,
|
||||
SPELL_TARGET_DELTA = 36857,
|
||||
SPELL_TARGET_GAMMA = 36858,
|
||||
SPELL_TARGET_OMEGA = 36852,
|
||||
SPELL_BUBBLE_VISUAL = 36849,
|
||||
};
|
||||
|
||||
class npc_warden_mellichar : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_warden_mellichar()
|
||||
: CreatureScript("npc_warden_mellichar")
|
||||
{
|
||||
}
|
||||
struct npc_warden_mellicharAI : public ScriptedAI
|
||||
{
|
||||
npc_warden_mellicharAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
pInstance = pCreature->GetInstanceData();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
bool IsRunning;
|
||||
bool CanSpawn;
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
IsRunning = false;
|
||||
CanSpawn = false;
|
||||
|
||||
EventProgress_Timer = 22000;
|
||||
Phase = 1;
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*who*/) {}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (IsRunning)
|
||||
return;
|
||||
|
||||
if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
|
||||
{
|
||||
if (!me->canFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
return;
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
float attackRadius = me->GetAttackDistance(who)/10;
|
||||
if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
|
||||
EnterCombat(who);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
DoScriptText(YELL_INTRO1, me);
|
||||
DoCast(me, SPELL_BUBBLE_VISUAL);
|
||||
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,IN_PROGRESS);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), false);
|
||||
IsRunning = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool CanProgress()
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
if (Phase == 7 && pInstance->GetData(TYPE_WARDEN_4) == DONE)
|
||||
return true;
|
||||
if (Phase == 6 && pInstance->GetData(TYPE_WARDEN_3) == DONE)
|
||||
return true;
|
||||
if (Phase == 5 && pInstance->GetData(TYPE_WARDEN_2) == DONE)
|
||||
return true;
|
||||
if (Phase == 4)
|
||||
return true;
|
||||
if (Phase == 3 && pInstance->GetData(TYPE_WARDEN_1) == DONE)
|
||||
return true;
|
||||
if (Phase == 2 && pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
if (Phase == 1 && pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void DoPrepareForPhase()
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAurasByType(SPELL_AURA_DUMMY);
|
||||
|
||||
switch(Phase)
|
||||
{
|
||||
case 2:
|
||||
DoCast(me, SPELL_TARGET_ALPHA);
|
||||
pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), false);
|
||||
break;
|
||||
case 3:
|
||||
DoCast(me, SPELL_TARGET_BETA);
|
||||
pInstance->SetData(TYPE_WARDEN_2,IN_PROGRESS);
|
||||
break;
|
||||
case 5:
|
||||
DoCast(me, SPELL_TARGET_DELTA);
|
||||
pInstance->SetData(TYPE_WARDEN_3,IN_PROGRESS);
|
||||
break;
|
||||
case 6:
|
||||
DoCast(me, SPELL_TARGET_GAMMA);
|
||||
pInstance->SetData(TYPE_WARDEN_4,IN_PROGRESS);
|
||||
break;
|
||||
case 7:
|
||||
pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS);
|
||||
break;
|
||||
}
|
||||
CanSpawn = true;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!IsRunning)
|
||||
return;
|
||||
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (pInstance)
|
||||
{
|
||||
if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == FAIL)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (CanSpawn)
|
||||
{
|
||||
//continue beam omega pod, unless we are about to summon skyriss
|
||||
if (Phase != 7)
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
|
||||
switch(Phase)
|
||||
{
|
||||
case 2:
|
||||
switch (urand(0,1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_TRICKSTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_PH_HUNTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
me->SummonCreature(ENTRY_MILLHOUSE,413.292,-148.378,42.56,6.27,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
case 4:
|
||||
DoScriptText(YELL_RELEASE2B, me);
|
||||
break;
|
||||
case 5:
|
||||
switch (urand(0,1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_AKKIRIS,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_SULFURON,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
switch (urand(0,1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_TW_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_BL_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
me->SummonCreature(ENTRY_SKYRISS,445.763,-191.639,44.64,1.60,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
|
||||
DoScriptText(YELL_WELCOME, me);
|
||||
break;
|
||||
}
|
||||
CanSpawn = false;
|
||||
++Phase;
|
||||
}
|
||||
if (CanProgress())
|
||||
{
|
||||
switch(Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(YELL_INTRO2, me);
|
||||
EventProgress_Timer = 10000;
|
||||
++Phase;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(YELL_RELEASE1, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(YELL_RELEASE2A, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 10000;
|
||||
break;
|
||||
case 4:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(YELL_RELEASE3, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(YELL_RELEASE4, me);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 7:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
EventProgress_Timer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* OnGetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_warden_mellicharAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# mob_zerekethvoidzone (this script probably not needed in future -> `creature_template_addon`.`auras`='36120 0')
|
||||
@@ -480,43 +526,39 @@ CreatureAI* GetAI_npc_warden_mellichar(Creature* pCreature)
|
||||
|
||||
#define SPELL_VOID_ZONE_DAMAGE 36120
|
||||
|
||||
struct mob_zerekethvoidzoneAI : public ScriptedAI
|
||||
class mob_zerekethvoidzone : public CreatureScript
|
||||
{
|
||||
mob_zerekethvoidzoneAI(Creature *c) : ScriptedAI(c) {}
|
||||
public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS,0);
|
||||
me->setFaction(16);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
mob_zerekethvoidzone()
|
||||
: CreatureScript("mob_zerekethvoidzone")
|
||||
{
|
||||
}
|
||||
struct mob_zerekethvoidzoneAI : public ScriptedAI
|
||||
{
|
||||
mob_zerekethvoidzoneAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
|
||||
DoCast(me, SPELL_VOID_ZONE_DAMAGE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
void Reset()
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS,0);
|
||||
me->setFaction(16);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
DoCast(me, SPELL_VOID_ZONE_DAMAGE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
};
|
||||
|
||||
CreatureAI* OnGetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_zerekethvoidzoneAI(creature);
|
||||
}
|
||||
};
|
||||
CreatureAI* GetAI_mob_zerekethvoidzoneAI(Creature* pCreature)
|
||||
{
|
||||
return new mob_zerekethvoidzoneAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_arcatraz()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_millhouse_manastorm";
|
||||
newscript->GetAI = &GetAI_npc_millhouse_manastorm;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_warden_mellichar";
|
||||
newscript->GetAI = &GetAI_npc_warden_mellichar;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_zerekethvoidzone";
|
||||
newscript->GetAI = &GetAI_mob_zerekethvoidzoneAI;
|
||||
newscript->RegisterSelf();
|
||||
new npc_millhouse_manastorm();
|
||||
new npc_warden_mellichar();
|
||||
new mob_zerekethvoidzone();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,265 +31,284 @@ EndContentData */
|
||||
#include "ScriptPCH.h"
|
||||
#include "arcatraz.h"
|
||||
|
||||
#define SAY_INTRO -1552000
|
||||
#define SAY_AGGRO -1552001
|
||||
#define SAY_KILL_1 -1552002
|
||||
#define SAY_KILL_2 -1552003
|
||||
#define SAY_MIND_1 -1552004
|
||||
#define SAY_MIND_2 -1552005
|
||||
#define SAY_FEAR_1 -1552006
|
||||
#define SAY_FEAR_2 -1552007
|
||||
#define SAY_IMAGE -1552008
|
||||
#define SAY_DEATH -1552009
|
||||
|
||||
#define SPELL_FEAR 39415
|
||||
|
||||
#define SPELL_MIND_REND 36924
|
||||
#define H_SPELL_MIND_REND 39017
|
||||
|
||||
#define SPELL_DOMINATION 37162
|
||||
#define H_SPELL_DOMINATION 39019
|
||||
|
||||
#define H_SPELL_MANA_BURN 39020
|
||||
|
||||
#define SPELL_66_ILLUSION 36931 //entry 21466
|
||||
#define SPELL_33_ILLUSION 36932 //entry 21467
|
||||
|
||||
struct boss_harbinger_skyrissAI : public ScriptedAI
|
||||
enum eSays
|
||||
{
|
||||
boss_harbinger_skyrissAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
Intro = false;
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
bool Intro;
|
||||
bool IsImage33;
|
||||
bool IsImage66;
|
||||
|
||||
uint32 Intro_Phase;
|
||||
uint32 Intro_Timer;
|
||||
uint32 MindRend_Timer;
|
||||
uint32 Fear_Timer;
|
||||
uint32 Domination_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (!Intro)
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
|
||||
IsImage33 = false;
|
||||
IsImage66 = false;
|
||||
|
||||
Intro_Phase = 1;
|
||||
Intro_Timer = 5000;
|
||||
MindRend_Timer = 3000;
|
||||
Fear_Timer = 15000;
|
||||
Domination_Timer = 30000;
|
||||
ManaBurn_Timer = 25000;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if (!summon)
|
||||
return;
|
||||
if (IsImage66)
|
||||
summon->SetHealth((summon->GetMaxHealth()*33)/100);
|
||||
else
|
||||
summon->SetHealth((summon->GetMaxHealth()*66)/100);
|
||||
if (me->getVictim())
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
//won't yell killing pet/other unit
|
||||
if (victim->GetEntry() == 21436)
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
|
||||
}
|
||||
|
||||
void DoSplit(uint32 val)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
DoScriptText(SAY_IMAGE, me);
|
||||
|
||||
if (val == 66)
|
||||
DoCast(me, SPELL_66_ILLUSION);
|
||||
else
|
||||
DoCast(me, SPELL_33_ILLUSION);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (Intro_Timer <= diff)
|
||||
{
|
||||
switch(Intro_Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), true);
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 25000;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (Unit *mellic = Unit::GetUnit(*me,pInstance->GetData64(DATA_MELLICHAR)))
|
||||
{
|
||||
//should have a better way to do this. possibly spell exist.
|
||||
mellic->setDeathState(JUST_DIED);
|
||||
mellic->SetHealth(0);
|
||||
pInstance->SetData(TYPE_SHIELD_OPEN,IN_PROGRESS);
|
||||
}
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 3000;
|
||||
break;
|
||||
case 3:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
Intro = true;
|
||||
break;
|
||||
}
|
||||
} else Intro_Timer -=diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!IsImage66 && ((me->GetHealth()*100) / me->GetMaxHealth() <= 66))
|
||||
{
|
||||
DoSplit(66);
|
||||
IsImage66 = true;
|
||||
}
|
||||
if (!IsImage33 && ((me->GetHealth()*100) / me->GetMaxHealth() <= 33))
|
||||
{
|
||||
DoSplit(33);
|
||||
IsImage33 = true;
|
||||
}
|
||||
|
||||
if (MindRend_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, SPELL_MIND_REND);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_MIND_REND);
|
||||
|
||||
MindRend_Timer = 8000;
|
||||
} else MindRend_Timer -=diff;
|
||||
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_FEAR_1,SAY_FEAR_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, SPELL_FEAR);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_FEAR);
|
||||
|
||||
Fear_Timer = 25000;
|
||||
} else Fear_Timer -=diff;
|
||||
|
||||
if (Domination_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_MIND_1,SAY_MIND_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, SPELL_DOMINATION);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_DOMINATION);
|
||||
|
||||
Domination_Timer = 16000+rand()%16000;
|
||||
} else Domination_Timer -=diff;
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, H_SPELL_MANA_BURN);
|
||||
|
||||
ManaBurn_Timer = 16000+rand()%16000;
|
||||
} else ManaBurn_Timer -=diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
SAY_INTRO = -1552000,
|
||||
SAY_AGGRO = -1552001,
|
||||
SAY_KILL_1 = -1552002,
|
||||
SAY_KILL_2 = -1552003,
|
||||
SAY_MIND_1 = -1552004,
|
||||
SAY_MIND_2 = -1552005,
|
||||
SAY_FEAR_1 = -1552006,
|
||||
SAY_FEAR_2 = -1552007,
|
||||
SAY_IMAGE = -1552008,
|
||||
SAY_DEATH = -1552009,
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_harbinger_skyriss(Creature* pCreature)
|
||||
enum eSpells
|
||||
{
|
||||
return new boss_harbinger_skyrissAI (pCreature);
|
||||
}
|
||||
SPELL_FEAR = 39415,
|
||||
SPELL_MIND_REND = 36924,
|
||||
H_SPELL_MIND_REND = 39017,
|
||||
SPELL_DOMINATION = 37162,
|
||||
H_SPELL_DOMINATION = 39019,
|
||||
H_SPELL_MANA_BURN = 39020,
|
||||
SPELL_66_ILLUSION = 36931, //entry 21466
|
||||
SPELL_33_ILLUSION = 36932, //entry 21467
|
||||
};
|
||||
|
||||
|
||||
class boss_harbinger_skyriss : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
boss_harbinger_skyriss()
|
||||
: CreatureScript("boss_harbinger_skyriss")
|
||||
{
|
||||
}
|
||||
struct boss_harbinger_skyrissAI : public ScriptedAI
|
||||
{
|
||||
boss_harbinger_skyrissAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
pInstance = pCreature->GetInstanceData();
|
||||
Intro = false;
|
||||
}
|
||||
|
||||
ScriptedInstance *pInstance;
|
||||
|
||||
bool Intro;
|
||||
bool IsImage33;
|
||||
bool IsImage66;
|
||||
|
||||
uint32 Intro_Phase;
|
||||
uint32 Intro_Timer;
|
||||
uint32 MindRend_Timer;
|
||||
uint32 Fear_Timer;
|
||||
uint32 Domination_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (!Intro)
|
||||
me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
|
||||
IsImage33 = false;
|
||||
IsImage66 = false;
|
||||
|
||||
Intro_Phase = 1;
|
||||
Intro_Timer = 5000;
|
||||
MindRend_Timer = 3000;
|
||||
Fear_Timer = 15000;
|
||||
Domination_Timer = 30000;
|
||||
ManaBurn_Timer = 25000;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if (!Intro)
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) {}
|
||||
|
||||
void JustDied(Unit* /*Killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature *summon)
|
||||
{
|
||||
if (!summon)
|
||||
return;
|
||||
if (IsImage66)
|
||||
summon->SetHealth((summon->GetMaxHealth()*33)/100);
|
||||
else
|
||||
summon->SetHealth((summon->GetMaxHealth()*66)/100);
|
||||
if (me->getVictim())
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
//won't yell killing pet/other unit
|
||||
if (victim->GetEntry() == 21436)
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me);
|
||||
}
|
||||
|
||||
void DoSplit(uint32 val)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
DoScriptText(SAY_IMAGE, me);
|
||||
|
||||
if (val == 66)
|
||||
DoCast(me, SPELL_66_ILLUSION);
|
||||
else
|
||||
DoCast(me, SPELL_33_ILLUSION);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if (Intro_Timer <= diff)
|
||||
{
|
||||
switch(Intro_Phase)
|
||||
{
|
||||
case 1:
|
||||
DoScriptText(SAY_INTRO, me);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), true);
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 25000;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (Unit *mellic = Unit::GetUnit(*me,pInstance->GetData64(DATA_MELLICHAR)))
|
||||
{
|
||||
//should have a better way to do this. possibly spell exist.
|
||||
mellic->setDeathState(JUST_DIED);
|
||||
mellic->SetHealth(0);
|
||||
pInstance->SetData(TYPE_SHIELD_OPEN,IN_PROGRESS);
|
||||
}
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 3000;
|
||||
break;
|
||||
case 3:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
Intro = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
Intro_Timer -=diff;
|
||||
}
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!IsImage66 && ((me->GetHealth()*100) / me->GetMaxHealth() <= 66))
|
||||
{
|
||||
DoSplit(66);
|
||||
IsImage66 = true;
|
||||
}
|
||||
if (!IsImage33 && ((me->GetHealth()*100) / me->GetMaxHealth() <= 33))
|
||||
{
|
||||
DoSplit(33);
|
||||
IsImage33 = true;
|
||||
}
|
||||
|
||||
if (MindRend_Timer <= diff)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, SPELL_MIND_REND);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_MIND_REND);
|
||||
|
||||
MindRend_Timer = 8000;
|
||||
}
|
||||
else
|
||||
MindRend_Timer -=diff;
|
||||
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_FEAR_1,SAY_FEAR_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, SPELL_FEAR);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_FEAR);
|
||||
|
||||
Fear_Timer = 25000;
|
||||
}
|
||||
else
|
||||
Fear_Timer -=diff;
|
||||
|
||||
if (Domination_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
DoScriptText(RAND(SAY_MIND_1,SAY_MIND_2), me);
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, SPELL_DOMINATION);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_DOMINATION);
|
||||
|
||||
Domination_Timer = 16000+rand()%16000;
|
||||
}
|
||||
else
|
||||
Domination_Timer -=diff;
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
|
||||
DoCast(pTarget, H_SPELL_MANA_BURN);
|
||||
|
||||
ManaBurn_Timer = 16000+rand()%16000;
|
||||
}
|
||||
else
|
||||
ManaBurn_Timer -=diff;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_harbinger_skyriss(Creature* pCreature)
|
||||
{
|
||||
return new boss_harbinger_skyrissAI (pCreature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#define SPELL_MIND_REND_IMAGE 36929
|
||||
#define H_SPELL_MIND_REND_IMAGE 39021
|
||||
|
||||
struct boss_harbinger_skyriss_illusionAI : public ScriptedAI
|
||||
class boss_harbinger_skyriss_illusion : public CreatureScript
|
||||
{
|
||||
boss_harbinger_skyriss_illusionAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
}
|
||||
public:
|
||||
|
||||
void Reset() { }
|
||||
boss_harbinger_skyriss_illusion()
|
||||
: CreatureScript("boss_harbinger_skyriss_illusion")
|
||||
{
|
||||
}
|
||||
struct boss_harbinger_skyriss_illusionAI : public ScriptedAI
|
||||
{
|
||||
boss_harbinger_skyriss_illusionAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
void Reset() { }
|
||||
|
||||
void EnterCombat(Unit * /*who*/) { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_harbinger_skyriss_illusionAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_harbinger_skyriss_illusion(Creature* pCreature)
|
||||
{
|
||||
return new boss_harbinger_skyriss_illusionAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_harbinger_skyriss()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_harbinger_skyriss";
|
||||
newscript->GetAI = &GetAI_boss_harbinger_skyriss;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "boss_harbinger_skyriss_illusion";
|
||||
newscript->GetAI = &GetAI_boss_harbinger_skyriss_illusion;
|
||||
newscript->RegisterSelf();
|
||||
new boss_harbinger_skyriss();
|
||||
new boss_harbinger_skyriss_illusion();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,17 +28,21 @@ EndScriptData */
|
||||
|
||||
#define MAX_ENCOUNTER 9
|
||||
|
||||
#define CONTAINMENT_CORE_SECURITY_FIELD_ALPHA 184318 //door opened when Wrath-Scryer Soccothrates dies
|
||||
#define CONTAINMENT_CORE_SECURITY_FIELD_BETA 184319 //door opened when Dalliah the Doomsayer dies
|
||||
#define POD_ALPHA 183961 //pod first boss wave
|
||||
#define POD_BETA 183963 //pod second boss wave
|
||||
#define POD_DELTA 183964 //pod third boss wave
|
||||
#define POD_GAMMA 183962 //pod fourth boss wave
|
||||
#define POD_OMEGA 183965 //pod fifth boss wave
|
||||
#define WARDENS_SHIELD 184802 // warden shield
|
||||
#define SEAL_SPHERE 184802 //shield 'protecting' mellichar
|
||||
enum eUnits
|
||||
{
|
||||
CONTAINMENT_CORE_SECURITY_FIELD_ALPHA = 184318,//door opened when Wrath-Scryer Soccothrates dies
|
||||
CONTAINMENT_CORE_SECURITY_FIELD_BETA = 184319,//door opened when Dalliah the Doomsayer dies
|
||||
POD_ALPHA = 183961,//pod first boss wave
|
||||
POD_BETA = 183963,//pod second boss wave
|
||||
POD_DELTA = 183964,//pod third boss wave
|
||||
POD_GAMMA = 183962,//pod fourth boss wave
|
||||
POD_OMEGA = 183965,//pod fifth boss wave
|
||||
WARDENS_SHIELD = 184802,// warden shield
|
||||
SEAL_SPHERE = 184802,//shield 'protecting' mellichar
|
||||
|
||||
MELLICHAR = 20904,//skyriss will kill this unit
|
||||
};
|
||||
|
||||
#define MELLICHAR 20904 //skyriss will kill this unit
|
||||
|
||||
/* Arcatraz encounters:
|
||||
1 - Zereketh the Unbound event
|
||||
@@ -47,196 +51,192 @@ EndScriptData */
|
||||
4 - Harbinger Skyriss event, 5 sub-events
|
||||
*/
|
||||
|
||||
struct instance_arcatraz : public ScriptedInstance
|
||||
class instance_arcatraz : public InstanceMapScript
|
||||
{
|
||||
instance_arcatraz(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
uint64 Containment_Core_Security_Field_AlphaGUID;
|
||||
uint64 Containment_Core_Security_Field_BetaGUID;
|
||||
uint64 Pod_AlphaGUID;
|
||||
uint64 Pod_GammaGUID;
|
||||
uint64 Pod_BetaGUID;
|
||||
uint64 Pod_DeltaGUID;
|
||||
uint64 Pod_OmegaGUID;
|
||||
uint64 Wardens_ShieldGUID;
|
||||
uint64 GoSphereGUID;
|
||||
uint64 MellicharGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
Containment_Core_Security_Field_AlphaGUID = 0;
|
||||
Containment_Core_Security_Field_BetaGUID = 0;
|
||||
Pod_AlphaGUID = 0;
|
||||
Pod_GammaGUID = 0;
|
||||
Pod_BetaGUID = 0;
|
||||
Pod_DeltaGUID = 0;
|
||||
Pod_OmegaGUID = 0;
|
||||
Wardens_ShieldGUID = 0;
|
||||
GoSphereGUID = 0;
|
||||
MellicharGUID = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
public:
|
||||
instance_arcatraz()
|
||||
: InstanceMapScript("instance_arcatraz")
|
||||
{
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA: Containment_Core_Security_Field_AlphaGUID = pGo->GetGUID(); break;
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_BETA: Containment_Core_Security_Field_BetaGUID = pGo->GetGUID(); break;
|
||||
case POD_ALPHA: Pod_AlphaGUID = pGo->GetGUID(); break;
|
||||
case POD_GAMMA: Pod_GammaGUID = pGo->GetGUID(); break;
|
||||
case POD_BETA: Pod_BetaGUID = pGo->GetGUID(); break;
|
||||
case POD_DELTA: Pod_DeltaGUID = pGo->GetGUID(); break;
|
||||
case POD_OMEGA: Pod_OmegaGUID = pGo->GetGUID(); break;
|
||||
case SEAL_SPHERE: GoSphereGUID = pGo->GetGUID(); break;
|
||||
//case WARDENS_SHIELD: Wardens_ShieldGUID = pGo->GetGUID(); break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
{
|
||||
if (pCreature->GetEntry() == MELLICHAR)
|
||||
MellicharGUID = pCreature->GetGUID();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
struct instance_arcatraz_InstanceMapScript : public ScriptedInstance
|
||||
{
|
||||
case TYPE_ZEREKETH:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
instance_arcatraz_InstanceMapScript(Map* pMap) : ScriptedInstance(pMap) { Initialize(); };
|
||||
|
||||
case TYPE_DALLIAH:
|
||||
if (data == DONE)
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
uint64 Containment_Core_Security_Field_AlphaGUID;
|
||||
uint64 Containment_Core_Security_Field_BetaGUID;
|
||||
uint64 Pod_AlphaGUID;
|
||||
uint64 Pod_GammaGUID;
|
||||
uint64 Pod_BetaGUID;
|
||||
uint64 Pod_DeltaGUID;
|
||||
uint64 Pod_OmegaGUID;
|
||||
uint64 Wardens_ShieldGUID;
|
||||
uint64 GoSphereGUID;
|
||||
uint64 MellicharGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
Containment_Core_Security_Field_AlphaGUID = 0;
|
||||
Containment_Core_Security_Field_BetaGUID = 0;
|
||||
Pod_AlphaGUID = 0;
|
||||
Pod_GammaGUID = 0;
|
||||
Pod_BetaGUID = 0;
|
||||
Pod_DeltaGUID = 0;
|
||||
Pod_OmegaGUID = 0;
|
||||
Wardens_ShieldGUID = 0;
|
||||
GoSphereGUID = 0;
|
||||
MellicharGUID = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
|
||||
{
|
||||
switch(pGo->GetEntry())
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Containment_Core_Security_Field_BetaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA: Containment_Core_Security_Field_AlphaGUID = pGo->GetGUID(); break;
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_BETA: Containment_Core_Security_Field_BetaGUID = pGo->GetGUID(); break;
|
||||
case POD_ALPHA: Pod_AlphaGUID = pGo->GetGUID(); break;
|
||||
case POD_GAMMA: Pod_GammaGUID = pGo->GetGUID(); break;
|
||||
case POD_BETA: Pod_BetaGUID = pGo->GetGUID(); break;
|
||||
case POD_DELTA: Pod_DeltaGUID = pGo->GetGUID(); break;
|
||||
case POD_OMEGA: Pod_OmegaGUID = pGo->GetGUID(); break;
|
||||
case SEAL_SPHERE: GoSphereGUID = pGo->GetGUID(); break;
|
||||
//case WARDENS_SHIELD: Wardens_ShieldGUID = pGo->GetGUID(); break;
|
||||
}
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
}
|
||||
|
||||
case TYPE_SOCCOTHRATES:
|
||||
if (data == DONE)
|
||||
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
|
||||
{
|
||||
if (pCreature->GetEntry() == MELLICHAR)
|
||||
MellicharGUID = pCreature->GetGUID();
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Containment_Core_Security_Field_AlphaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
|
||||
case TYPE_HARBINGERSKYRISS:
|
||||
if (data == NOT_STARTED || data == FAIL)
|
||||
case TYPE_ZEREKETH:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case TYPE_DALLIAH:
|
||||
if (data == DONE)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Containment_Core_Security_Field_BetaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case TYPE_SOCCOTHRATES:
|
||||
if (data == DONE)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Containment_Core_Security_Field_AlphaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case TYPE_HARBINGERSKYRISS:
|
||||
if (data == NOT_STARTED || data == FAIL)
|
||||
{
|
||||
m_auiEncounter[4] = NOT_STARTED;
|
||||
m_auiEncounter[5] = NOT_STARTED;
|
||||
m_auiEncounter[6] = NOT_STARTED;
|
||||
m_auiEncounter[7] = NOT_STARTED;
|
||||
m_auiEncounter[8] = NOT_STARTED;
|
||||
}
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_1:
|
||||
if (data == IN_PROGRESS)
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_AlphaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_2:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_BetaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_3:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_DeltaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[6] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_4:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_GammaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[7] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_5:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_OmegaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[8] = data;
|
||||
break;
|
||||
case TYPE_SHIELD_OPEN:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Wardens_ShieldGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
m_auiEncounter[4] = NOT_STARTED;
|
||||
m_auiEncounter[5] = NOT_STARTED;
|
||||
m_auiEncounter[6] = NOT_STARTED;
|
||||
m_auiEncounter[7] = NOT_STARTED;
|
||||
m_auiEncounter[8] = NOT_STARTED;
|
||||
case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3];
|
||||
case TYPE_WARDEN_1: return m_auiEncounter[4];
|
||||
case TYPE_WARDEN_2: return m_auiEncounter[5];
|
||||
case TYPE_WARDEN_3: return m_auiEncounter[6];
|
||||
case TYPE_WARDEN_4: return m_auiEncounter[7];
|
||||
case TYPE_WARDEN_5: return m_auiEncounter[8];
|
||||
}
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
|
||||
case TYPE_WARDEN_1:
|
||||
if (data == IN_PROGRESS)
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_AlphaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
|
||||
case TYPE_WARDEN_2:
|
||||
if (data == IN_PROGRESS)
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
{
|
||||
switch(data)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_BetaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
case DATA_MELLICHAR: return MellicharGUID;
|
||||
case DATA_SPHERE_SHIELD: return GoSphereGUID;
|
||||
}
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
case TYPE_WARDEN_3:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_DeltaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[6] = data;
|
||||
break;
|
||||
|
||||
case TYPE_WARDEN_4:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_GammaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[7] = data;
|
||||
break;
|
||||
|
||||
case TYPE_WARDEN_5:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Pod_OmegaGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[8] = data;
|
||||
break;
|
||||
|
||||
case TYPE_SHIELD_OPEN:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject *pGo = instance->GetGameObject(Wardens_ShieldGUID))
|
||||
pGo->UseDoorOrButton();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
switch(type)
|
||||
InstanceData* OnGetInstanceData(InstanceMap* pMap)
|
||||
{
|
||||
case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3];
|
||||
case TYPE_WARDEN_1: return m_auiEncounter[4];
|
||||
case TYPE_WARDEN_2: return m_auiEncounter[5];
|
||||
case TYPE_WARDEN_3: return m_auiEncounter[6];
|
||||
case TYPE_WARDEN_4: return m_auiEncounter[7];
|
||||
case TYPE_WARDEN_5: return m_auiEncounter[8];
|
||||
return new instance_arcatraz_InstanceMapScript(pMap);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data)
|
||||
{
|
||||
switch(data)
|
||||
{
|
||||
case DATA_MELLICHAR: return MellicharGUID;
|
||||
case DATA_SPHERE_SHIELD: return GoSphereGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceData* GetInstanceData_instance_arcatraz(Map* pMap)
|
||||
{
|
||||
return new instance_arcatraz(pMap);
|
||||
}
|
||||
|
||||
void AddSC_instance_arcatraz()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "instance_arcatraz";
|
||||
newscript->GetInstanceData = &GetInstanceData_instance_arcatraz;
|
||||
newscript->RegisterSelf();
|
||||
new instance_arcatraz;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user