Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_nethermancer_sepethrea.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_Nethermancer_Sepethrea
8SD%Complete: 90
9SDComment: Need adjustments to initial summons
10SDCategory: Tempest Keep, The Mechanar
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "mechanar.h"
16
25
27{
28 SPELL_SUMMON_RAGIN_FLAMES = 35275, // Not scripted
34 H_SPELL_SUMMON_RAGIN_FLAMES = 39084, // Not scripted
35 SPELL_INFERNO = 35268, // Not scripted
36 H_SPELL_INFERNO = 39346, // Not scripted
37 SPELL_FIRE_TAIL = 35278 // Not scripted
38};
39
48
50{
51 public:
52 boss_nethermancer_sepethrea(): CreatureScript("boss_nethermancer_sepethrea") { }
53
55 {
57
59 {
61 events.ScheduleEvent(EVENT_FROST_ATTACK, std::rand() % 10000 + 7000);
62 events.ScheduleEvent(EVENT_ARCANE_BLAST, std::rand() % 18000 + 12000);
63 events.ScheduleEvent(EVENT_DRAGONS_BREATH, std::rand() % 22000 + 18000);
64 events.ScheduleEvent(EVENT_KNOCKBACK, std::rand() % 28000 + 22000);
65 events.ScheduleEvent(EVENT_SOLARBURN, 30000);
69 }
70
71 void KilledUnit(Unit* /*victim*/) OVERRIDE
72 {
74 }
75
76 void JustDied(Unit* /*killer*/) OVERRIDE
77 {
78 _JustDied();
80 }
81
83 {
84 if (!UpdateVictim())
85 return;
86
87 events.Update(diff);
88
89 if (me->HasUnitState(UNIT_STATE_CASTING))
90 return;
91
92 while (uint32 eventId = events.ExecuteEvent())
93 {
94 switch (eventId)
95 {
98 events.ScheduleEvent(EVENT_FROST_ATTACK, std::rand() % 10000 + 7000);
99 break;
102 events.ScheduleEvent(EVENT_ARCANE_BLAST, 15000);
103 break;
106 events.ScheduleEvent(EVENT_DRAGONS_BREATH, std::rand() % 22000 + 12000);
107 if (roll_chance_i(50))
109 break;
110 case EVENT_KNOCKBACK:
112 events.ScheduleEvent(EVENT_KNOCKBACK, std::rand() % 25000 + 15000);
113 break;
114 case EVENT_SOLARBURN:
116 events.ScheduleEvent(EVENT_SOLARBURN, 30000);
117 break;
118 default:
119 break;
120 }
121 }
122
124 }
125 };
126
128 {
129 return new boss_nethermancer_sepethreaAI(creature);
130 }
131};
132
134{
135 public:
136 npc_ragin_flames() : CreatureScript("npc_ragin_flames") { }
137
139 {
141 {
142 instance = creature->GetInstanceScript();
143 }
144
146
150
152
154 {
155 inferno_Timer = 10000;
156 flame_timer = 500;
157 Check_Timer = 2000;
158 onlyonce = false;
159 me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
160 me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
161 me->SetSpeed(MOVE_RUN, DUNGEON_MODE(0.5f, 0.7f));
162 }
163
164 void EnterCombat(Unit* /*who*/) OVERRIDE
165 {
166 }
167
169 {
170 //Check_Timer
171 if (Check_Timer <= diff)
172 {
173 if (instance)
174 {
176 {
177 //remove
178 me->setDeathState(DeathState::JUST_DIED);
179 me->RemoveCorpse();
180 }
181 }
182 Check_Timer = 1000;
183 } else Check_Timer -= diff;
184
185 if (!UpdateVictim())
186 return;
187
188 if (!onlyonce)
189 {
190 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
191 me->GetMotionMaster()->MoveChase(target);
192 onlyonce = true;
193 }
194
195 if (inferno_Timer <= diff)
196 {
198 me->TauntApply(me->GetVictim());
199 inferno_Timer = 10000;
200 } else inferno_Timer -= diff;
201
202 if (flame_timer <= diff)
203 {
205 flame_timer = 500;
206 } else flame_timer -=diff;
207
209 }
210 };
211
213 {
214 return new npc_ragin_flamesAI(creature);
215 }
216};
217
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ IN_PROGRESS
@ IMMUNITY_DAMAGE
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_SCHOOL_MASK_MAGIC
@ JUST_DIED
Definition Unit.h:504
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ MOVE_RUN
Definition Unit.h:556
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
bool roll_chance_i(int chance)
Definition Util.h:89
@ SAY_SLAY
@ SPELL_INFERNO
@ SPELL_ARCANE_BLAST
@ EVENT_ARCANE_BLAST
#define SAY_DEATH
#define SAY_AGGRO
void AddSC_boss_nethermancer_sepethrea()
EventMap events
BossAI(Creature *creature, uint32 bossId)
void _EnterCombat()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
InstanceScript * GetInstanceScript()
Definition Object.cpp:1612
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ DATA_NETHERMANCER_SEPRETHREA
Definition mechanar.h:16
Creature * me
ScriptedAI(Creature *creature)
const T & DUNGEON_MODE(const T &normal5, const T &heroic5) const
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================