fix(Core/Script): Molten Core: Lucifron (#5655)
Co-authored-by: @sanctum32 Co-authored-by: @t1ti
This commit is contained in:
@@ -11,10 +11,9 @@ SDComment:
|
|||||||
SDCategory: Molten Core
|
SDCategory: Molten Core
|
||||||
EndScriptData */
|
EndScriptData */
|
||||||
|
|
||||||
#include "molten_core.h"
|
|
||||||
#include "ObjectMgr.h"
|
|
||||||
#include "ScriptedCreature.h"
|
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
|
#include "ScriptedCreature.h"
|
||||||
|
#include "molten_core.h"
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
@@ -41,42 +40,50 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* victim) override
|
void EnterCombat(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
BossAI::EnterCombat(victim);
|
_EnterCombat();
|
||||||
events.ScheduleEvent(EVENT_IMPENDING_DOOM, 10000);
|
events.ScheduleEvent(EVENT_IMPENDING_DOOM, urand(6000, 11000));
|
||||||
events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 20000);
|
events.ScheduleEvent(EVENT_LUCIFRON_CURSE, urand(11000, 14000));
|
||||||
events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000);
|
events.ScheduleEvent(EVENT_SHADOW_SHOCK, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while (uint32 eventId = events.ExecuteEvent())
|
while (uint32 const eventId = events.ExecuteEvent())
|
||||||
{
|
{
|
||||||
switch (eventId)
|
switch (eventId)
|
||||||
{
|
{
|
||||||
case EVENT_IMPENDING_DOOM:
|
case EVENT_IMPENDING_DOOM:
|
||||||
|
{
|
||||||
DoCastVictim(SPELL_IMPENDING_DOOM);
|
DoCastVictim(SPELL_IMPENDING_DOOM);
|
||||||
events.ScheduleEvent(EVENT_IMPENDING_DOOM, 20000);
|
events.RepeatEvent(20000);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case EVENT_LUCIFRON_CURSE:
|
case EVENT_LUCIFRON_CURSE:
|
||||||
|
{
|
||||||
DoCastVictim(SPELL_LUCIFRON_CURSE);
|
DoCastVictim(SPELL_LUCIFRON_CURSE);
|
||||||
events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 15000);
|
events.RepeatEvent(20000);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case EVENT_SHADOW_SHOCK:
|
case EVENT_SHADOW_SHOCK:
|
||||||
|
{
|
||||||
DoCastVictim(SPELL_SHADOW_SHOCK);
|
DoCastVictim(SPELL_SHADOW_SHOCK);
|
||||||
events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000);
|
events.RepeatEvent(5000);
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user