Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_lucifron.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/* ScriptData
7SDName: Boss_Lucifron
8SD%Complete: 100
9SDComment:
10SDCategory: Molten Core
11EndScriptData */
12
13#include "ObjectMgr.h"
14#include "ScriptMgr.h"
15#include "ScriptedCreature.h"
16#include "molten_core.h"
17
24
31
33{
34 public:
35 boss_lucifron() : CreatureScript("boss_lucifron") { }
36
37 struct boss_lucifronAI : public BossAI
38 {
40 {
41 }
42
44 {
45 BossAI::EnterCombat(victim);
46 events.ScheduleEvent(EVENT_IMPENDING_DOOM, 10000);
47 events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 20000);
48 events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000);
49 }
50
52 {
53 if (!UpdateVictim())
54 return;
55
56 events.Update(diff);
57
58 if (me->HasUnitState(UNIT_STATE_CASTING))
59 return;
60
61 while (uint32 eventId = events.ExecuteEvent())
62 {
63 switch (eventId)
64 {
67 events.ScheduleEvent(EVENT_IMPENDING_DOOM, 20000);
68 break;
71 events.ScheduleEvent(EVENT_LUCIFRON_CURSE, 15000);
72 break;
75 events.ScheduleEvent(EVENT_SHADOW_SHOCK, 6000);
76 break;
77 default:
78 break;
79 }
80 }
81
83 }
84 };
85
87 {
88 return new boss_lucifronAI(creature);
89 }
90};
91
93{
94 new boss_lucifron();
95}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ UNIT_STATE_CASTING
Definition Unit.h:527
void AddSC_boss_lucifron()
@ SPELL_LUCIFRON_CURSE
@ SPELL_IMPENDING_DOOM
@ SPELL_SHADOW_SHOCK
@ EVENT_IMPENDING_DOOM
@ EVENT_LUCIFRON_CURSE
@ EVENT_SHADOW_SHOCK
EventMap events
BossAI(Creature *creature, uint32 bossId)
void EnterCombat(Unit *) OVERRIDE
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ BOSS_LUCIFRON
Definition molten_core.h:11
Creature * me
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *victim) OVERRIDE
boss_lucifronAI(Creature *creature)