AzerothCore 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 JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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 JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportAll (float x, float y, float z, float o)
 
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)
 
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, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
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 ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
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, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
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)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always be the current victim.
 
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 _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
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
 
TaskScheduler scheduler
 
- 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:456

Member Function Documentation

◆ CanAIAttack()

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

Reimplemented from UnitAI.

110 {
111 if (target->GetTypeId() == TYPEID_UNIT && !secondPhase)
112 {
113 return false;
114 }
115
116 if (me->GetThreatMgr().GetThreatListSize() > 1)
117 {
118 ThreatContainer::StorageType::const_iterator lastRef = me->GetThreatMgr().GetOnlineContainer().GetThreatList().end();
119 --lastRef;
120 if (Unit* lastTarget = (*lastRef)->getTarget())
121 {
122 if (lastTarget != target)
123 {
124 return !target->HasAura(SPELL_CONFLAGRATION);
125 }
126 }
127 }
128
129 return true;
130 }
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
@ SPELL_CONFLAGRATION
Definition: boss_razorgore.cpp:44
Creature * me
Definition: ScriptedCreature.h:282
StorageType const & GetThreatList() const
Definition: ThreatMgr.h:177
float GetThreatListSize() const
Definition: ThreatMgr.h:222
ThreatContainer & GetOnlineContainer()
Definition: ThreatMgr.h:276
Definition: Unit.h:1290
ThreatMgr & GetThreatMgr()
Definition: Unit.h:2145
bool secondPhase
Definition: boss_razorgore.cpp:274

References ThreatMgr::GetOnlineContainer(), ThreatContainer::GetThreatList(), ThreatMgr::GetThreatListSize(), Unit::GetThreatMgr(), Object::GetTypeId(), Unit::HasAura(), ScriptedAI::me, secondPhase, SPELL_CONFLAGRATION, and TYPEID_UNIT.

◆ DamageTaken()

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

Reimplemented from BossAI.

225 {
226 if (!secondPhase && damage >= me->GetHealth())
227 {
231 }
232 }
@ 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
uint32 GetHealth() const
Definition: Unit.h:1440

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.

197 {
198 if (action == ACTION_PHASE_TWO)
199 {
201 }
202
203 if (action == TALK_EGG_BROKEN_RAND)
204 {
206 }
207 }
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:144

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
145 {
146 secondPhase = true;
149
151
153 {
154 troops->AI()->Talk(EMOTE_TROOPS_RETREAT);
155 }
156
157 for (ObjectGuid const& guid : _summonGUIDS)
158 {
159 if (Creature* creature = ObjectAccessor::GetCreature(*me, guid))
160 {
161 if (creature->IsAlive())
162 {
163 creature->CombatStop(true);
164 creature->SetReactState(REACT_PASSIVE);
165 creature->GetMotionMaster()->MovePoint(0, Position(-7560.568848f, -1028.553345f, 408.491211f, 0.523858f));
166 }
167 }
168 }
169 }
@ 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:369
InstanceScript *const instance
Definition: ScriptedCreature.h:461
Definition: Creature.h:46
Definition: ObjectGuid.h:120
void Clear()
Definition: ObjectGuid.h:140
Definition: Position.h:28
void RemoveAllAuras()
Definition: Unit.cpp:5239
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:99
ObjectGuid _charmerGUID
Definition: boss_razorgore.cpp:275
GuidVector _summonGUIDS
Definition: boss_razorgore.cpp:276

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().

◆ 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
@ DATA_EGG_EVENT
Definition: blackwing_lair.h:112
void _JustDied()
Definition: ScriptedCreature.cpp:585
void SaveRespawnTime() override
Definition: Creature.cpp:2541
void SetRespawnTime(uint32 respawn)
Definition: Creature.cpp:3658
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition: Creature.cpp:1292
void SetCorpseRemoveTime(uint32 delay)
Definition: Creature.cpp:3663
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

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

◆ JustEngagedWith()

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

Called for reaction when initially engaged.

Reimplemented from BossAI.

133 {
135
136 events.ScheduleEvent(EVENT_CLEAVE, 15s);
137 events.ScheduleEvent(EVENT_STOMP, 35s);
138 events.ScheduleEvent(EVENT_FIREBALL, 7s);
139 events.ScheduleEvent(EVENT_CONFLAGRATION, 12s);
140
142 }
@ IN_PROGRESS
Definition: InstanceScript.h:57
@ 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 _JustEngagedWith()
Definition: ScriptedCreature.cpp:598

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

◆ JustSummoned()

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

Reimplemented from BossAI.

210 {
211 _summonGUIDS.push_back(summon->GetGUID());
212 summon->SetOwnerGUID(me->GetGUID());
213 summons.Summon(summon);
214 }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
SummonList summons
Definition: ScriptedCreature.h:497
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
void SetOwnerGUID(ObjectGuid owner)
Definition: Unit.cpp:10533

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.

177 {
178 if (apply)
179 {
181 {
182 charmer->CastSpell(charmer, SPELL_MIND_EXHAUSTION, true);
183 charmer->CastSpell(me, SPELL_MINDCONTROL_VISUAL, false);
184 }
185 }
186 else
187 {
189 {
190 charmer->RemoveAurasDueToSpell(SPELL_MINDCONTROL_VISUAL);
191 me->TauntApply(charmer);
192 }
193 }
194 }
@ 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
void TauntApply(Unit *victim)
Definition: Unit.cpp:14559

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:570

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.

172 {
173 _charmerGUID = guid;
174 }

References _charmerGUID.

◆ SummonMovementInform()

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

Reimplemented from UnitAI.

217 {
218 if (movementType == POINT_MOTION_TYPE)
219 {
220 summon->DespawnOrUnsummon();
221 }
222 }
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2108

References Creature::DespawnOrUnsummon(), and POINT_MOTION_TYPE.

◆ UpdateAI()

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

Reimplemented from BossAI.

235 {
236 if (!UpdateVictim())
237 return;
238
239 if (!me->IsCharmed())
240 {
241 events.Update(diff);
242 }
243
245 return;
246
247 while (uint32 eventId = events.ExecuteEvent())
248 {
249 switch (eventId)
250 {
251 case EVENT_CLEAVE:
253 events.ScheduleEvent(EVENT_CLEAVE, 7s, 10s);
254 break;
255 case EVENT_STOMP:
257 events.ScheduleEvent(EVENT_STOMP, 15s, 25s);
258 break;
259 case EVENT_FIREBALL:
261 events.ScheduleEvent(EVENT_FIREBALL, 12s, 15s);
262 break;
265 events.ScheduleEvent(EVENT_CONFLAGRATION, 30s);
266 break;
267 }
268 }
269
271 }
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
bool UpdateVictim()
Definition: CreatureAI.cpp:269
bool IsCharmed() const
Definition: Unit.h:1871
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398

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

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