Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_grizzle.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
15
17{
18public:
19 boss_grizzle() : CreatureScript("boss_grizzle") { }
20
22 {
23 return new boss_grizzleAI(creature);
24 }
25
26 struct boss_grizzleAI : public ScriptedAI
27 {
28 boss_grizzleAI(Creature* creature) : ScriptedAI(creature) { }
29
32
34 {
35 GroundTremor_Timer = 12000;
36 Frenzy_Timer =0;
37 }
38
39 void EnterCombat(Unit* /*who*/) OVERRIDE { }
40
42 {
43 //Return since we have no target
44 if (!UpdateVictim())
45 return;
46
47 //GroundTremor_Timer
48 if (GroundTremor_Timer <= diff)
49 {
51 GroundTremor_Timer = 8000;
52 } else GroundTremor_Timer -= diff;
53
54 //Frenzy_Timer
55 if (HealthBelowPct(51))
56 {
57 if (Frenzy_Timer <= diff)
58 {
61
62 Frenzy_Timer = 15000;
63 } else Frenzy_Timer -= diff;
64 }
65
67 }
68 };
69};
70
72{
73 new boss_grizzle();
74}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SPELL_FRENZY
Grizzle
@ SPELL_GROUNDTREMOR
@ SPELL_FRENZY
@ EMOTE_FRENZY_KILL
void AddSC_boss_grizzle()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
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
bool HealthBelowPct(uint32 pct) const
ScriptedAI(Creature *creature)
void EnterCombat(Unit *) OVERRIDE
boss_grizzleAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================