Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
the_eye.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: The_Eye
8SD%Complete: 100
9SDComment:
10SDCategory: Tempest Keep, The Eye
11EndScriptData */
12
13/* ContentData
14npc_crystalcore_devastator
15EndContentData */
16
17#include "ScriptMgr.h"
18#include "ScriptedCreature.h"
19#include "the_eye.h"
20
22{
25};
26
28{
29public:
30 npc_crystalcore_devastator() : CreatureScript("npc_crystalcore_devastator") { }
31
33 {
35
38
40 {
42 Knockaway_Timer = 25000;
43 }
44
45 void EnterCombat(Unit* /*who*/) OVERRIDE { }
46
48 {
49 if (!UpdateVictim())
50 return;
51
52 //Check if we have a current target
53 //Knockaway_Timer
54 if (Knockaway_Timer <= diff)
55 {
57
58 // current aggro target is knocked away pick new target
60
61 if (!target || target == me->GetVictim())
63
64 if (target)
65 me->TauntApply(target);
66
67 Knockaway_Timer = 23000;
68 }
69 else
70 Knockaway_Timer -= diff;
71
72 //Countercharge_Timer
73 if (Countercharge_Timer <= diff)
74 {
76 Countercharge_Timer = 45000;
77 }
78 else
79 Countercharge_Timer -= diff;
80
82 }
83 };
84
86 {
87 return new npc_crystalcore_devastatorAI(creature);
88 }
89};
94
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SELECT_TARGET_TOPAGGRO
Definition UnitAI.h:24
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
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Definition the_eye.cpp:85
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
Definition the_eye.cpp:47
@ SPELL_COUNTERCHARGE
Definition the_eye.cpp:23
@ SPELL_KNOCKAWAY
Definition the_eye.cpp:24
void AddSC_the_eye()
Definition the_eye.cpp:90