fix(Scripts/SunwellPlateau): Add Blink with Nove Arch Mage (#21904)
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET
|
||||||
|
`ScriptName` = 'npc_sunblade_arch_mage',
|
||||||
|
`AIName` = ''
|
||||||
|
WHERE `entry` = 25367;
|
||||||
|
|
||||||
|
DELETE FROM `creature_template_spell` WHERE `CreatureID` = 25367 AND `Index` IN (0, 1, 2);
|
||||||
|
INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES
|
||||||
|
(25367, 0, 46553, 0), -- Arcane Explosion
|
||||||
|
(25367, 1, 28401, 0), -- Blink
|
||||||
|
(25367, 2, 46555, 0); -- Frost Nova
|
||||||
@@ -282,10 +282,65 @@ private:
|
|||||||
uint32 _triggeredSpellId;
|
uint32 _triggeredSpellId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum SunbladeArchMageSpells
|
||||||
|
{
|
||||||
|
SPELL_ARCANE_EXPLOSION = 46553,
|
||||||
|
SPELL_BLINK = 28401,
|
||||||
|
SPELL_FROST_NOVA = 46555
|
||||||
|
};
|
||||||
|
|
||||||
|
struct npc_sunblade_arch_mage : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_sunblade_arch_mage(Creature* creature) : ScriptedAI(creature)
|
||||||
|
{
|
||||||
|
scheduler.SetValidator([this]
|
||||||
|
{
|
||||||
|
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
scheduler.CancelAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
scheduler.Schedule(6s, 12s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
||||||
|
context.Repeat(12s, 18s);
|
||||||
|
});
|
||||||
|
|
||||||
|
scheduler.Schedule(8s, 15s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||||
|
{
|
||||||
|
DoCast(target, SPELL_BLINK, true);
|
||||||
|
DoCastAOE(SPELL_FROST_NOVA, true);
|
||||||
|
}
|
||||||
|
context.Repeat(20s, 25s);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
if (!UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
|
scheduler.Update(diff);
|
||||||
|
DoMeleeAttackIfReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
TaskScheduler scheduler;
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_instance_sunwell_plateau()
|
void AddSC_instance_sunwell_plateau()
|
||||||
{
|
{
|
||||||
new instance_sunwell_plateau();
|
new instance_sunwell_plateau();
|
||||||
RegisterSpellScript(spell_cataclysm_breath);
|
RegisterSpellScript(spell_cataclysm_breath);
|
||||||
|
RegisterSunwellPlateauCreatureAI(npc_sunblade_arch_mage);
|
||||||
RegisterSunwellPlateauCreatureAI(npc_sunblade_scout);
|
RegisterSunwellPlateauCreatureAI(npc_sunblade_scout);
|
||||||
RegisterSpellScriptWithArgs(spell_sunwell_teleport, "spell_teleport_to_apex_point", SPELL_TELEPORT_TO_APEX_POINT);
|
RegisterSpellScriptWithArgs(spell_sunwell_teleport, "spell_teleport_to_apex_point", SPELL_TELEPORT_TO_APEX_POINT);
|
||||||
RegisterSpellScriptWithArgs(spell_sunwell_teleport, "spell_teleport_to_witchs_sanctum", SPELL_TELEPORT_TO_WITCHS_SANCTUM);
|
RegisterSpellScriptWithArgs(spell_sunwell_teleport, "spell_teleport_to_witchs_sanctum", SPELL_TELEPORT_TO_WITCHS_SANCTUM);
|
||||||
|
|||||||
Reference in New Issue
Block a user