Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_azuregos.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_Azuregos
8SD%Complete: 90
9SDComment: Teleport not included, spell reflect not effecting dots (Core problem)
10SDCategory: Azshara
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15
16enum Say
17{
19};
20
22{
25 SPELL_CHILL = 21098,
28 SPELL_CLEAVE = 8255, //Perhaps not right ID
30};
31
33{
34public:
35 boss_azuregos() : CreatureScript("boss_azuregos") { }
36
38 {
39 return new boss_azuregosAI(creature);
40 }
41
43 {
44 boss_azuregosAI(Creature* creature) : ScriptedAI(creature) { }
45
54 bool Enraged;
55
57 {
58 MarkOfFrostTimer = 35000;
59 ManaStormTimer = urand(5000, 17000);
60 ChillTimer = urand(10000, 30000);
61 BreathTimer = urand(2000, 8000);
62 TeleportTimer = 30000;
63 ReflectTimer = urand(15000, 30000);
64 CleaveTimer = 7000;
65 EnrageTimer = 0;
66 Enraged = false;
67 }
68
69 void EnterCombat(Unit* /*who*/) OVERRIDE { }
70
72 {
73 //Return since we have no target
74 if (!UpdateVictim())
75 return;
76
77 if (TeleportTimer <= diff)
78 {
80 ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
81 ThreatContainer::StorageType::const_iterator i = threatlist.begin();
82 for (i = threatlist.begin(); i != threatlist.end(); ++i)
83 {
84 Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid());
85 if (unit && (unit->GetTypeId() == TYPEID_PLAYER))
86 {
87 DoTeleportPlayer(unit, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()+3, unit->GetOrientation());
88 }
89 }
90
92 TeleportTimer = 30000;
93 } else TeleportTimer -= diff;
94
95 // //MarkOfFrostTimer
96 // if (MarkOfFrostTimer <= diff)
97 // {
98 // DoCastVictim(SPELL_MARKOFFROST);
99 // MarkOfFrostTimer = 25000;
100 // } else MarkOfFrostTimer -= diff;
101
102 //ChillTimer
103 if (ChillTimer <= diff)
104 {
106 ChillTimer = urand(13000, 25000);
107 } else ChillTimer -= diff;
108
109 //BreathTimer
110 if (BreathTimer <= diff)
111 {
113 BreathTimer = urand(10000, 15000);
114 } else BreathTimer -= diff;
115
116 //ManaStormTimer
117 if (ManaStormTimer <= diff)
118 {
119 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
120 DoCast(target, SPELL_MANASTORM);
121 ManaStormTimer = urand(7500, 12500);
122 } else ManaStormTimer -= diff;
123
124 //ReflectTimer
125 if (ReflectTimer <= diff)
126 {
128 ReflectTimer = urand(20000, 35000);
129 } else ReflectTimer -= diff;
130
131 //CleaveTimer
132 if (CleaveTimer <= diff)
133 {
135 CleaveTimer = 7000;
136 } else CleaveTimer -= diff;
137
138 //EnrageTimer
139 if (HealthBelowPct(26) && !Enraged)
140 {
142 Enraged = true;
143 }
144
146 }
147 };
148};
149
151{
152 new boss_azuregos();
153}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
static constexpr TypeID TYPEID_PLAYER
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ SPELL_CLEAVE
@ SPELL_ENRAGE
void AddSC_boss_azuregos()
@ SPELL_CLEAVE
@ SPELL_ENRAGE
@ SPELL_FROSTBREATH
@ SPELL_REFLECT
@ SPELL_MANASTORM
@ SPELL_CHILL
@ SPELL_MARKOFFROST
@ SAY_TELEPORT
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
TypeID GetTypeId() const
Definition Object.h:131
std::list< HostileReference * > StorageType
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
static Unit * GetUnit(WorldObject &object, uint64 guid)
Definition Unit.cpp:4895
CreatureAI * GetAI(Creature *creature) const OVERRIDE
float GetOrientation() const
Definition Object.h:331
Creature * me
void DoTeleportPlayer(Unit *unit, float x, float y, float z, float o)
bool HealthBelowPct(uint32 pct) const
ScriptedAI(Creature *creature)
void EnterCombat(Unit *) OVERRIDE
boss_azuregosAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================