Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_quartermaster_zigris.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_SHOOT = 16496,
16};
17
23
25{
26public:
27 quartermaster_zigris() : CreatureScript("quartermaster_zigris") { }
28
30 {
32
34 {
35 _Reset();
36 }
37
38 void EnterCombat(Unit* /*who*/) OVERRIDE
39 {
41 events.ScheduleEvent(EVENT_SHOOT, 1000);
42 events.ScheduleEvent(EVENT_STUN_BOMB, 16000);
43 }
44
45 void JustDied(Unit* /*killer*/) OVERRIDE
46 {
47 _JustDied();
48 }
49
51 {
52 if (!UpdateVictim())
53 return;
54
55 events.Update(diff);
56
57 if (me->HasUnitState(UNIT_STATE_CASTING))
58 return;
59
60 while (uint32 eventId = events.ExecuteEvent())
61 {
62 switch (eventId)
63 {
64 case EVENT_SHOOT:
66 events.ScheduleEvent(EVENT_SHOOT, 500);
67 break;
68 case EVENT_STUN_BOMB:
70 events.ScheduleEvent(EVENT_STUN_BOMB, 14000);
71 break;
72 }
73 }
75 }
76 };
77
79 {
80 return new boss_quatermasterzigrisAI(creature);
81 }
82};
83
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ DATA_QUARTERMASTER_ZIGRIS
void AddSC_boss_quatermasterzigris()
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 ==================