@@ -0,0 +1,3 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid` = 18104 AND `source_type` = 0;
|
||||||
|
UPDATE `creature_template` SET `speed_run` = 3, `AIName` = '', `ScriptName` = 'npc_doomfire_spirit' WHERE `entry` = 18104;
|
||||||
@@ -99,6 +99,7 @@ Position const nordrassilPosition = { 5503.713f, -3523.436f, 1608.781f, 0.0f };
|
|||||||
|
|
||||||
float const DOOMFIRE_OFFSET = 15.0f;
|
float const DOOMFIRE_OFFSET = 15.0f;
|
||||||
uint8 const WISP_OFFSET = 40;
|
uint8 const WISP_OFFSET = 40;
|
||||||
|
uint8 NEAR_POINT = 0;
|
||||||
|
|
||||||
struct npc_ancient_wisp : public ScriptedAI
|
struct npc_ancient_wisp : public ScriptedAI
|
||||||
{
|
{
|
||||||
@@ -148,6 +149,39 @@ private:
|
|||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct npc_doomfire_spirit : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_doomfire_spirit(Creature* creature) : ScriptedAI(creature)
|
||||||
|
{
|
||||||
|
_instance = creature->GetInstanceScript();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
scheduler.CancelAll();
|
||||||
|
ScheduleTimedEvent(0s, [&]{
|
||||||
|
if (Creature* archimonde = _instance->GetCreature(DATA_ARCHIMONDE))
|
||||||
|
{
|
||||||
|
Position randomNearPosition = archimonde->GetRandomNearPosition(100.0f);
|
||||||
|
me->GetMotionMaster()->MovePoint(NEAR_POINT, randomNearPosition);
|
||||||
|
}
|
||||||
|
}, 2s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
scheduler.Update(diff);
|
||||||
|
|
||||||
|
if (!UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
InstanceScript* _instance;
|
||||||
|
};
|
||||||
|
|
||||||
struct boss_archimonde : public BossAI
|
struct boss_archimonde : public BossAI
|
||||||
{
|
{
|
||||||
boss_archimonde(Creature* creature) : BossAI(creature, DATA_ARCHIMONDE)
|
boss_archimonde(Creature* creature) : BossAI(creature, DATA_ARCHIMONDE)
|
||||||
@@ -262,10 +296,7 @@ struct boss_archimonde : public BossAI
|
|||||||
}, 25s, 40s);
|
}, 25s, 40s);
|
||||||
ScheduleTimedEvent(25s, 35s, [&]
|
ScheduleTimedEvent(25s, 35s, [&]
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
|
DoCastDoomFire();
|
||||||
{
|
|
||||||
DoCastDoomFire(target);
|
|
||||||
}
|
|
||||||
}, 20s);
|
}, 20s);
|
||||||
ScheduleTimedEvent(25s, 35s, [&]
|
ScheduleTimedEvent(25s, 35s, [&]
|
||||||
{
|
{
|
||||||
@@ -391,12 +422,12 @@ struct boss_archimonde : public BossAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoCastDoomFire(Unit* target)
|
void DoCastDoomFire()
|
||||||
{
|
{
|
||||||
// hack because spell doesn't work?
|
// hack because spell doesn't work?
|
||||||
Talk(SAY_DOOMFIRE);
|
Talk(SAY_DOOMFIRE);
|
||||||
Position spiritPosition = { target->GetPositionX() + DOOMFIRE_OFFSET, target->GetPositionY() + DOOMFIRE_OFFSET, target->GetPositionZ(), 0.0f };
|
Position spiritPosition = { me->GetPositionX() + DOOMFIRE_OFFSET, me->GetPositionY() + DOOMFIRE_OFFSET, me->GetPositionZ(), 0.0f };
|
||||||
Position doomfirePosition = { target->GetPositionX() - DOOMFIRE_OFFSET, target->GetPositionY() - DOOMFIRE_OFFSET, target->GetPositionZ(), 0.0f };
|
Position doomfirePosition = { me->GetPositionX() - DOOMFIRE_OFFSET, me->GetPositionY() - DOOMFIRE_OFFSET, me->GetPositionZ(), 0.0f };
|
||||||
if (Creature* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
|
if (Creature* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
|
||||||
{
|
{
|
||||||
if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
|
if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
|
||||||
@@ -508,5 +539,6 @@ void AddSC_boss_archimonde()
|
|||||||
RegisterSpellScript(spell_finger_of_death);
|
RegisterSpellScript(spell_finger_of_death);
|
||||||
RegisterHyjalAI(boss_archimonde);
|
RegisterHyjalAI(boss_archimonde);
|
||||||
RegisterHyjalAI(npc_ancient_wisp);
|
RegisterHyjalAI(npc_ancient_wisp);
|
||||||
|
RegisterHyjalAI(npc_doomfire_spirit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user