Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_interrogator_vishas.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: Boss_Interrogator_Vishas
8SD%Complete: 100
9SDComment:
10SDCategory: Scarlet Monastery
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "scarlet_monastery.h"
16
25
27{
29};
30
32{
33public:
34 boss_interrogator_vishas() : CreatureScript("boss_interrogator_vishas") { }
35
37 {
38 return new boss_interrogator_vishasAI(creature);
39 }
40
42 {
44 {
45 instance = me->GetInstanceScript();
46 }
47
49
50 bool Yell30;
51 bool Yell60;
53
55 {
57 }
58
59 void EnterCombat(Unit* /*who*/) OVERRIDE
60 {
62 }
63
64 void KilledUnit(Unit* /*Victim*/) OVERRIDE
65 {
67 }
68
69 void JustDied(Unit* /*killer*/) OVERRIDE
70 {
71 if (!instance)
72 return;
73
74 //Any other Actions to do with vorrel? setStandState?
75 if (Creature* vorrel = Creature::GetCreature(*me, instance->GetData64(DATA_VORREL)))
76 vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
77 }
78
80 {
81 if (!UpdateVictim())
82 return;
83
84 //If we are low on hp Do sayings
85 if (!Yell60 && !HealthAbovePct(60))
86 {
88 Yell60 = true;
89 }
90
91 if (!Yell30 && !HealthAbovePct(30))
92 {
94 Yell30 = true;
95 }
96
97 //ShadowWordPain_Timer
98 if (ShadowWordPain_Timer <= diff)
99 {
101 ShadowWordPain_Timer = urand(5000, 15000);
102 }
103 else ShadowWordPain_Timer -= diff;
104
106 }
107 };
108};
109
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
#define SAY_AGGRO
#define SAY_KILL
void AddSC_boss_interrogator_vishas()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
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
static Creature * GetCreature(WorldObject &object, uint64 guid)
Definition Unit.cpp:4905
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ DATA_VORREL
Creature * me
bool HealthAbovePct(uint32 pct) const
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================