refactor(Core/Scripts): Move AQ scripts to new scripting system (#12623)
This commit is contained in:
@@ -68,18 +68,13 @@ const Position LarvaPos[2] =
|
||||
{ -9701.6005f, 1566.9993f, 24.118f, 0.0f }
|
||||
};
|
||||
|
||||
class boss_ayamiss : public CreatureScript
|
||||
struct boss_ayamiss : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_ayamiss() : CreatureScript("boss_ayamiss") { }
|
||||
|
||||
struct boss_ayamissAI : public BossAI
|
||||
{
|
||||
boss_ayamissAI(Creature* creature) : BossAI(creature, DATA_AYAMISS) {}
|
||||
boss_ayamiss(Creature* creature) : BossAI(creature, DATA_AYAMISS) {}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
BossAI::Reset();
|
||||
_phase = PHASE_AIR;
|
||||
_enraged = false;
|
||||
SetCombatMovement(false);
|
||||
@@ -131,11 +126,11 @@ public:
|
||||
void EnterCombat(Unit* attacker) override
|
||||
{
|
||||
BossAI::EnterCombat(attacker);
|
||||
events.ScheduleEvent(EVENT_STINGER_SPRAY, urand(20000, 30000));
|
||||
events.ScheduleEvent(EVENT_POISON_STINGER, 5000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SWARMER, 5000);
|
||||
events.ScheduleEvent(EVENT_SWARMER_ATTACK, 60000);
|
||||
events.ScheduleEvent(EVENT_PARALYZE, 15000);
|
||||
events.ScheduleEvent(EVENT_STINGER_SPRAY, 20s, 30s);
|
||||
events.ScheduleEvent(EVENT_POISON_STINGER, 5s);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SWARMER, 5s);
|
||||
events.ScheduleEvent(EVENT_SWARMER_ATTACK, 60s);
|
||||
events.ScheduleEvent(EVENT_PARALYZE, 15s);
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePoint(POINT_AIR, AyamissAirPos);
|
||||
@@ -155,7 +150,7 @@ public:
|
||||
Position victimPos = victim->GetPosition();
|
||||
me->GetMotionMaster()->MovePoint(POINT_GROUND, victimPos);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_LASH, urand(5000, 8000));
|
||||
events.ScheduleEvent(EVENT_LASH, 5s, 8s);
|
||||
events.CancelEvent(EVENT_POISON_STINGER);
|
||||
DoResetThreat();
|
||||
}
|
||||
@@ -179,21 +174,21 @@ public:
|
||||
{
|
||||
case EVENT_STINGER_SPRAY:
|
||||
DoCastSelf(SPELL_STINGER_SPRAY);
|
||||
events.ScheduleEvent(EVENT_STINGER_SPRAY, urand(15000, 20000));
|
||||
events.ScheduleEvent(EVENT_STINGER_SPRAY, 15s, 20s);
|
||||
break;
|
||||
case EVENT_POISON_STINGER:
|
||||
DoCastVictim(SPELL_POISON_STINGER);
|
||||
events.ScheduleEvent(EVENT_POISON_STINGER, urand(2000, 3000));
|
||||
events.ScheduleEvent(EVENT_POISON_STINGER, 2s, 3s);
|
||||
break;
|
||||
case EVENT_PARALYZE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0, true))
|
||||
{
|
||||
DoCast(target, SPELL_PARALYZE);
|
||||
instance->SetGuidData(DATA_PARALYZED, target->GetGUID());
|
||||
uint8 Index = urand(0, 1);
|
||||
me->SummonCreature(NPC_LARVA, LarvaPos[Index], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
uint8 index = urand(0, 1);
|
||||
me->SummonCreature(NPC_LARVA, LarvaPos[index], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_PARALYZE, 15000);
|
||||
events.ScheduleEvent(EVENT_PARALYZE, 15s);
|
||||
break;
|
||||
case EVENT_SWARMER_ATTACK:
|
||||
for (ObjectGuid const& guid : _swarmers)
|
||||
@@ -207,18 +202,18 @@ public:
|
||||
}
|
||||
}
|
||||
_swarmers.clear();
|
||||
events.ScheduleEvent(EVENT_SWARMER_ATTACK, 60000);
|
||||
events.ScheduleEvent(EVENT_SWARMER_ATTACK, 60s);
|
||||
break;
|
||||
case EVENT_SUMMON_SWARMER:
|
||||
{
|
||||
Position Pos = me->GetRandomPoint(SwarmerPos, 80.0f);
|
||||
me->SummonCreature(NPC_SWARMER, Pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SWARMER, 5000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SWARMER, 5s);
|
||||
break;
|
||||
}
|
||||
case EVENT_LASH:
|
||||
DoCastVictim(SPELL_LASH);
|
||||
events.ScheduleEvent(EVENT_LASH, urand(8000, 15000));
|
||||
events.ScheduleEvent(EVENT_LASH, 8s, 15s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -230,20 +225,9 @@ public:
|
||||
bool _enraged;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
struct npc_hive_zara_larva : public ScriptedAI
|
||||
{
|
||||
return GetRuinsOfAhnQirajAI<boss_ayamissAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_hive_zara_larva : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_hive_zara_larva() : CreatureScript("npc_hive_zara_larva") { }
|
||||
|
||||
struct npc_hive_zara_larvaAI : public ScriptedAI
|
||||
{
|
||||
npc_hive_zara_larvaAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_hive_zara_larva(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = me->GetInstanceScript();
|
||||
}
|
||||
@@ -298,14 +282,8 @@ public:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetRuinsOfAhnQirajAI<npc_hive_zara_larvaAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_ayamiss()
|
||||
{
|
||||
new boss_ayamiss();
|
||||
new npc_hive_zara_larva();
|
||||
RegisterRuinsOfAhnQirajCreatureAI(boss_ayamiss);
|
||||
RegisterRuinsOfAhnQirajCreatureAI(npc_hive_zara_larva);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ struct boss_buru : public BossAI
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
_EnterCombat();
|
||||
BossAI::EnterCombat(who);
|
||||
Talk(EMOTE_TARGET, who);
|
||||
DoCastSelf(SPELL_THORNS);
|
||||
ManipulateEggs(true);
|
||||
|
||||
@@ -66,9 +66,9 @@ struct boss_moam : public BossAI
|
||||
{
|
||||
BossAI::EnterCombat(who);
|
||||
Talk(EMOTE_AGGRO);
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE, 90000);
|
||||
events.ScheduleEvent(EVENT_SPELL_TRAMPLE, 9000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_MANA, 3000);
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE, 90s);
|
||||
events.ScheduleEvent(EVENT_SPELL_TRAMPLE, 9s);
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_MANA, 3s);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -113,20 +113,20 @@ struct boss_moam : public BossAI
|
||||
DoCastAOE(SPELL_SUMMON_MANA_FIENDS);
|
||||
DoCastSelf(SPELL_ENERGIZE);
|
||||
events.CancelEvent(EVENT_SPELL_DRAIN_MANA);
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE_END, 90000);
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE_END, 90s);
|
||||
break;
|
||||
case EVENT_STONE_PHASE_END:
|
||||
me->RemoveAurasDueToSpell(SPELL_ENERGIZE);
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_MANA, urand(2000, 6000));
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE, 90000);
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_MANA, 2s, 6s);
|
||||
events.ScheduleEvent(EVENT_STONE_PHASE, 90s);
|
||||
break;
|
||||
case EVENT_SPELL_DRAIN_MANA:
|
||||
DoCastAOE(SPELL_DRAIN_MANA_SERVERSIDE);
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_MANA, urand(2000, 6000));
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_MANA, 2s, 6s);
|
||||
break;
|
||||
case EVENT_SPELL_TRAMPLE:
|
||||
DoCastAOE(SPELL_TRAMPLE);
|
||||
events.ScheduleEvent(EVENT_SPELL_TRAMPLE, 15000);
|
||||
events.ScheduleEvent(EVENT_SPELL_TRAMPLE, 15s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -46,18 +46,13 @@ enum Events
|
||||
EVENT_CHANGE_AGGRO = 3,
|
||||
};
|
||||
|
||||
class boss_rajaxx : public CreatureScript
|
||||
struct boss_rajaxx : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_rajaxx() : CreatureScript("boss_rajaxx") { }
|
||||
|
||||
struct boss_rajaxxAI : public BossAI
|
||||
{
|
||||
boss_rajaxxAI(Creature* creature) : BossAI(creature, DATA_RAJAXX) { }
|
||||
boss_rajaxx(Creature* creature) : BossAI(creature, DATA_RAJAXX) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
BossAI::Reset();
|
||||
enraged = false;
|
||||
}
|
||||
|
||||
@@ -70,8 +65,8 @@ public:
|
||||
void EnterCombat(Unit* /*victim*/) override
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_DISARM, 10000);
|
||||
events.ScheduleEvent(EVENT_THUNDERCRASH, 12000);
|
||||
events.ScheduleEvent(EVENT_DISARM, 10s);
|
||||
events.ScheduleEvent(EVENT_THUNDERCRASH, 12s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -90,11 +85,11 @@ public:
|
||||
{
|
||||
case EVENT_DISARM:
|
||||
DoCastVictim(SPELL_DISARM);
|
||||
events.ScheduleEvent(EVENT_DISARM, 22000);
|
||||
events.ScheduleEvent(EVENT_DISARM, 22s);
|
||||
break;
|
||||
case EVENT_THUNDERCRASH:
|
||||
DoCast(me, SPELL_THUNDERCRASH);
|
||||
events.ScheduleEvent(EVENT_THUNDERCRASH, 21000);
|
||||
DoCastSelf(SPELL_THUNDERCRASH);
|
||||
events.ScheduleEvent(EVENT_THUNDERCRASH, 21s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -107,12 +102,6 @@ public:
|
||||
bool enraged;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetRuinsOfAhnQirajAI<boss_rajaxxAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_rajaxx_thundercrash : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_rajaxx_thundercrash);
|
||||
@@ -136,6 +125,6 @@ class spell_rajaxx_thundercrash : public SpellScript
|
||||
|
||||
void AddSC_boss_rajaxx()
|
||||
{
|
||||
new boss_rajaxx();
|
||||
RegisterRuinsOfAhnQirajCreatureAI(boss_rajaxx);
|
||||
RegisterSpellScript(spell_rajaxx_thundercrash);
|
||||
}
|
||||
|
||||
@@ -454,9 +454,9 @@ class spell_vem_vengeance : public SpellScript
|
||||
|
||||
void AddSC_bug_trio()
|
||||
{
|
||||
RegisterCreatureAI(boss_kri);
|
||||
RegisterCreatureAI(boss_vem);
|
||||
RegisterCreatureAI(boss_yauj);
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_kri);
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_vem);
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_yauj);
|
||||
RegisterSpellScript(spell_vem_knockback);
|
||||
RegisterSpellScript(spell_vem_vengeance);
|
||||
}
|
||||
|
||||
@@ -142,19 +142,9 @@ public:
|
||||
//Kick out position
|
||||
const Position KickPos = { -8545.0f, 1984.0f, -96.0f, 0.0f};
|
||||
|
||||
class boss_eye_of_cthun : public CreatureScript
|
||||
struct boss_eye_of_cthun : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_eye_of_cthun() : CreatureScript("boss_eye_of_cthun") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<eye_of_cthunAI>(creature);
|
||||
}
|
||||
|
||||
struct eye_of_cthunAI : public ScriptedAI
|
||||
{
|
||||
eye_of_cthunAI(Creature* creature) : ScriptedAI(creature), _summons(creature)
|
||||
boss_eye_of_cthun(Creature* creature) : ScriptedAI(creature), _summons(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
@@ -223,12 +213,14 @@ public:
|
||||
|
||||
void ScheduleTasks()
|
||||
{
|
||||
_scheduler.Schedule(3s, [this](TaskContext task)
|
||||
_scheduler.
|
||||
Schedule(3s, [this](TaskContext task)
|
||||
{
|
||||
DoCastRandomTarget(SPELL_GREEN_BEAM);
|
||||
task.SetGroup(GROUP_BEAM_PHASE);
|
||||
task.Repeat();
|
||||
}).Schedule(12s, [this](TaskContext task)
|
||||
})
|
||||
.Schedule(12s, [this](TaskContext task)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
@@ -240,12 +232,14 @@ public:
|
||||
|
||||
task.SetGroup(GROUP_BEAM_PHASE);
|
||||
task.Repeat();
|
||||
}).Schedule(45s, [this](TaskContext task)
|
||||
})
|
||||
.Schedule(45s, [this](TaskContext task)
|
||||
{
|
||||
DoAction(ACTION_SPAWN_EYE_TENTACLES);
|
||||
task.SetGroup(GROUP_BEAM_PHASE);
|
||||
task.Repeat();
|
||||
}).Schedule(50s, [this](TaskContext /*task*/)
|
||||
})
|
||||
.Schedule(50s, [this](TaskContext /*task*/)
|
||||
{
|
||||
_scheduler.CancelGroup(GROUP_BEAM_PHASE);
|
||||
|
||||
@@ -405,21 +399,10 @@ public:
|
||||
TaskScheduler _scheduler;
|
||||
SummonList _summons;
|
||||
};
|
||||
};
|
||||
|
||||
class boss_cthun : public CreatureScript
|
||||
struct boss_cthun : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_cthun() : CreatureScript("boss_cthun") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<cthunAI>(creature);
|
||||
}
|
||||
|
||||
struct cthunAI : public ScriptedAI
|
||||
{
|
||||
cthunAI(Creature* creature) : ScriptedAI(creature)
|
||||
boss_cthun(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
@@ -840,21 +823,10 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class npc_eye_tentacle : public CreatureScript
|
||||
struct npc_eye_tentacle : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_eye_tentacle() : CreatureScript("npc_eye_tentacle") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new eye_tentacleAI(creature);
|
||||
}
|
||||
|
||||
struct eye_tentacleAI : public ScriptedAI
|
||||
{
|
||||
eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_eye_tentacle(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
if (Creature* portal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
@@ -878,10 +850,12 @@ public:
|
||||
_scheduler.Schedule(500ms, [this](TaskContext /*task*/)
|
||||
{
|
||||
DoCastAOE(SPELL_GROUND_RUPTURE);
|
||||
}).Schedule(5min, [this](TaskContext /*task*/)
|
||||
})
|
||||
.Schedule(5min, [this](TaskContext /*task*/)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
}).Schedule(1s, 5s, [this](TaskContext context)
|
||||
})
|
||||
.Schedule(1s, 5s, [this](TaskContext context)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [&](Unit* u) { return u && u->GetTypeId() == TYPEID_PLAYER && !u->HasAura(SPELL_DIGESTIVE_ACID) && !u->HasAura(SPELL_MIND_FLAY); }))
|
||||
{
|
||||
@@ -910,21 +884,10 @@ public:
|
||||
TaskScheduler _scheduler;
|
||||
ObjectGuid _portalGUID;
|
||||
};
|
||||
};
|
||||
|
||||
class npc_claw_tentacle : public CreatureScript
|
||||
struct npc_claw_tentacle : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_claw_tentacle() : CreatureScript("npc_claw_tentacle") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new claw_tentacleAI(creature);
|
||||
}
|
||||
|
||||
struct claw_tentacleAI : public ScriptedAI
|
||||
{
|
||||
claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_claw_tentacle(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
@@ -980,21 +943,10 @@ public:
|
||||
TaskScheduler _scheduler;
|
||||
ObjectGuid _portalGUID;
|
||||
};
|
||||
};
|
||||
|
||||
class npc_giant_claw_tentacle : public CreatureScript
|
||||
struct npc_giant_claw_tentacle : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_giant_claw_tentacle() : CreatureScript("npc_giant_claw_tentacle") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new giant_claw_tentacleAI(creature);
|
||||
}
|
||||
|
||||
struct giant_claw_tentacleAI : public ScriptedAI
|
||||
{
|
||||
giant_claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_giant_claw_tentacle(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
@@ -1029,7 +981,8 @@ public:
|
||||
{
|
||||
DoCastVictim(SPELL_HAMSTRING);
|
||||
context.Repeat(10s);
|
||||
}).Schedule(5s, [this](TaskContext context) {
|
||||
}).Schedule(5s, [this](TaskContext context)
|
||||
{
|
||||
DoCastSelf(SPELL_THRASH);
|
||||
context.Repeat(10s);
|
||||
});
|
||||
@@ -1121,21 +1074,10 @@ public:
|
||||
TaskScheduler _scheduler;
|
||||
ObjectGuid _portalGUID;
|
||||
};
|
||||
};
|
||||
|
||||
class npc_giant_eye_tentacle : public CreatureScript
|
||||
struct npc_giant_eye_tentacle : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_giant_eye_tentacle() : CreatureScript("npc_giant_eye_tentacle") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new giant_eye_tentacleAI(creature);
|
||||
}
|
||||
|
||||
struct giant_eye_tentacleAI : public ScriptedAI
|
||||
{
|
||||
giant_eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_giant_eye_tentacle(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
@@ -1159,7 +1101,8 @@ public:
|
||||
_scheduler.Schedule(500ms, [this](TaskContext /*task*/)
|
||||
{
|
||||
DoCastAOE(SPELL_MASSIVE_GROUND_RUPTURE);
|
||||
}).Schedule(1s, 5s, [this](TaskContext context) {
|
||||
}).Schedule(1s, 5s, [this](TaskContext context)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_DIGESTIVE_ACID))
|
||||
{
|
||||
DoCast(target, SPELL_GREEN_BEAM);
|
||||
@@ -1187,16 +1130,13 @@ public:
|
||||
TaskScheduler _scheduler;
|
||||
ObjectGuid _portalGUID;
|
||||
};
|
||||
};
|
||||
|
||||
//GetAIs
|
||||
|
||||
void AddSC_boss_cthun()
|
||||
{
|
||||
new boss_eye_of_cthun();
|
||||
new boss_cthun();
|
||||
new npc_eye_tentacle();
|
||||
new npc_claw_tentacle();
|
||||
new npc_giant_claw_tentacle();
|
||||
new npc_giant_eye_tentacle();
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_eye_of_cthun);
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_cthun);
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_eye_tentacle);
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_claw_tentacle);
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_giant_claw_tentacle);
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_giant_eye_tentacle);
|
||||
}
|
||||
|
||||
@@ -42,19 +42,9 @@ enum Spells
|
||||
SPELL_ENRAGE = 28798
|
||||
};
|
||||
|
||||
class boss_fankriss : public CreatureScript
|
||||
struct boss_fankriss : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_fankriss() : CreatureScript("boss_fankriss") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<boss_fankrissAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_fankrissAI : public ScriptedAI
|
||||
{
|
||||
boss_fankrissAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
boss_fankriss(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void SummonSpawn()
|
||||
{
|
||||
@@ -87,10 +77,14 @@ public:
|
||||
{
|
||||
_scheduler.CancelAll();
|
||||
|
||||
_scheduler.Schedule(4s, 8s, [this](TaskContext context) {
|
||||
_scheduler
|
||||
.Schedule(4s, 8s, [this](TaskContext context)
|
||||
{
|
||||
DoCastVictim(SPELL_MORTAL_WOUND);
|
||||
context.Repeat();
|
||||
}).Schedule(15s, 45s, [this](TaskContext context) {
|
||||
})
|
||||
.Schedule(15s, 45s, [this](TaskContext context)
|
||||
{
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
@@ -107,7 +101,9 @@ public:
|
||||
break;
|
||||
}
|
||||
context.Repeat(30s, 60s);
|
||||
}).Schedule(15s, 45s, [this](TaskContext context) {
|
||||
})
|
||||
.Schedule(15s, 45s, [this](TaskContext context)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_ROOT);
|
||||
@@ -160,9 +156,8 @@ public:
|
||||
float RandX;
|
||||
float RandY;
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_fankriss()
|
||||
{
|
||||
new boss_fankriss();
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_fankriss);
|
||||
}
|
||||
|
||||
@@ -41,19 +41,9 @@ enum Huhuran
|
||||
SPELL_WYVERN_STING_DAMAGE = 26233
|
||||
};
|
||||
|
||||
class boss_huhuran : public CreatureScript
|
||||
struct boss_huhuran : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_huhuran() : CreatureScript("boss_huhuran") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<boss_huhuranAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_huhuranAI : public ScriptedAI
|
||||
{
|
||||
boss_huhuranAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
boss_huhuran(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 Frenzy_Timer;
|
||||
uint32 Wyvern_Timer;
|
||||
@@ -150,7 +140,6 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// 26180 - Wyvern Sting
|
||||
class spell_huhuran_wyvern_sting : public AuraScript
|
||||
@@ -173,6 +162,6 @@ class spell_huhuran_wyvern_sting : public AuraScript
|
||||
|
||||
void AddSC_boss_huhuran()
|
||||
{
|
||||
new boss_huhuran();
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_huhuran);
|
||||
RegisterSpellScript(spell_huhuran_wyvern_sting);
|
||||
}
|
||||
|
||||
@@ -36,19 +36,9 @@ enum Spells
|
||||
SPELL_SUMMON_OURO = 26061
|
||||
};
|
||||
|
||||
class npc_ouro_spawner : public CreatureScript
|
||||
struct npc_ouro_spawner : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_ouro_spawner() : CreatureScript("npc_ouro_spawner") {}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_ouro_spawnerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ouro_spawnerAI : public ScriptedAI
|
||||
{
|
||||
npc_ouro_spawnerAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_ouro_spawner(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
@@ -85,21 +75,10 @@ public:
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
class boss_ouro : public CreatureScript
|
||||
struct boss_ouro : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_ouro() : CreatureScript("boss_ouro") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<boss_ouroAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_ouroAI : public ScriptedAI
|
||||
{
|
||||
boss_ouroAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
boss_ouro(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 Sweep_Timer;
|
||||
uint32 SandBlast_Timer;
|
||||
@@ -193,10 +172,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_ouro()
|
||||
{
|
||||
new npc_ouro_spawner();
|
||||
new boss_ouro();
|
||||
RegisterTempleOfAhnQirajCreatureAI(npc_ouro_spawner);
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_ouro);
|
||||
}
|
||||
|
||||
@@ -47,14 +47,9 @@ enum Events
|
||||
|
||||
uint32 const BlinkSpells[3] = { 4801, 8195, 20449 };
|
||||
|
||||
class boss_skeram : public CreatureScript
|
||||
struct boss_skeram : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_skeram() : CreatureScript("boss_skeram") { }
|
||||
|
||||
struct boss_skeramAI : public BossAI
|
||||
{
|
||||
boss_skeramAI(Creature* creature) : BossAI(creature, DATA_SKERAM) { }
|
||||
boss_skeram(Creature* creature) : BossAI(creature, DATA_SKERAM) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -127,10 +122,10 @@ public:
|
||||
_EnterCombat();
|
||||
events.Reset();
|
||||
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(6000, 12000));
|
||||
events.ScheduleEvent(EVENT_FULLFILMENT, 15000);
|
||||
events.ScheduleEvent(EVENT_BLINK, urand(30000, 45000));
|
||||
events.ScheduleEvent(EVENT_EARTH_SHOCK, 2000);
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 6s, 12s);
|
||||
events.ScheduleEvent(EVENT_FULLFILMENT, 15s);
|
||||
events.ScheduleEvent(EVENT_BLINK, 30s, 45s);
|
||||
events.ScheduleEvent(EVENT_EARTH_SHOCK, 2s);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
@@ -148,23 +143,23 @@ public:
|
||||
{
|
||||
case EVENT_ARCANE_EXPLOSION:
|
||||
DoCastAOE(SPELL_ARCANE_EXPLOSION, true);
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(8000, 18000));
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, 8s, 18s);
|
||||
break;
|
||||
case EVENT_FULLFILMENT:
|
||||
/// @todo For some weird reason boss does not cast this
|
||||
// Spell actually works, tested in duel
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true), SPELL_TRUE_FULFILLMENT, true);
|
||||
events.ScheduleEvent(EVENT_FULLFILMENT, urand(20000, 30000));
|
||||
events.ScheduleEvent(EVENT_FULLFILMENT, 20s, 30s);
|
||||
break;
|
||||
case EVENT_BLINK:
|
||||
DoCast(me, BlinkSpells[urand(0, 2)]);
|
||||
DoResetThreat();
|
||||
me->SetVisible(true);
|
||||
events.ScheduleEvent(EVENT_BLINK, urand(10000, 30000));
|
||||
events.ScheduleEvent(EVENT_BLINK, 10s, 30s);
|
||||
break;
|
||||
case EVENT_EARTH_SHOCK:
|
||||
DoCastVictim(SPELL_EARTH_SHOCK);
|
||||
events.ScheduleEvent(EVENT_EARTH_SHOCK, 2000);
|
||||
events.ScheduleEvent(EVENT_EARTH_SHOCK, 2s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -175,12 +170,12 @@ public:
|
||||
Talk(SAY_SPLIT);
|
||||
_hpct -= 25.0f;
|
||||
me->SetVisible(false);
|
||||
events.RescheduleEvent(EVENT_BLINK, 2000);
|
||||
events.RescheduleEvent(EVENT_BLINK, 2s);
|
||||
}
|
||||
|
||||
if (me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
events.RescheduleEvent(EVENT_EARTH_SHOCK, 2000);
|
||||
events.RescheduleEvent(EVENT_EARTH_SHOCK, 2s);
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
@@ -190,20 +185,9 @@ public:
|
||||
uint8 _flag;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
class spell_skeram_arcane_explosion : public SpellScript
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<boss_skeramAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_skeram_arcane_explosion : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_skeram_arcane_explosion() : SpellScriptLoader("spell_skeram_arcane_explosion") { }
|
||||
|
||||
class spell_skeram_arcane_explosion_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_skeram_arcane_explosion_SpellScript);
|
||||
PrepareSpellScript(spell_skeram_arcane_explosion);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
@@ -212,18 +196,12 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_skeram_arcane_explosion_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_skeram_arcane_explosion_SpellScript();
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_skeram_arcane_explosion::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_skeram()
|
||||
{
|
||||
new boss_skeram();
|
||||
new spell_skeram_arcane_explosion();
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_skeram);
|
||||
RegisterSpellScript(spell_skeram_arcane_explosion);
|
||||
}
|
||||
|
||||
@@ -377,20 +377,11 @@ struct boss_twinemperorsAI : public ScriptedAI
|
||||
}
|
||||
};
|
||||
|
||||
class boss_veknilash : public CreatureScript
|
||||
struct boss_veknilash : public boss_twinemperorsAI
|
||||
{
|
||||
public:
|
||||
boss_veknilash() : CreatureScript("boss_veknilash") { }
|
||||
boss_veknilash(Creature* creature) : boss_twinemperorsAI(creature) { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<boss_veknilashAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_veknilashAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() override { return false; }
|
||||
boss_veknilashAI(Creature* creature) : boss_twinemperorsAI(creature) { }
|
||||
|
||||
uint32 UpperCut_Timer;
|
||||
uint32 UnbalancingStrike_Timer;
|
||||
@@ -463,22 +454,12 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class boss_veklor : public CreatureScript
|
||||
struct boss_veklor : public boss_twinemperorsAI
|
||||
{
|
||||
public:
|
||||
boss_veklor() : CreatureScript("boss_veklor") { }
|
||||
boss_veklor(Creature* creature) : boss_twinemperorsAI(creature) { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<boss_veklorAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_veklorAI : public boss_twinemperorsAI
|
||||
{
|
||||
bool IAmVeklor() override { return true; }
|
||||
boss_veklorAI(Creature* creature) : boss_twinemperorsAI(creature) { }
|
||||
|
||||
uint32 ShadowBolt_Timer;
|
||||
uint32 Blizzard_Timer;
|
||||
@@ -590,10 +571,9 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_twinemperors()
|
||||
{
|
||||
new boss_veknilash();
|
||||
new boss_veklor();
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_veknilash);
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_veklor);
|
||||
}
|
||||
|
||||
@@ -84,14 +84,9 @@ enum MovePoints
|
||||
Position const ViscidusCoord = { -7992.36f, 908.19f, -52.62f, 1.68f }; /// @todo Visci isn't in room middle
|
||||
float const RoomRadius = 40.0f; /// @todo Not sure if its correct
|
||||
|
||||
class boss_viscidus : public CreatureScript
|
||||
struct boss_viscidus : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_viscidus() : CreatureScript("boss_viscidus") { }
|
||||
|
||||
struct boss_viscidusAI : public BossAI
|
||||
{
|
||||
boss_viscidusAI(Creature* creature) : BossAI(creature, DATA_VISCIDUS) { }
|
||||
boss_viscidus(Creature* creature) : BossAI(creature, DATA_VISCIDUS) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -178,8 +173,8 @@ public:
|
||||
void InitSpells()
|
||||
{
|
||||
DoCast(me, SPELL_TOXIN);
|
||||
events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
|
||||
events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
|
||||
events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, 10s, 15s);
|
||||
events.ScheduleEvent(EVENT_POISON_SHOCK, 7s, 12s);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
@@ -221,11 +216,11 @@ public:
|
||||
{
|
||||
case EVENT_POISONBOLT_VOLLEY:
|
||||
DoCast(me, SPELL_POISONBOLT_VOLLEY);
|
||||
events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000));
|
||||
events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, 10s, 15s);
|
||||
break;
|
||||
case EVENT_POISON_SHOCK:
|
||||
DoCast(me, SPELL_POISON_SHOCK);
|
||||
events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000));
|
||||
events.ScheduleEvent(EVENT_POISON_SHOCK, 7s, 12s);
|
||||
break;
|
||||
case EVENT_RESET_PHASE:
|
||||
_hitcounter = 0;
|
||||
@@ -245,39 +240,28 @@ public:
|
||||
Phases _phase;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
struct boss_glob_of_viscidus : public ScriptedAI
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<boss_viscidusAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_glob_of_viscidus : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_glob_of_viscidus() : CreatureScript("boss_glob_of_viscidus") { }
|
||||
|
||||
struct npc_glob_of_viscidusAI : public ScriptedAI
|
||||
{
|
||||
npc_glob_of_viscidusAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
boss_glob_of_viscidus(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
InstanceScript* Instance = me->GetInstanceScript();
|
||||
InstanceScript* instance = me->GetInstanceScript();
|
||||
|
||||
if (Creature* Viscidus = me->GetMap()->GetCreature(Instance->GetGuidData(DATA_VISCIDUS)))
|
||||
if (Creature* viscidus = me->GetMap()->GetCreature(instance->GetGuidData(DATA_VISCIDUS)))
|
||||
{
|
||||
if (BossAI* ViscidusAI = dynamic_cast<BossAI*>(Viscidus->GetAI()))
|
||||
ViscidusAI->SummonedCreatureDespawn(me);
|
||||
if (BossAI* viscidusAI = dynamic_cast<BossAI*>(viscidus->GetAI()))
|
||||
viscidusAI->SummonedCreatureDespawn(me);
|
||||
|
||||
if (Viscidus->IsAlive() && Viscidus->GetHealthPct() < 5.0f)
|
||||
if (viscidus->IsAlive() && viscidus->GetHealthPct() < 5.0f)
|
||||
{
|
||||
Viscidus->SetVisible(true);
|
||||
Unit::Kill(Viscidus->GetVictim(), Viscidus);
|
||||
viscidus->SetVisible(true);
|
||||
Unit::Kill(viscidus->GetVictim(), viscidus);
|
||||
}
|
||||
else
|
||||
{
|
||||
Viscidus->SetHealth(Viscidus->GetHealth() - Viscidus->GetMaxHealth() / 20);
|
||||
Viscidus->CastSpell(Viscidus, SPELL_VISCIDUS_SHRINKS);
|
||||
viscidus->SetHealth(viscidus->GetHealth() - viscidus->GetMaxHealth() / 20);
|
||||
viscidus->CastSpell(viscidus, SPELL_VISCIDUS_SHRINKS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,14 +277,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetTempleOfAhnQirajAI<npc_glob_of_viscidusAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_viscidus()
|
||||
{
|
||||
new boss_viscidus();
|
||||
new npc_glob_of_viscidus();
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_viscidus);
|
||||
RegisterTempleOfAhnQirajCreatureAI(boss_glob_of_viscidus);
|
||||
}
|
||||
|
||||
@@ -75,4 +75,6 @@ inline AI* GetTempleOfAhnQirajAI(T* obj)
|
||||
return GetInstanceAI<AI>(obj, TempleOfAhnQirajScriptName);
|
||||
}
|
||||
|
||||
#define RegisterTempleOfAhnQirajCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetTempleOfAhnQirajAI)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user