Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_janalai.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 "zulaman.h"
9
20
22{
23};
24
26{
27};
28
30{
31 public:
32
33 boss_janalai() : CreatureScript("boss_janalai") { }
34
35 struct boss_janalaiAI : public BossAI
36 {
37 boss_janalaiAI(Creature* creature) : BossAI(creature, DATA_JANALAI) { }
38
40 {
41 _Reset();
42 }
43
44 void EnterCombat(Unit* /*who*/) OVERRIDE
45 {
48 }
49
50 void JustDied(Unit* /*killer*/) OVERRIDE
51 {
53 _JustDied();
54 }
55
56 void KilledUnit(Unit* victim) OVERRIDE
57 {
58 if (victim->GetTypeId() == TYPEID_PLAYER)
60 }
61
63 {
64 if (!UpdateVictim())
65 return;
66
67 events.Update(diff);
68
69 if (me->HasUnitState(UNIT_STATE_CASTING))
70 return;
71 /*
72 while (uint32 eventId = events.ExecuteEvent())
73 {
74 switch (eventId)
75 {
76 default:
77 break;
78 }
79 }
80 */
81
83 }
84 };
85
87 {
88 return GetZulAmanAI<boss_janalaiAI>(creature);
89 }
90};
91
93{
94 new boss_janalai();
95}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
static constexpr TypeID TYPEID_PLAYER
@ UNIT_STATE_CASTING
Definition Unit.h:527
@ SAY_PLAYER_KILL
#define SAY_DEATH
#define SAY_AGGRO
@ SAY_DEATH
@ SAY_PLAYER_KILL
@ SAY_AGGRO
@ SAY_SUMMON_HATCHER
@ SAY_FIRE_BOMB
@ SAY_HATCH_ALL_EGGS
void AddSC_boss_janalai()
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
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Creature * me
void KilledUnit(Unit *victim) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void EnterCombat(Unit *) OVERRIDE
boss_janalaiAI(Creature *creature)
void JustDied(Unit *) OVERRIDE
CreatureAI * GetZulAmanAI(Creature *creature)
Definition zulaman.h:69
@ DATA_JANALAI
Definition zulaman.h:17