mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/TK: Update remaining scripts to new register model 1 (#27767)
(cherry picked from commit 5e3b76bf25)
This commit is contained in:
@@ -66,166 +66,155 @@ enum MillhouseSpells
|
||||
SPELL_PYROBLAST = 33975,
|
||||
};
|
||||
|
||||
class npc_millhouse_manastorm : public CreatureScript
|
||||
struct npc_millhouse_manastorm : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_millhouse_manastorm() : CreatureScript("npc_millhouse_manastorm") { }
|
||||
npc_millhouse_manastorm(Creature* creature) : ScriptedAI(creature), Init(false)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
struct npc_millhouse_manastormAI : public ScriptedAI
|
||||
void Initialize()
|
||||
{
|
||||
EventProgress_Timer = 2000;
|
||||
LowHp = false;
|
||||
Phase = 1;
|
||||
|
||||
Pyroblast_Timer = 1000;
|
||||
Fireball_Timer = 2500;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
bool Init;
|
||||
bool LowHp;
|
||||
|
||||
uint32 Pyroblast_Timer;
|
||||
uint32 Fireball_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (instance->GetData(DATA_WARDEN_2) == DONE)
|
||||
{
|
||||
npc_millhouse_manastormAI(Creature* creature) : ScriptedAI(creature), Init(false)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
EventProgress_Timer = 2000;
|
||||
LowHp = false;
|
||||
Phase = 1;
|
||||
|
||||
Pyroblast_Timer = 1000;
|
||||
Fireball_Timer = 2500;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
bool Init;
|
||||
bool LowHp;
|
||||
|
||||
uint32 Pyroblast_Timer;
|
||||
uint32 Fireball_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (instance->GetData(DATA_WARDEN_2) == DONE)
|
||||
{
|
||||
Init = true;
|
||||
me->SetImmuneToNPC(false);
|
||||
}
|
||||
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == DONE)
|
||||
Talk(SAY_COMPLETE);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
me->GetMotionMaster()->MoveChase(who, 25.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
/*for questId 10886 (heroic mode only)
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) != DONE)
|
||||
->FailQuest();*/
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!Init)
|
||||
{
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (Phase < 8)
|
||||
{
|
||||
switch (Phase)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_INTRO_1);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_INTRO_2);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 3:
|
||||
Talk(SAY_WATER);
|
||||
DoCast(me, SPELL_CONJURE_WATER);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 4:
|
||||
Talk(SAY_BUFFS);
|
||||
DoCast(me, SPELL_ICE_ARMOR);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 5:
|
||||
Talk(SAY_DRINK);
|
||||
DoCast(me, SPELL_ARCANE_INTELLECT);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 6:
|
||||
Talk(SAY_READY);
|
||||
EventProgress_Timer = 6000;
|
||||
break;
|
||||
case 7:
|
||||
instance->SetData(DATA_WARDEN_2, DONE);
|
||||
Init = true;
|
||||
me->SetImmuneToNPC(false);
|
||||
break;
|
||||
}
|
||||
++Phase;
|
||||
}
|
||||
}
|
||||
else
|
||||
EventProgress_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!LowHp && HealthBelowPct(20))
|
||||
{
|
||||
Talk(SAY_LOWHP);
|
||||
LowHp = true;
|
||||
}
|
||||
|
||||
if (Pyroblast_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
return;
|
||||
|
||||
Talk(SAY_PYRO);
|
||||
|
||||
DoCastVictim(SPELL_PYROBLAST);
|
||||
Pyroblast_Timer = 40000;
|
||||
}
|
||||
else
|
||||
Pyroblast_Timer -=diff;
|
||||
|
||||
if (Fireball_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FIREBALL);
|
||||
Fireball_Timer = 4000;
|
||||
}
|
||||
else
|
||||
Fireball_Timer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetArcatrazAI<npc_millhouse_manastormAI>(creature);
|
||||
Init = true;
|
||||
me->SetImmuneToNPC(false);
|
||||
}
|
||||
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == DONE)
|
||||
Talk(SAY_COMPLETE);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
AddThreat(who, 0.0f);
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
me->GetMotionMaster()->MoveChase(who, 25.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
/*for questId 10886 (heroic mode only)
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) != DONE)
|
||||
->FailQuest();*/
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!Init)
|
||||
{
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (Phase < 8)
|
||||
{
|
||||
switch (Phase)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_INTRO_1);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_INTRO_2);
|
||||
EventProgress_Timer = 18000;
|
||||
break;
|
||||
case 3:
|
||||
Talk(SAY_WATER);
|
||||
DoCast(me, SPELL_CONJURE_WATER);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 4:
|
||||
Talk(SAY_BUFFS);
|
||||
DoCast(me, SPELL_ICE_ARMOR);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 5:
|
||||
Talk(SAY_DRINK);
|
||||
DoCast(me, SPELL_ARCANE_INTELLECT);
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 6:
|
||||
Talk(SAY_READY);
|
||||
EventProgress_Timer = 6000;
|
||||
break;
|
||||
case 7:
|
||||
instance->SetData(DATA_WARDEN_2, DONE);
|
||||
Init = true;
|
||||
me->SetImmuneToNPC(false);
|
||||
break;
|
||||
}
|
||||
++Phase;
|
||||
}
|
||||
}
|
||||
else
|
||||
EventProgress_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
if (!LowHp && HealthBelowPct(20))
|
||||
{
|
||||
Talk(SAY_LOWHP);
|
||||
LowHp = true;
|
||||
}
|
||||
|
||||
if (Pyroblast_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
return;
|
||||
|
||||
Talk(SAY_PYRO);
|
||||
|
||||
DoCastVictim(SPELL_PYROBLAST);
|
||||
Pyroblast_Timer = 40000;
|
||||
}
|
||||
else
|
||||
Pyroblast_Timer -=diff;
|
||||
|
||||
if (Fireball_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FIREBALL);
|
||||
Fireball_Timer = 4000;
|
||||
}
|
||||
else
|
||||
Fireball_Timer -=diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
/*#####
|
||||
# npc_warden_mellichar
|
||||
@@ -271,255 +260,244 @@ enum WardenSpells
|
||||
SPELL_BUBBLE_VISUAL = 36849,
|
||||
};
|
||||
|
||||
class npc_warden_mellichar : public CreatureScript
|
||||
struct npc_warden_mellichar : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_warden_mellichar() : CreatureScript("npc_warden_mellichar") { }
|
||||
npc_warden_mellichar(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
struct npc_warden_mellicharAI : public ScriptedAI
|
||||
void Initialize()
|
||||
{
|
||||
IsRunning = false;
|
||||
CanSpawn = false;
|
||||
|
||||
EventProgress_Timer = 22000;
|
||||
Phase = 1;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool IsRunning;
|
||||
bool CanSpawn;
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
|
||||
instance->SetBossState(DATA_HARBINGER_SKYRISS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*who*/) override { }
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (IsRunning)
|
||||
return;
|
||||
|
||||
if (!me->GetVictim() && me->CanCreatureAttack(who))
|
||||
{
|
||||
npc_warden_mellicharAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
if (!me->CanFly() && me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||
return;
|
||||
if (who->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
IsRunning = false;
|
||||
CanSpawn = false;
|
||||
float attackRadius = me->GetAttackDistance(who)/10;
|
||||
if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who))
|
||||
JustEngagedWith(who);
|
||||
}
|
||||
}
|
||||
|
||||
EventProgress_Timer = 22000;
|
||||
Phase = 1;
|
||||
}
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
Talk(YELL_INTRO1);
|
||||
DoCast(me, SPELL_BUBBLE_VISUAL);
|
||||
|
||||
InstanceScript* instance;
|
||||
instance->SetBossState(DATA_HARBINGER_SKYRISS, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), false);
|
||||
IsRunning = true;
|
||||
}
|
||||
|
||||
bool IsRunning;
|
||||
bool CanSpawn;
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
DoZoneInCombat(summon);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
uint32 EventProgress_Timer;
|
||||
uint32 Phase;
|
||||
bool CanProgress()
|
||||
{
|
||||
if (Phase == 7 && instance->GetData(DATA_WARDEN_4) == DONE)
|
||||
return true;
|
||||
if (Phase == 6 && instance->GetData(DATA_WARDEN_3) == DONE)
|
||||
return true;
|
||||
if (Phase == 5 && instance->GetData(DATA_WARDEN_2) == DONE)
|
||||
return true;
|
||||
if (Phase == 4)
|
||||
return true;
|
||||
if (Phase == 3 && instance->GetData(DATA_WARDEN_1) == DONE)
|
||||
return true;
|
||||
if (Phase == 2 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
if (Phase == 1 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
void DoPrepareForPhase()
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAurasByType(SPELL_AURA_DUMMY);
|
||||
|
||||
instance->SetBossState(DATA_HARBINGER_SKYRISS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*who*/) override { }
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (IsRunning)
|
||||
return;
|
||||
|
||||
if (!me->GetVictim() && me->CanCreatureAttack(who))
|
||||
{
|
||||
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))
|
||||
JustEngagedWith(who);
|
||||
}
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
Talk(YELL_INTRO1);
|
||||
DoCast(me, SPELL_BUBBLE_VISUAL);
|
||||
|
||||
instance->SetBossState(DATA_HARBINGER_SKYRISS, IN_PROGRESS);
|
||||
switch (Phase)
|
||||
{
|
||||
case 2:
|
||||
DoCast(me, SPELL_TARGET_ALPHA);
|
||||
instance->SetData(DATA_WARDEN_1, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), false);
|
||||
IsRunning = true;
|
||||
break;
|
||||
case 3:
|
||||
DoCast(me, SPELL_TARGET_BETA);
|
||||
instance->SetData(DATA_WARDEN_2, IN_PROGRESS);
|
||||
break;
|
||||
case 5:
|
||||
DoCast(me, SPELL_TARGET_DELTA);
|
||||
instance->SetData(DATA_WARDEN_3, IN_PROGRESS);
|
||||
break;
|
||||
case 6:
|
||||
DoCast(me, SPELL_TARGET_GAMMA);
|
||||
instance->SetData(DATA_WARDEN_4, IN_PROGRESS);
|
||||
break;
|
||||
case 7:
|
||||
instance->SetData(DATA_WARDEN_5, IN_PROGRESS);
|
||||
break;
|
||||
}
|
||||
CanSpawn = true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!IsRunning)
|
||||
return;
|
||||
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == FAIL)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
if (CanSpawn)
|
||||
{
|
||||
DoZoneInCombat(summon);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
bool CanProgress()
|
||||
{
|
||||
if (Phase == 7 && instance->GetData(DATA_WARDEN_4) == DONE)
|
||||
return true;
|
||||
if (Phase == 6 && instance->GetData(DATA_WARDEN_3) == DONE)
|
||||
return true;
|
||||
if (Phase == 5 && instance->GetData(DATA_WARDEN_2) == DONE)
|
||||
return true;
|
||||
if (Phase == 4)
|
||||
return true;
|
||||
if (Phase == 3 && instance->GetData(DATA_WARDEN_1) == DONE)
|
||||
return true;
|
||||
if (Phase == 2 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
if (Phase == 1 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void DoPrepareForPhase()
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAurasByType(SPELL_AURA_DUMMY);
|
||||
//continue beam omega pod, unless we are about to summon skyriss
|
||||
if (Phase != 7)
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
|
||||
switch (Phase)
|
||||
{
|
||||
case 2:
|
||||
DoCast(me, SPELL_TARGET_ALPHA);
|
||||
instance->SetData(DATA_WARDEN_1, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), false);
|
||||
case 2:
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_TRICKSTER, 472.231f, -150.86f, 42.6573f, 3.10669f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 3:
|
||||
DoCast(me, SPELL_TARGET_BETA);
|
||||
instance->SetData(DATA_WARDEN_2, IN_PROGRESS);
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_PH_HUNTER, 472.231f, -150.86f, 42.6573f, 3.10669f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 5:
|
||||
DoCast(me, SPELL_TARGET_DELTA);
|
||||
instance->SetData(DATA_WARDEN_3, IN_PROGRESS);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
me->SummonCreature(ENTRY_MILLHOUSE, 417.242f, -149.795f, 42.6548f, 0.191986f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // static pos
|
||||
break;
|
||||
case 4:
|
||||
Talk(YELL_RELEASE2B);
|
||||
break;
|
||||
case 5:
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_AKKIRIS, 420.851f, -174.337f, 42.6655f, 0.122173f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 6:
|
||||
DoCast(me, SPELL_TARGET_GAMMA);
|
||||
instance->SetData(DATA_WARDEN_4, IN_PROGRESS);
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_SULFURON, 420.851f, -174.337f, 42.6655f, 0.122173f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 7:
|
||||
instance->SetData(DATA_WARDEN_5, IN_PROGRESS);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_TW_DRAK, 470.364f, -174.656f, 42.6753f, 3.59538f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_BL_DRAK, 470.364f, -174.656f, 42.6753f, 3.59538f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
me->SummonCreature(ENTRY_SKYRISS, 446.086f, -182.506f, 44.0852f, 1.5708f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // static pos
|
||||
Talk(YELL_WELCOME);
|
||||
break;
|
||||
}
|
||||
CanSpawn = true;
|
||||
CanSpawn = false;
|
||||
++Phase;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
if (CanProgress())
|
||||
{
|
||||
if (!IsRunning)
|
||||
return;
|
||||
|
||||
if (EventProgress_Timer <= diff)
|
||||
switch (Phase)
|
||||
{
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == 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, 472.231f, -150.86f, 42.6573f, 3.10669f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_PH_HUNTER, 472.231f, -150.86f, 42.6573f, 3.10669f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
me->SummonCreature(ENTRY_MILLHOUSE, 417.242f, -149.795f, 42.6548f, 0.191986f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // static pos
|
||||
break;
|
||||
case 4:
|
||||
Talk(YELL_RELEASE2B);
|
||||
break;
|
||||
case 5:
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_AKKIRIS, 420.851f, -174.337f, 42.6655f, 0.122173f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_SULFURON, 420.851f, -174.337f, 42.6655f, 0.122173f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(ENTRY_TW_DRAK, 470.364f, -174.656f, 42.6753f, 3.59538f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(ENTRY_BL_DRAK, 470.364f, -174.656f, 42.6753f, 3.59538f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // random pos
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
me->SummonCreature(ENTRY_SKYRISS, 446.086f, -182.506f, 44.0852f, 1.5708f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min); // static pos
|
||||
Talk(YELL_WELCOME);
|
||||
break;
|
||||
}
|
||||
CanSpawn = false;
|
||||
++Phase;
|
||||
}
|
||||
if (CanProgress())
|
||||
{
|
||||
switch (Phase)
|
||||
{
|
||||
case 1:
|
||||
Talk(YELL_INTRO2);
|
||||
EventProgress_Timer = 10000;
|
||||
++Phase;
|
||||
break;
|
||||
case 2:
|
||||
Talk(YELL_RELEASE1);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 3:
|
||||
Talk(YELL_RELEASE2A);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 10000;
|
||||
break;
|
||||
case 4:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 5:
|
||||
Talk(YELL_RELEASE3);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 6:
|
||||
Talk(YELL_RELEASE4);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 7:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
Talk(YELL_INTRO2);
|
||||
EventProgress_Timer = 10000;
|
||||
++Phase;
|
||||
break;
|
||||
case 2:
|
||||
Talk(YELL_RELEASE1);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 7000;
|
||||
break;
|
||||
case 3:
|
||||
Talk(YELL_RELEASE2A);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 10000;
|
||||
break;
|
||||
case 4:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 5:
|
||||
Talk(YELL_RELEASE3);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 6:
|
||||
Talk(YELL_RELEASE4);
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
case 7:
|
||||
DoPrepareForPhase();
|
||||
EventProgress_Timer = 15000;
|
||||
break;
|
||||
}
|
||||
else
|
||||
EventProgress_Timer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetArcatrazAI<npc_warden_mellicharAI>(creature);
|
||||
}
|
||||
else
|
||||
EventProgress_Timer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_arcatraz()
|
||||
{
|
||||
new npc_millhouse_manastorm();
|
||||
new npc_warden_mellichar();
|
||||
RegisterArcatrazCreatureAI(npc_millhouse_manastorm);
|
||||
RegisterArcatrazCreatureAI(npc_warden_mellichar);
|
||||
}
|
||||
|
||||
@@ -76,4 +76,6 @@ inline AI* GetArcatrazAI(T* obj)
|
||||
return GetInstanceAI<AI>(obj, ArcatrazScriptName);
|
||||
}
|
||||
|
||||
#define RegisterArcatrazCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetArcatrazAI)
|
||||
|
||||
#endif // ARCATRAZ_H
|
||||
|
||||
@@ -54,151 +54,140 @@ enum Events
|
||||
EVENT_SOCCOTHRATES_DEATH = 6
|
||||
};
|
||||
|
||||
class boss_dalliah_the_doomsayer : public CreatureScript
|
||||
struct boss_dalliah_the_doomsayer : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_dalliah_the_doomsayer() : CreatureScript("boss_dalliah_the_doomsayer") { }
|
||||
boss_dalliah_the_doomsayer(Creature* creature) : BossAI(creature, DATA_DALLIAH)
|
||||
{
|
||||
soccothratesTaunt = false;
|
||||
soccothratesDeath = false;
|
||||
}
|
||||
|
||||
struct boss_dalliah_the_doomsayerAI : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
soccothratesTaunt = false;
|
||||
soccothratesDeath = false;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SOCCOTHRATES)))
|
||||
if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
|
||||
soccothrates->AI()->SetData(1, 1);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, 1s, 4s);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 7s, 9s);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SHADOW_WAVE, 11s, 16s);
|
||||
events.ScheduleEvent(EVENT_ME_FIRST, 6s);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
boss_dalliah_the_doomsayerAI(Creature* creature) : BossAI(creature, DATA_DALLIAH)
|
||||
case 1:
|
||||
events.ScheduleEvent(EVENT_SOCCOTHRATES_DEATH, 6s);
|
||||
soccothratesDeath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if (soccothratesDeath)
|
||||
{
|
||||
soccothratesTaunt = false;
|
||||
soccothratesDeath = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
soccothratesTaunt = false;
|
||||
soccothratesDeath = false;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SOCCOTHRATES)))
|
||||
if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
|
||||
soccothrates->AI()->SetData(1, 1);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, 1s, 4s);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 7s, 9s);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SHADOW_WAVE, 11s, 16s);
|
||||
events.ScheduleEvent(EVENT_ME_FIRST, 6s);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case 1:
|
||||
events.ScheduleEvent(EVENT_SOCCOTHRATES_DEATH, 6s);
|
||||
soccothratesDeath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if (soccothratesDeath)
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SOCCOTHRATES_DEATH:
|
||||
Talk(SAY_SOCCOTHRATES_DEATH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_GIFT_OF_THE_DOOMSAYER:
|
||||
DoCastVictim(SPELL_GIFT_OF_THE_DOOMSAYER, true);
|
||||
events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, 16s, 21s);
|
||||
break;
|
||||
case EVENT_WHIRLWIND:
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
Talk(SAY_WHIRLWIND);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 19s, 21s);
|
||||
events.ScheduleEvent(EVENT_HEAL, 6s);
|
||||
break;
|
||||
case EVENT_HEAL:
|
||||
DoCast(me, SPELL_HEAL);
|
||||
Talk(SAY_HEAL);
|
||||
break;
|
||||
case EVENT_SHADOW_WAVE:
|
||||
DoCastVictim(SPELL_SHADOW_WAVE, true);
|
||||
events.ScheduleEvent(EVENT_SHADOW_WAVE, 11s, 16s);
|
||||
break;
|
||||
case EVENT_ME_FIRST:
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SOCCOTHRATES)))
|
||||
if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
|
||||
soccothrates->AI()->Talk(SAY_AGGRO_DALLIAH_FIRST);
|
||||
case EVENT_SOCCOTHRATES_DEATH:
|
||||
Talk(SAY_SOCCOTHRATES_DEATH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(25) && !soccothratesTaunt)
|
||||
{
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SOCCOTHRATES)))
|
||||
soccothrates->AI()->Talk(SAY_DALLIAH_25_PERCENT);
|
||||
soccothratesTaunt = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool soccothratesTaunt;
|
||||
bool soccothratesDeath;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetArcatrazAI<boss_dalliah_the_doomsayerAI>(creature);
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_GIFT_OF_THE_DOOMSAYER:
|
||||
DoCastVictim(SPELL_GIFT_OF_THE_DOOMSAYER, true);
|
||||
events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, 16s, 21s);
|
||||
break;
|
||||
case EVENT_WHIRLWIND:
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
Talk(SAY_WHIRLWIND);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, 19s, 21s);
|
||||
events.ScheduleEvent(EVENT_HEAL, 6s);
|
||||
break;
|
||||
case EVENT_HEAL:
|
||||
DoCast(me, SPELL_HEAL);
|
||||
Talk(SAY_HEAL);
|
||||
break;
|
||||
case EVENT_SHADOW_WAVE:
|
||||
DoCastVictim(SPELL_SHADOW_WAVE, true);
|
||||
events.ScheduleEvent(EVENT_SHADOW_WAVE, 11s, 16s);
|
||||
break;
|
||||
case EVENT_ME_FIRST:
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SOCCOTHRATES)))
|
||||
if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
|
||||
soccothrates->AI()->Talk(SAY_AGGRO_DALLIAH_FIRST);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(25) && !soccothratesTaunt)
|
||||
{
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SOCCOTHRATES)))
|
||||
soccothrates->AI()->Talk(SAY_DALLIAH_25_PERCENT);
|
||||
soccothratesTaunt = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool soccothratesTaunt;
|
||||
bool soccothratesDeath;
|
||||
};
|
||||
|
||||
void AddSC_boss_dalliah_the_doomsayer()
|
||||
{
|
||||
new boss_dalliah_the_doomsayer();
|
||||
RegisterArcatrazCreatureAI(boss_dalliah_the_doomsayer);
|
||||
}
|
||||
|
||||
@@ -59,251 +59,229 @@ enum Spells
|
||||
H_SPELL_MIND_REND_IMAGE = 39021
|
||||
};
|
||||
|
||||
class boss_harbinger_skyriss : public CreatureScript
|
||||
struct boss_harbinger_skyriss : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_harbinger_skyriss() : CreatureScript("boss_harbinger_skyriss") { }
|
||||
boss_harbinger_skyriss(Creature* creature) : BossAI(creature, DATA_HARBINGER_SKYRISS)
|
||||
{
|
||||
Initialize();
|
||||
Intro = false;
|
||||
}
|
||||
|
||||
struct boss_harbinger_skyrissAI : public BossAI
|
||||
void Initialize()
|
||||
{
|
||||
IsImage33 = false;
|
||||
IsImage66 = false;
|
||||
|
||||
Intro_Phase = 1;
|
||||
Intro_Timer = 5000;
|
||||
MindRend_Timer = 3000;
|
||||
Fear_Timer = 15000;
|
||||
Domination_Timer = 30000;
|
||||
ManaBurn_Timer = 25000;
|
||||
}
|
||||
|
||||
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() override
|
||||
{
|
||||
_Reset();
|
||||
|
||||
me->SetImmuneToAll(!Intro);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!Intro)
|
||||
return;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (!summon)
|
||||
return;
|
||||
if (IsImage66)
|
||||
summon->SetHealth(summon->CountPctFromMaxHealth(33));
|
||||
else
|
||||
summon->SetHealth(summon->CountPctFromMaxHealth(66));
|
||||
if (me->GetVictim())
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
summon->AI()->AttackStart(target);
|
||||
|
||||
summons.Summon(summon);
|
||||
summon->SetImmuneToAll(false);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
//won't yell killing pet/other unit
|
||||
if (victim->GetEntry() == NPC_ALPHA_POD_TARGET)
|
||||
return;
|
||||
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void DoSplit(uint32 val)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
Talk(SAY_IMAGE);
|
||||
|
||||
if (val == 66)
|
||||
DoCast(me, SPELL_66_ILLUSION);
|
||||
else
|
||||
DoCast(me, SPELL_33_ILLUSION);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
boss_harbinger_skyrissAI(Creature* creature) : BossAI(creature, DATA_HARBINGER_SKYRISS)
|
||||
if (Intro_Timer <= diff)
|
||||
{
|
||||
Initialize();
|
||||
Intro = false;
|
||||
switch (Intro_Phase)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_INTRO);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), true);
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 25000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_AGGRO);
|
||||
if (Unit* mellic = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_MELLICHAR)))
|
||||
{
|
||||
//should have a better way to do this. possibly spell exist.
|
||||
mellic->setDeathState(JUST_DIED);
|
||||
mellic->SetHealth(0);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), false);
|
||||
}
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 3000;
|
||||
break;
|
||||
case 3:
|
||||
me->SetImmuneToAll(false);
|
||||
Intro = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
Intro_Timer -=diff;
|
||||
}
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
IsImage33 = false;
|
||||
IsImage66 = false;
|
||||
if (!IsImage66 && !HealthAbovePct(66))
|
||||
{
|
||||
DoSplit(66);
|
||||
IsImage66 = true;
|
||||
}
|
||||
if (!IsImage33 && !HealthAbovePct(33))
|
||||
{
|
||||
DoSplit(33);
|
||||
IsImage33 = true;
|
||||
}
|
||||
|
||||
Intro_Phase = 1;
|
||||
Intro_Timer = 5000;
|
||||
MindRend_Timer = 3000;
|
||||
Fear_Timer = 15000;
|
||||
Domination_Timer = 30000;
|
||||
ManaBurn_Timer = 25000;
|
||||
}
|
||||
if (MindRend_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_MIND_REND);
|
||||
else
|
||||
DoCastVictim(SPELL_MIND_REND);
|
||||
|
||||
bool Intro;
|
||||
bool IsImage33;
|
||||
bool IsImage66;
|
||||
MindRend_Timer = 8000;
|
||||
}
|
||||
else
|
||||
MindRend_Timer -=diff;
|
||||
|
||||
uint32 Intro_Phase;
|
||||
uint32 Intro_Timer;
|
||||
uint32 MindRend_Timer;
|
||||
uint32 Fear_Timer;
|
||||
uint32 Domination_Timer;
|
||||
uint32 ManaBurn_Timer;
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
return;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
Talk(SAY_FEAR);
|
||||
|
||||
me->SetImmuneToAll(!Intro);
|
||||
Initialize();
|
||||
}
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_FEAR);
|
||||
else
|
||||
DoCastVictim(SPELL_FEAR);
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!Intro)
|
||||
return;
|
||||
Fear_Timer = 25000;
|
||||
}
|
||||
else
|
||||
Fear_Timer -=diff;
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
if (Domination_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
return;
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
Talk(SAY_MIND);
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_DOMINATION);
|
||||
else
|
||||
DoCastVictim(SPELL_DOMINATION);
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (!summon)
|
||||
return;
|
||||
if (IsImage66)
|
||||
summon->SetHealth(summon->CountPctFromMaxHealth(33));
|
||||
else
|
||||
summon->SetHealth(summon->CountPctFromMaxHealth(66));
|
||||
if (me->GetVictim())
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
summon->AI()->AttackStart(target);
|
||||
Domination_Timer = 16000 + rand32() % 16000;
|
||||
}
|
||||
else
|
||||
Domination_Timer -=diff;
|
||||
|
||||
summons.Summon(summon);
|
||||
summon->SetImmuneToAll(false);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
//won't yell killing pet/other unit
|
||||
if (victim->GetEntry() == NPC_ALPHA_POD_TARGET)
|
||||
return;
|
||||
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void DoSplit(uint32 val)
|
||||
if (IsHeroic())
|
||||
{
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
Talk(SAY_IMAGE);
|
||||
|
||||
if (val == 66)
|
||||
DoCast(me, SPELL_66_ILLUSION);
|
||||
else
|
||||
DoCast(me, SPELL_33_ILLUSION);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
if (Intro_Timer <= diff)
|
||||
{
|
||||
switch (Intro_Phase)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_INTRO);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), true);
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 25000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_AGGRO);
|
||||
if (Unit* mellic = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_MELLICHAR)))
|
||||
{
|
||||
//should have a better way to do this. possibly spell exist.
|
||||
mellic->setDeathState(JUST_DIED);
|
||||
mellic->SetHealth(0);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_WARDENS_SHIELD), false);
|
||||
}
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 3000;
|
||||
break;
|
||||
case 3:
|
||||
me->SetImmuneToAll(false);
|
||||
Intro = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
Intro_Timer -=diff;
|
||||
}
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!IsImage66 && !HealthAbovePct(66))
|
||||
{
|
||||
DoSplit(66);
|
||||
IsImage66 = true;
|
||||
}
|
||||
if (!IsImage33 && !HealthAbovePct(33))
|
||||
{
|
||||
DoSplit(33);
|
||||
IsImage33 = true;
|
||||
}
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, H_SPELL_MANA_BURN);
|
||||
|
||||
if (MindRend_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_MIND_REND);
|
||||
else
|
||||
DoCastVictim(SPELL_MIND_REND);
|
||||
|
||||
MindRend_Timer = 8000;
|
||||
}
|
||||
else
|
||||
MindRend_Timer -=diff;
|
||||
|
||||
if (Fear_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
return;
|
||||
|
||||
Talk(SAY_FEAR);
|
||||
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_FEAR);
|
||||
else
|
||||
DoCastVictim(SPELL_FEAR);
|
||||
|
||||
Fear_Timer = 25000;
|
||||
}
|
||||
else
|
||||
Fear_Timer -=diff;
|
||||
|
||||
if (Domination_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
return;
|
||||
|
||||
Talk(SAY_MIND);
|
||||
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_DOMINATION);
|
||||
else
|
||||
DoCastVictim(SPELL_DOMINATION);
|
||||
|
||||
Domination_Timer = 16000 + rand32() % 16000;
|
||||
}
|
||||
else
|
||||
Domination_Timer -=diff;
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
return;
|
||||
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, H_SPELL_MANA_BURN);
|
||||
|
||||
ManaBurn_Timer = 16000 + rand32() % 16000;
|
||||
}
|
||||
else
|
||||
ManaBurn_Timer -=diff;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
ManaBurn_Timer = 16000 + rand32() % 16000;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetArcatrazAI<boss_harbinger_skyrissAI>(creature);
|
||||
else
|
||||
ManaBurn_Timer -=diff;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
class boss_harbinger_skyriss_illusion : public CreatureScript
|
||||
struct boss_harbinger_skyriss_illusion : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_harbinger_skyriss_illusion() : CreatureScript("boss_harbinger_skyriss_illusion") { }
|
||||
boss_harbinger_skyriss_illusion(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
struct boss_harbinger_skyriss_illusionAI : public ScriptedAI
|
||||
{
|
||||
boss_harbinger_skyriss_illusionAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
void Reset() override
|
||||
{
|
||||
me->SetImmuneToPC(false);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->SetImmuneToPC(false);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetArcatrazAI<boss_harbinger_skyriss_illusionAI>(creature);
|
||||
}
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
};
|
||||
|
||||
void AddSC_boss_harbinger_skyriss()
|
||||
{
|
||||
new boss_harbinger_skyriss();
|
||||
new boss_harbinger_skyriss_illusion();
|
||||
RegisterArcatrazCreatureAI(boss_harbinger_skyriss);
|
||||
RegisterArcatrazCreatureAI(boss_harbinger_skyriss_illusion);
|
||||
}
|
||||
|
||||
@@ -77,216 +77,205 @@ enum Events
|
||||
EVENT_DALLIAH_DEATH = 13
|
||||
};
|
||||
|
||||
class boss_wrath_scryer_soccothrates : public CreatureScript
|
||||
struct boss_wrath_scryer_soccothrates : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_wrath_scryer_soccothrates() : CreatureScript("boss_wrath_scryer_soccothrates") { }
|
||||
boss_wrath_scryer_soccothrates(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES)
|
||||
{
|
||||
preFight = false;
|
||||
dalliahTaunt = false;
|
||||
dalliahDeath = false;
|
||||
}
|
||||
|
||||
struct boss_wrath_scryer_soccothratesAI : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
preFight = false;
|
||||
dalliahTaunt = false;
|
||||
dalliahDeath = false;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
if (dalliah->IsAlive() && !dalliah->IsInCombat())
|
||||
dalliah->AI()->SetData(1, 1);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_FELFIRE_SHOCK, 12s, 14s);
|
||||
events.ScheduleEvent(EVENT_KNOCK_AWAY, 11s, 12s);
|
||||
events.ScheduleEvent(EVENT_ME_FIRST, 6s);
|
||||
Talk(SAY_AGGRO);
|
||||
preFight = false;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (instance->GetData(DATA_CONVERSATION) == NOT_STARTED && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 70.0f))
|
||||
{
|
||||
boss_wrath_scryer_soccothratesAI(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES)
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_1);
|
||||
instance->SetData(DATA_CONVERSATION, DONE);
|
||||
|
||||
preFight = true;
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_1, 2s);
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case 1:
|
||||
events.ScheduleEvent(EVENT_DALLIAH_DEATH, 6s);
|
||||
dalliahDeath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if (preFight)
|
||||
{
|
||||
preFight = false;
|
||||
dalliahTaunt = false;
|
||||
dalliahDeath = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
preFight = false;
|
||||
dalliahTaunt = false;
|
||||
dalliahDeath = false;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
if (dalliah->IsAlive() && !dalliah->IsInCombat())
|
||||
dalliah->AI()->SetData(1, 1);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_FELFIRE_SHOCK, 12s, 14s);
|
||||
events.ScheduleEvent(EVENT_KNOCK_AWAY, 11s, 12s);
|
||||
events.ScheduleEvent(EVENT_ME_FIRST, 6s);
|
||||
Talk(SAY_AGGRO);
|
||||
preFight = false;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (instance->GetData(DATA_CONVERSATION) == NOT_STARTED && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 70.0f))
|
||||
{
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_1);
|
||||
instance->SetData(DATA_CONVERSATION, DONE);
|
||||
|
||||
preFight = true;
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_1, 2s);
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case 1:
|
||||
events.ScheduleEvent(EVENT_DALLIAH_DEATH, 6s);
|
||||
dalliahDeath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if (preFight)
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_PREFIGHT_1:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_1);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_2, 3s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_2:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_2);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_3, 3s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_3:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_2);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_4, 6s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_4:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_3);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_5, 2s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_5:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_3);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_6, 3s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_6:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_4);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_7, 2s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_7:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->GetMotionMaster()->MovePoint(0, 118.6048f, 96.84852f, 22.44115f);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_8, 4s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_8:
|
||||
me->GetMotionMaster()->MovePoint(0, 122.1035f, 192.7203f, 22.44115f);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_9, 4s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_9:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
{
|
||||
dalliah->SetFacingToObject(me);
|
||||
me->SetFacingToObject(dalliah);
|
||||
dalliah->SetHomePosition(dalliah->GetPositionX(), dalliah->GetPositionY(), dalliah->GetPositionZ(), 1.51737f);
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 4.725722f);
|
||||
preFight = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dalliahDeath)
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_DALLIAH_DEATH:
|
||||
Talk(SAY_DALLIAH_DEATH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FELFIRE_SHOCK:
|
||||
DoCastVictim(SPELL_FELFIRE_SHOCK, true);
|
||||
events.ScheduleEvent(EVENT_FELFIRE_SHOCK, 12s, 14s);
|
||||
break;
|
||||
case EVENT_KNOCK_AWAY:
|
||||
DoCast(me, SPELL_KNOCK_AWAY);
|
||||
Talk(SAY_KNOCK_AWAY);
|
||||
events.ScheduleEvent(EVENT_KNOCK_AWAY, 11s, 12s);
|
||||
break;
|
||||
case EVENT_ME_FIRST:
|
||||
case EVENT_PREFIGHT_1:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
if (dalliah->IsAlive() && !dalliah->IsInCombat())
|
||||
dalliah->AI()->Talk(SAY_AGGRO_SOCCOTHRATES_FIRST);
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_1);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_2, 3s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_2:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_2);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_3, 3s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_3:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_2);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_4, 6s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_4:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_3);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_5, 2s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_5:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_3);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_6, 3s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_6:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_4);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_7, 2s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_7:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->GetMotionMaster()->MovePoint(0, 118.6048f, 96.84852f, 22.44115f);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_8, 4s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_8:
|
||||
me->GetMotionMaster()->MovePoint(0, 122.1035f, 192.7203f, 22.44115f);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_9, 4s);
|
||||
break;
|
||||
case EVENT_PREFIGHT_9:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
{
|
||||
dalliah->SetFacingToObject(me);
|
||||
me->SetFacingToObject(dalliah);
|
||||
dalliah->SetHomePosition(dalliah->GetPositionX(), dalliah->GetPositionY(), dalliah->GetPositionZ(), 1.51737f);
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 4.725722f);
|
||||
preFight = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(25) && !dalliahTaunt)
|
||||
{
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_SOCCOTHRATES_25_PERCENT);
|
||||
dalliahTaunt = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool preFight;
|
||||
bool dalliahTaunt;
|
||||
bool dalliahDeath;
|
||||
};
|
||||
if (dalliahDeath)
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetArcatrazAI<boss_wrath_scryer_soccothratesAI>(creature);
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_DALLIAH_DEATH:
|
||||
Talk(SAY_DALLIAH_DEATH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FELFIRE_SHOCK:
|
||||
DoCastVictim(SPELL_FELFIRE_SHOCK, true);
|
||||
events.ScheduleEvent(EVENT_FELFIRE_SHOCK, 12s, 14s);
|
||||
break;
|
||||
case EVENT_KNOCK_AWAY:
|
||||
DoCast(me, SPELL_KNOCK_AWAY);
|
||||
Talk(SAY_KNOCK_AWAY);
|
||||
events.ScheduleEvent(EVENT_KNOCK_AWAY, 11s, 12s);
|
||||
break;
|
||||
case EVENT_ME_FIRST:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
if (dalliah->IsAlive() && !dalliah->IsInCombat())
|
||||
dalliah->AI()->Talk(SAY_AGGRO_SOCCOTHRATES_FIRST);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(25) && !dalliahTaunt)
|
||||
{
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_SOCCOTHRATES_25_PERCENT);
|
||||
dalliahTaunt = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool preFight;
|
||||
bool dalliahTaunt;
|
||||
bool dalliahDeath;
|
||||
};
|
||||
|
||||
void AddSC_boss_wrath_scryer_soccothrates()
|
||||
{
|
||||
new boss_wrath_scryer_soccothrates();
|
||||
RegisterArcatrazCreatureAI(boss_wrath_scryer_soccothrates);
|
||||
}
|
||||
|
||||
@@ -41,88 +41,77 @@ enum Events
|
||||
EVENT_SEED_OF_CORRUPTION = 3
|
||||
};
|
||||
|
||||
class boss_zereketh_the_unbound : public CreatureScript
|
||||
struct boss_zereketh_the_unbound : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_zereketh_the_unbound() : CreatureScript("boss_zereketh_the_unbound") { }
|
||||
boss_zereketh_the_unbound(Creature* creature) : BossAI(creature, DATA_ZEREKETH) { }
|
||||
|
||||
struct boss_zereketh_the_unboundAI : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_VOID_ZONE, 6s, 10s);
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, 6s, 10s);
|
||||
events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, 12s, 20s);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
boss_zereketh_the_unboundAI(Creature* creature) : BossAI(creature, DATA_ZEREKETH) { }
|
||||
|
||||
void Reset() override
|
||||
switch (eventId)
|
||||
{
|
||||
_Reset();
|
||||
case EVENT_VOID_ZONE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
|
||||
DoCast(target, SPELL_VOID_ZONE);
|
||||
events.ScheduleEvent(EVENT_VOID_ZONE, 6s, 10s);
|
||||
break;
|
||||
case EVENT_SHADOW_NOVA:
|
||||
DoCastVictim(SPELL_SHADOW_NOVA, true);
|
||||
Talk(SAY_SHADOW_NOVA);
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, 6s, 10s);
|
||||
break;
|
||||
case EVENT_SEED_OF_CORRUPTION:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
|
||||
DoCast(target, SPELL_SEED_OF_CORRUPTION);
|
||||
events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, 12s, 20s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_VOID_ZONE, 6s, 10s);
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, 6s, 10s);
|
||||
events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, 12s, 20s);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_VOID_ZONE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
|
||||
DoCast(target, SPELL_VOID_ZONE);
|
||||
events.ScheduleEvent(EVENT_VOID_ZONE, 6s, 10s);
|
||||
break;
|
||||
case EVENT_SHADOW_NOVA:
|
||||
DoCastVictim(SPELL_SHADOW_NOVA, true);
|
||||
Talk(SAY_SHADOW_NOVA);
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, 6s, 10s);
|
||||
break;
|
||||
case EVENT_SEED_OF_CORRUPTION:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
|
||||
DoCast(target, SPELL_SEED_OF_CORRUPTION);
|
||||
events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, 12s, 20s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetArcatrazAI<boss_zereketh_the_unboundAI>(creature);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_zereketh_the_unbound()
|
||||
{
|
||||
new boss_zereketh_the_unbound();
|
||||
RegisterArcatrazCreatureAI(boss_zereketh_the_unbound);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user