AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_razorgore::boss_razorgoreAI Struct Reference
Inheritance diagram for boss_razorgore::boss_razorgoreAI:
BossAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_razorgoreAI (Creature *creature)
 
void Reset () override
 
void JustDied (Unit *) override
 
bool CanAIAttack (Unit const *target) const override
 
void EnterCombat (Unit *) override
 
void DoChangePhase ()
 
void SetGUID (ObjectGuid const guid, int32) override
 
void OnCharmed (bool apply) override
 
void DoAction (int32 action) override
 
void JustSummoned (Creature *summon) override
 
void SummonMovementInform (Creature *summon, uint32 movementType, uint32) override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
virtual void ExecuteEvent (uint32)
 
void Reset () override
 
void EnterCombat (Unit *) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void EnterCombat (Unit *) override
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 Cast Spell. More...
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 Play sound. More...
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoResetThreat ()
 Reset Threat. More...
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 Modify Unit Threat. More...
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 Teleport player. More...
 
void DoTeleportAll (float x, float y, float z, float o)
 Teleport all. More...
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
void SetCombatMovement (bool allowMovement)
 Set Combat Movement. More...
 
bool IsCombatMovementAllowed () const
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void EnterCombat (Unit *)
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectTargetMethod targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

bool secondPhase
 
ObjectGuid _charmerGUID
 
GuidVector _summonGUIDS
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _EnterCombat ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_razorgoreAI()

boss_razorgore::boss_razorgoreAI::boss_razorgoreAI ( Creature creature)
inline
@ DATA_RAZORGORE_THE_UNTAMED
Definition: blackwing_lair.h:31
Definition: ScriptedCreature.h:424

Member Function Documentation

◆ CanAIAttack()

bool boss_razorgore::boss_razorgoreAI::CanAIAttack ( Unit const *  target) const
inlineoverridevirtual

Reimplemented from UnitAI.

110 {
111 return !(target->GetTypeId() == TYPEID_UNIT && !secondPhase) && !target->HasAura(SPELL_CONFLAGRATION);
112 }
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
@ SPELL_CONFLAGRATION
Definition: boss_razorgore.cpp:44
bool secondPhase
Definition: boss_razorgore.cpp:259

References Object::GetTypeId(), Unit::HasAura(), secondPhase, SPELL_CONFLAGRATION, and TYPEID_UNIT.

◆ DamageTaken()

void boss_razorgore::boss_razorgoreAI::DamageTaken ( Unit ,
uint32 damage,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

207 {
208 if (!secondPhase && damage >= me->GetHealth())
209 {
213 }
214 }
@ SPELL_EXPLODE_ORB
Definition: boss_razorgore.cpp:46
@ SPELL_EXPLOSION
Definition: boss_razorgore.cpp:47
@ SAY_DEATH
Definition: boss_razorgore.cpp:29
Talk
Definition: boss_fathomlord_karathress.cpp:23
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:249
Creature * me
Definition: ScriptedCreature.h:267
uint32 GetHealth() const
Definition: Unit.h:1438

References UnitAI::DoCastAOE(), Unit::GetHealth(), ScriptedAI::me, SAY_DEATH, secondPhase, SPELL_EXPLODE_ORB, and SPELL_EXPLOSION.

◆ DoAction()

void boss_razorgore::boss_razorgoreAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

179 {
180 if (action == ACTION_PHASE_TWO)
181 {
183 }
184
185 if (action == TALK_EGG_BROKEN_RAND)
186 {
188 }
189 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ TALK_EGG_BROKEN_RAND
Definition: blackwing_lair.h:113
@ ACTION_PHASE_TWO
Definition: blackwing_lair.h:111
@ SAY_EGGS_BROKEN1
Definition: boss_razorgore.cpp:26
@ SAY_EGGS_BROKEN3
Definition: boss_razorgore.cpp:28
void DoChangePhase()
Definition: boss_razorgore.cpp:126

References ACTION_PHASE_TWO, DoChangePhase(), SAY_EGGS_BROKEN1, SAY_EGGS_BROKEN3, TALK_EGG_BROKEN_RAND, and urand().

◆ DoChangePhase()

void boss_razorgore::boss_razorgoreAI::DoChangePhase ( )
inline
127 {
128 secondPhase = true;
131
133
135 {
136 troops->AI()->Talk(EMOTE_TROOPS_RETREAT);
137 }
138
139 for (ObjectGuid const& guid : _summonGUIDS)
140 {
141 if (Creature* creature = ObjectAccessor::GetCreature(*me, guid))
142 {
143 if (creature->IsAlive())
144 {
145 creature->CombatStop(true);
146 creature->SetReactState(REACT_PASSIVE);
147 creature->GetMotionMaster()->MovePoint(0, Position(-7560.568848f, -1028.553345f, 408.491211f, 0.523858f));
148 }
149 }
150 }
151 }
@ REACT_PASSIVE
Definition: Unit.h:1023
@ DATA_NEFARIAN_TROOPS
Definition: blackwing_lair.h:43
@ SPELL_WARMING_FLAMES
Definition: boss_razorgore.cpp:49
@ EMOTE_TROOPS_RETREAT
Definition: boss_razorgore.cpp:31
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition: UnitAI.h:323
InstanceScript *const instance
Definition: ScriptedCreature.h:429
Definition: Creature.h:46
Definition: ObjectGuid.h:120
void Clear()
Definition: ObjectGuid.h:140
Definition: Position.h:28
void RemoveAllAuras()
Definition: Unit.cpp:6083
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:98
ObjectGuid _charmerGUID
Definition: boss_razorgore.cpp:260
GuidVector _summonGUIDS
Definition: boss_razorgore.cpp:261

References _charmerGUID, _summonGUIDS, ObjectGuid::Clear(), DATA_NEFARIAN_TROOPS, UnitAI::DoCastSelf(), EMOTE_TROOPS_RETREAT, InstanceScript::GetCreature(), ObjectAccessor::GetCreature(), BossAI::instance, ScriptedAI::me, REACT_PASSIVE, Unit::RemoveAllAuras(), secondPhase, and SPELL_WARMING_FLAMES.

Referenced by DoAction().

◆ EnterCombat()

void boss_razorgore::boss_razorgoreAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

115 {
116 _EnterCombat();
117
118 events.ScheduleEvent(EVENT_CLEAVE, 15000);
119 events.ScheduleEvent(EVENT_STOMP, 35000);
120 events.ScheduleEvent(EVENT_FIREBALL, 7000);
121 events.ScheduleEvent(EVENT_CONFLAGRATION, 12000);
122
124 }
@ IN_PROGRESS
Definition: InstanceScript.h:57
@ DATA_EGG_EVENT
Definition: blackwing_lair.h:112
@ EVENT_FIREBALL
Definition: boss_razorgore.cpp:67
@ EVENT_CONFLAGRATION
Definition: boss_razorgore.cpp:68
@ EVENT_STOMP
Definition: boss_razorgore.cpp:66
@ EVENT_CLEAVE
Definition: boss_razorgore.cpp:65
events
Definition: boss_sartura.cpp:43
void _EnterCombat()
Definition: ScriptedCreature.cpp:602
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References BossAI::_EnterCombat(), DATA_EGG_EVENT, EVENT_CLEAVE, EVENT_CONFLAGRATION, EVENT_FIREBALL, EVENT_STOMP, IN_PROGRESS, BossAI::instance, and ZoneScript::SetData().

◆ JustDied()

void boss_razorgore::boss_razorgoreAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

90 {
91 if (secondPhase)
92 {
93 _JustDied();
94 }
95 else
96 {
97 // Respawn shorty in case of failure during phase 1.
99 me->SetRespawnTime(30);
101
102 // Might not be required, safe measure.
103 me->SetLootRecipient(nullptr);
104
106 }
107 }
@ FAIL
Definition: InstanceScript.h:58
void _JustDied()
Definition: ScriptedCreature.cpp:591
void SaveRespawnTime() override
Definition: Creature.cpp:2611
void SetRespawnTime(uint32 respawn)
Definition: Creature.cpp:3769
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition: Creature.cpp:1278
void SetCorpseRemoveTime(uint32 delay)
Set time at when the corpse should be removed.
Definition: Creature.cpp:3779

References BossAI::_JustDied(), DATA_EGG_EVENT, FAIL, BossAI::instance, ScriptedAI::me, Creature::SaveRespawnTime(), secondPhase, Creature::SetCorpseRemoveTime(), ZoneScript::SetData(), Creature::SetLootRecipient(), and Creature::SetRespawnTime().

◆ JustSummoned()

void boss_razorgore::boss_razorgoreAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

192 {
193 _summonGUIDS.push_back(summon->GetGUID());
194 summon->SetOwnerGUID(me->GetGUID());
195 summons.Summon(summon);
196 }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:89
SummonList summons
Definition: ScriptedCreature.h:457
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
void SetOwnerGUID(ObjectGuid owner)
Definition: Unit.cpp:11377

References _summonGUIDS, Object::GetGUID(), ScriptedAI::me, Unit::SetOwnerGUID(), SummonList::Summon(), and BossAI::summons.

◆ OnCharmed()

void boss_razorgore::boss_razorgoreAI::OnCharmed ( bool  apply)
inlineoverridevirtual

Reimplemented from CreatureAI.

159 {
160 if (apply)
161 {
163 {
164 charmer->CastSpell(charmer, SPELL_MIND_EXHAUSTION, true);
165 charmer->CastSpell(me, SPELL_MINDCONTROL_VISUAL, false);
166 }
167 }
168 else
169 {
171 {
172 charmer->RemoveAurasDueToSpell(SPELL_MINDCONTROL_VISUAL);
173 me->TauntApply(charmer);
174 }
175 }
176 }
@ SPELL_MINDCONTROL_VISUAL
Definition: boss_razorgore.cpp:37
@ SPELL_MIND_EXHAUSTION
Definition: boss_razorgore.cpp:39
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:204
Definition: Unit.h:1290
void TauntApply(Unit *victim)
Definition: Unit.cpp:15390

References _charmerGUID, ObjectAccessor::GetUnit(), ScriptedAI::me, SPELL_MIND_EXHAUSTION, SPELL_MINDCONTROL_VISUAL, and Unit::TauntApply().

◆ Reset()

void boss_razorgore::boss_razorgoreAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

81 {
82 _Reset();
84 secondPhase = false;
87 }
@ NOT_STARTED
Definition: InstanceScript.h:56
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:67
void _Reset()
Definition: ScriptedCreature.cpp:579

References _charmerGUID, BossAI::_Reset(), ObjectGuid::Clear(), DATA_EGG_EVENT, SummonList::DespawnAll(), BossAI::instance, NOT_STARTED, secondPhase, ZoneScript::SetData(), and BossAI::summons.

◆ SetGUID()

void boss_razorgore::boss_razorgoreAI::SetGUID ( ObjectGuid const  guid,
int32   
)
inlineoverridevirtual

Reimplemented from UnitAI.

154 {
155 _charmerGUID = guid;
156 }

References _charmerGUID.

◆ SummonMovementInform()

void boss_razorgore::boss_razorgoreAI::SummonMovementInform ( Creature summon,
uint32  movementType,
uint32   
)
inlineoverridevirtual

Reimplemented from UnitAI.

199 {
200 if (movementType == POINT_MOTION_TYPE)
201 {
202 summon->DespawnOrUnsummon();
203 }
204 }
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Despawn or Unsummon creature. If creature is a TempSummon it will be unsummoned.
Definition: Creature.cpp:2154

References Creature::DespawnOrUnsummon(), and POINT_MOTION_TYPE.

◆ UpdateAI()

void boss_razorgore::boss_razorgoreAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

217 {
218 if (!UpdateVictim())
219 return;
220
221 if (!me->IsCharmed())
222 {
223 events.Update(diff);
224 }
225
227 return;
228
229 while (uint32 eventId = events.ExecuteEvent())
230 {
231 switch (eventId)
232 {
233 case EVENT_CLEAVE:
235 events.ScheduleEvent(EVENT_CLEAVE, urand(7000, 10000));
236 break;
237 case EVENT_STOMP:
239 events.ScheduleEvent(EVENT_STOMP, urand(15000, 25000));
240 break;
241 case EVENT_FIREBALL:
243 events.ScheduleEvent(EVENT_FIREBALL, urand(12000, 15000));
244 break;
248 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
249 me->TauntApply(target);
250 events.ScheduleEvent(EVENT_CONFLAGRATION, 30000);
251 break;
252 }
253 }
254
256 }
std::uint32_t uint32
Definition: Define.h:108
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELL_CLEAVE
Definition: boss_razorgore.cpp:41
@ SPELL_FIREBALLVOLLEY
Definition: boss_razorgore.cpp:43
@ SPELL_WARSTOMP
Definition: boss_razorgore.cpp:42
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:241
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:111
bool UpdateVictim()
Definition: CreatureAI.cpp:268
bool IsCharmed() const
Definition: Unit.h:2087
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:6454
Unit * GetVictim() const
Definition: Unit.h:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398

References UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), EVENT_CLEAVE, EVENT_CONFLAGRATION, EVENT_FIREBALL, EVENT_STOMP, Unit::GetVictim(), Unit::HasAura(), Unit::HasUnitState(), Unit::IsCharmed(), ScriptedAI::me, UnitAI::SelectTarget(), SPELL_CLEAVE, SPELL_CONFLAGRATION, SPELL_FIREBALLVOLLEY, SPELL_WARSTOMP, Unit::TauntApply(), UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ _charmerGUID

ObjectGuid boss_razorgore::boss_razorgoreAI::_charmerGUID
private

◆ _summonGUIDS

GuidVector boss_razorgore::boss_razorgoreAI::_summonGUIDS
private

Referenced by DoChangePhase(), and JustSummoned().

◆ secondPhase

bool boss_razorgore::boss_razorgoreAI::secondPhase
private