Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_high_interrogator_gerstahn.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
16
18{
19public:
20 boss_high_interrogator_gerstahn() : CreatureScript("boss_high_interrogator_gerstahn") { }
21
23 {
24 return new boss_high_interrogator_gerstahnAI(creature);
25 }
26
28 {
30
35
37 {
39 ManaBurn_Timer = 14000;
40 PsychicScream_Timer = 32000;
41 ShadowShield_Timer = 8000;
42 }
43
44 void EnterCombat(Unit* /*who*/) OVERRIDE { }
45
47 {
48 //Return since we have no target
49 if (!UpdateVictim())
50 return;
51
52 //ShadowWordPain_Timer
53 if (ShadowWordPain_Timer <= diff)
54 {
55 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
58 } else ShadowWordPain_Timer -= diff;
59
60 //ManaBurn_Timer
61 if (ManaBurn_Timer <= diff)
62 {
63 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
64 DoCast(target, SPELL_MANABURN);
65 ManaBurn_Timer = 10000;
66 } else ManaBurn_Timer -= diff;
67
68 //PsychicScream_Timer
69 if (PsychicScream_Timer <= diff)
70 {
72 PsychicScream_Timer = 30000;
73 } else PsychicScream_Timer -= diff;
74
75 //ShadowShield_Timer
76 if (ShadowShield_Timer <= diff)
77 {
79 ShadowShield_Timer = 25000;
80 } else ShadowShield_Timer -= diff;
81
83 }
84 };
85};
86
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
void AddSC_boss_high_interrogator_gerstahn()
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
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================