Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_warmaster_voone.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{
13 SPELL_CLEAVE = 15579,
16 SPELL_PUMMEL = 15615,
18};
19
29
31{
32public:
33 boss_warmaster_voone() : CreatureScript("boss_warmaster_voone") { }
34
36 {
37 return new boss_warmastervooneAI(creature);
38 }
39
41 {
43
45 {
46 _Reset();
47 }
48
49 void EnterCombat(Unit* /*who*/) OVERRIDE
50 {
52 events.ScheduleEvent(EVENT_SNAP_KICK, 8 * IN_MILLISECONDS);
53 events.ScheduleEvent(EVENT_CLEAVE, 14 * IN_MILLISECONDS);
54 events.ScheduleEvent(EVENT_UPPERCUT, 20 * IN_MILLISECONDS);
55 events.ScheduleEvent(EVENT_MORTAL_STRIKE, 12 * IN_MILLISECONDS);
56 events.ScheduleEvent(EVENT_PUMMEL, 32 * IN_MILLISECONDS);
57 events.ScheduleEvent(EVENT_THROW_AXE, 1 * IN_MILLISECONDS);
58 }
59
60 void JustDied(Unit* /*killer*/) OVERRIDE
61 {
62 _JustDied();
63 }
64
66 {
67 if (!UpdateVictim())
68 return;
69
70 events.Update(diff);
71
72 if (me->HasUnitState(UNIT_STATE_CASTING))
73 return;
74
75 while (uint32 eventId = events.ExecuteEvent())
76 {
77 switch (eventId)
78 {
79 case EVENT_SNAP_KICK:
81 events.ScheduleEvent(EVENT_SNAP_KICK, 6 * IN_MILLISECONDS);
82 break;
83 case EVENT_CLEAVE:
85 events.ScheduleEvent(EVENT_CLEAVE, 12 * IN_MILLISECONDS);
86 break;
87 case EVENT_UPPERCUT:
89 events.ScheduleEvent(EVENT_UPPERCUT, 14 * IN_MILLISECONDS);
90 break;
93 events.ScheduleEvent(EVENT_MORTAL_STRIKE, 10 * IN_MILLISECONDS);
94 break;
95 case EVENT_PUMMEL:
97 events.ScheduleEvent(EVENT_MORTAL_STRIKE, 16 * IN_MILLISECONDS);
98 break;
99 case EVENT_THROW_AXE:
101 events.ScheduleEvent(EVENT_THROW_AXE, 8 * IN_MILLISECONDS);
102 break;
103 }
104 }
106 }
107 };
108};
109
@ IN_MILLISECONDS
Definition Common.h:125
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ SPELL_CLEAVE
@ EVENT_CLEAVE
@ DATA_WARMASTER_VOONE
@ EVENT_MORTAL_STRIKE
void AddSC_boss_warmastervoone()
@ SPELL_MORTALSTRIKE
@ EVENT_THROW_AXE
@ EVENT_SNAP_KICK
@ EVENT_MORTAL_STRIKE
EventMap events
BossAI(Creature *creature, uint32 bossId)
void _EnterCombat()
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 ==================