Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_magistrate_barthilas.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_Magistrate_Barthilas
8SD%Complete: 70
9SDComment:
10SDCategory: Stratholme
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "stratholme.h"
16
24
26{
27 MODEL_NORMAL = 10433,
29};
30
32{
33public:
34 boss_magistrate_barthilas() : CreatureScript("boss_magistrate_barthilas") { }
35
37 {
38 return new boss_magistrate_barthilasAI(creature);
39 }
40
42 {
44
50
52 {
53 DrainingBlow_Timer = 20000;
54 CrowdPummel_Timer = 15000;
55 MightyBlow_Timer = 10000;
56 FuriousAnger_Timer = 5000;
57 AngerCount = 0;
58
59 if (me->IsAlive())
60 me->SetDisplayId(MODEL_NORMAL);
61 else
62 me->SetDisplayId(MODEL_HUMAN);
63 }
64
66
67 {
68 //nothing to see here yet
69
71 }
72
73 void JustDied(Unit* /*killer*/) OVERRIDE
74 {
75 me->SetDisplayId(MODEL_HUMAN);
76 }
77
78 void EnterCombat(Unit* /*who*/) OVERRIDE
79 {
80 }
81
83 {
84 //Return since we have no target
85 if (!UpdateVictim())
86 return;
87
88 if (FuriousAnger_Timer <= diff)
89 {
90 FuriousAnger_Timer = 4000;
91 if (AngerCount > 25)
92 return;
93
94 ++AngerCount;
96 } else FuriousAnger_Timer -= diff;
97
98 //DrainingBlow
99 if (DrainingBlow_Timer <= diff)
100 {
102 DrainingBlow_Timer = 15000;
103 } else DrainingBlow_Timer -= diff;
104
105 //CrowdPummel
106 if (CrowdPummel_Timer <= diff)
107 {
109 CrowdPummel_Timer = 15000;
110 } else CrowdPummel_Timer -= diff;
111
112 //MightyBlow
113 if (MightyBlow_Timer <= diff)
114 {
116 MightyBlow_Timer = 20000;
117 } else MightyBlow_Timer -= diff;
118
120 }
121 };
122};
123
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SPELL_MIGHTYBLOW
void AddSC_boss_magistrate_barthilas()
virtual void MoveInLineOfSight(Unit *)
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
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 ==================