Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_urok_doomhowl.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#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "blackrock_spire.h"
9
11{
12 SPELL_REND = 16509,
13 SPELL_STRIKE = 15580,
15};
16
17enum Says
18{
21};
22
29
31{
32public:
33 boss_urok_doomhowl() : CreatureScript("boss_urok_doomhowl") { }
34
36 {
38
40 {
41 _Reset();
42 }
43
44 void EnterCombat(Unit* /*who*/) OVERRIDE
45 {
47 events.ScheduleEvent(SPELL_REND, std::rand() % 20000 + 17000);
48 events.ScheduleEvent(SPELL_STRIKE, std::rand() % 12000 + 10000);
50 }
51
52 void JustDied(Unit* /*killer*/) OVERRIDE
53 {
54 _JustDied();
55 }
56
58 {
59 if (!UpdateVictim())
60 return;
61
62 events.Update(diff);
63
64 if (me->HasUnitState(UNIT_STATE_CASTING))
65 return;
66
67 while (uint32 eventId = events.ExecuteEvent())
68 {
69 switch (eventId)
70 {
71 case SPELL_REND:
73 events.ScheduleEvent(SPELL_REND, std::rand() % 10000 + 8000);
74 break;
75 case SPELL_STRIKE:
77 events.ScheduleEvent(SPELL_STRIKE, std::rand() % 10000 + 8000);
78 break;
79 default:
80 break;
81 }
82 }
84 }
85 };
86
88 {
89 return new boss_urok_doomhowlAI(creature);
90 }
91};
92
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ DATA_UROK_DOOMHOWL
#define SAY_AGGRO
@ SPELL_REND
@ EVENT_REND
void AddSC_boss_urok_doomhowl()
@ SPELL_STRIKE
@ SPELL_INTIMIDATING_ROAR
@ EVENT_INTIMIDATING_ROAR
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 DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Creature * me
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================