AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_rend_blackhand::boss_rend_blackhandAI Struct Reference
Inheritance diagram for boss_rend_blackhand::boss_rend_blackhandAI:
BossAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_rend_blackhandAI (Creature *creature)
 
void Reset () override
 
void SummonedCreatureDies (Creature *, Unit *) override
 
void JustSummoned (Creature *summon) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void EnterEvadeMode (EvadeReason why) override
 
void IsSummonedBy (WorldObject *) override
 
void JustDied (Unit *) override
 
void SummonedCreatureDespawn (Creature *creature) override
 
void SetData (uint32 type, uint32 data) override
 
void MovementInform (uint32 type, uint32 id) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void SummonWave ()
 
- 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
 Called at any Damage from any attacker (before damage apply) More...
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent. More...
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) 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
 Called at any Damage from any attacker (before damage apply) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
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. More...
 
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 DoTeleportPlayer (Unit *unit, Position pos)
 
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 IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
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)
 
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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 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 JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
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 SummonedCreatureEvade (Creature *)
 
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
 Called when unit is charmed. More...
 
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 *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- 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
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
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)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
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. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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)
 To specify the caster as target if the spell is self-cast. More...
 
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, bool withTank=true)
 Cast the spell on a random unit from the threat list. More...
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim. More...
 
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)
 Called when a summon reaches a waypoint or point movement finished. More...
 
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 gythEvent
 
uint8 _currentWave
 
ObjectGuid victorGUID
 
ObjectGuid waveDoorGUID
 

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
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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
SummonList summons
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_rend_blackhandAI()

boss_rend_blackhand::boss_rend_blackhandAI::boss_rend_blackhandAI ( Creature creature)
inline
@ DATA_WARCHIEF_REND_BLACKHAND
Definition: blackrock_spire.h:41
Definition: ScriptedCreature.h:457

Member Function Documentation

◆ EnterEvadeMode()

void boss_rend_blackhand::boss_rend_blackhandAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from BossAI.

170 {
175 }
@ FAIL
Definition: InstanceScript.h:59
@ DATA_GYTH
Definition: blackrock_spire.h:42
Creature * me
Definition: ScriptedCreature.h:280
InstanceScript *const instance
Definition: ScriptedCreature.h:464
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition: ScriptedCreature.h:488
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:351

References DATA_GYTH, DATA_WARCHIEF_REND_BLACKHAND, Creature::DespawnOrUnsummon(), BossAI::EnterEvadeMode(), FAIL, BossAI::instance, ScriptedAI::me, and InstanceScript::SetBossState().

◆ IsSummonedBy()

void boss_rend_blackhand::boss_rend_blackhandAI::IsSummonedBy ( WorldObject )
inlineoverridevirtual

Reimplemented from CreatureAI.

178 {
180 }
@ EMOTE_BLACKHAND_DISMOUNT
Definition: boss_rend_blackhand.cpp:37
Talk
Definition: hyjal.cpp:82

References EMOTE_BLACKHAND_DISMOUNT.

◆ JustDied()

void boss_rend_blackhand::boss_rend_blackhandAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

183 {
184 _JustDied();
185 if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 75.0f, true))
186 victor->AI()->SetData(1, 2);
187
189 exitDoor->SetGoState(GO_STATE_ACTIVE);
190
192 }
@ DONE
Definition: InstanceScript.h:60
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ NPC_LORD_VICTOR_NEFARIUS
Definition: blackrock_spire.h:80
@ GO_GYTH_ENTRY_DOOR
Definition: blackrock_spire.h:116
void _JustDied()
Definition: ScriptedCreature.cpp:614
Definition: Creature.h:46
Definition: GameObject.h:121
Map * GetMap() const
Definition: Object.h:531
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:95
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3319

References BossAI::_JustDied(), DATA_WARCHIEF_REND_BLACKHAND, DONE, WorldObject::FindNearestCreature(), Map::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), GO_GYTH_ENTRY_DOOR, GO_STATE_ACTIVE, BossAI::instance, ScriptedAI::me, NPC_LORD_VICTOR_NEFARIUS, and InstanceScript::SetBossState().

◆ JustEngagedWith()

void boss_rend_blackhand::boss_rend_blackhandAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

162 {
164 events.ScheduleEvent(EVENT_WHIRLWIND, 13s, 15s);
165 events.ScheduleEvent(EVENT_CLEAVE, 15s, 17s);
166 events.ScheduleEvent(EVENT_MORTAL_STRIKE, 17s, 19s);
167 }
@ EVENT_WHIRLWIND
Definition: boss_rend_blackhand.cpp:97
@ EVENT_CLEAVE
Definition: boss_rend_blackhand.cpp:98
@ EVENT_MORTAL_STRIKE
Definition: boss_rend_blackhand.cpp:99
events
Definition: boss_sartura.cpp:43
void _JustEngagedWith()
Definition: ScriptedCreature.cpp:627

References BossAI::_JustEngagedWith(), EVENT_CLEAVE, EVENT_MORTAL_STRIKE, and EVENT_WHIRLWIND.

◆ JustSummoned()

void boss_rend_blackhand::boss_rend_blackhandAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

149 {
150 summons.Summon(summon);
151
152 if (summon->GetEntry() == NPC_GYTH)
153 {
155 return;
156 }
157
158 summon->AI()->DoZoneInCombat(nullptr, 100.0f);
159 }
@ NPC_GYTH
Definition: blackrock_spire.h:73
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
SummonList summons
Definition: ScriptedCreature.h:501
CreatureAI * AI() const
Definition: Creature.h:143
uint32 GetEntry() const
Definition: Object.h:112

References Creature::AI(), Creature::DespawnOrUnsummon(), CreatureAI::DoZoneInCombat(), Object::GetEntry(), ScriptedAI::me, NPC_GYTH, SummonList::Summon(), and BossAI::summons.

◆ MovementInform()

void boss_rend_blackhand::boss_rend_blackhandAI::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

232 {
233 if (type == WAYPOINT_MOTION_TYPE)
234 {
235 switch (id)
236 {
237 case 5:
238 events.ScheduleEvent(EVENT_TELEPORT_1, 2s);
239 break;
240 }
241 }
242 }
@ WAYPOINT_MOTION_TYPE
Definition: MotionMaster.h:39
@ EVENT_TELEPORT_1
Definition: boss_rend_blackhand.cpp:95

References EVENT_TELEPORT_1, and WAYPOINT_MOTION_TYPE.

◆ Reset()

void boss_rend_blackhand::boss_rend_blackhandAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

112 {
113 _Reset();
114
116 {
118 me->SetImmuneToAll(false);
119 return;
120 }
121
123 me->SetImmuneToAll(true);
124 gythEvent = false;
127 _currentWave = 0;
128
130
131 if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 5.0f, true))
132 victor->Respawn(true);
133
135 exitDoor->SetGoState(GO_STATE_ACTIVE);
136
138 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ NOT_STARTED
Definition: InstanceScript.h:57
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ UNIT_FLAG_PREPARATION
Definition: UnitDefines.h:234
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void _Reset()
Definition: ScriptedCreature.cpp:598
void Clear()
Definition: ObjectGuid.h:138
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:683
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:810
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:684
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235
ObjectGuid waveDoorGUID
Definition: boss_rend_blackhand.cpp:432
ObjectGuid victorGUID
Definition: boss_rend_blackhand.cpp:431
bool gythEvent
Definition: boss_rend_blackhand.cpp:429
uint8 _currentWave
Definition: boss_rend_blackhand.cpp:430

References _currentWave, BossAI::_Reset(), ObjectGuid::Clear(), DATA_GYTH, DATA_WARCHIEF_REND_BLACKHAND, SummonList::DespawnAll(), WorldObject::FindNearestCreature(), InstanceScript::GetBossState(), Map::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), GO_GYTH_ENTRY_DOOR, GO_STATE_ACTIVE, gythEvent, IN_PROGRESS, BossAI::instance, ScriptedAI::me, NOT_STARTED, NPC_LORD_VICTOR_NEFARIUS, Unit::RemoveUnitFlag(), InstanceScript::SetBossState(), Unit::SetImmuneToAll(), Unit::SetUnitFlag(), BossAI::summons, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_PREPARATION, victorGUID, and waveDoorGUID.

◆ SetData()

void boss_rend_blackhand::boss_rend_blackhandAI::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

205 {
206 if (type == AREATRIGGER && data == AREATRIGGER_BLACKROCK_STADIUM)
207 {
208 if (!gythEvent)
209 {
210 gythEvent = true;
211
213 {
214 if (!victor->IsAlive())
215 {
216 victor->Respawn(true);
217 }
218
219 victorGUID = victor->GetGUID();
220 }
221
222 if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 50.0f))
223 waveDoorGUID = portcullis->GetGUID();
224
225 events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
226 events.ScheduleEvent(EVENT_START_1, 1s);
227 }
228 }
229 }
@ AREATRIGGER
Definition: blackrock_spire.h:102
@ AREATRIGGER_BLACKROCK_STADIUM
Definition: blackrock_spire.h:104
@ GO_DR_PORTCULLIS
Definition: blackrock_spire.h:138
@ EVENT_START_1
Definition: boss_rend_blackhand.cpp:73
@ EVENT_TURN_TO_PLAYER
Definition: boss_rend_blackhand.cpp:78
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition: Object.cpp:2455

References AREATRIGGER, AREATRIGGER_BLACKROCK_STADIUM, EVENT_START_1, EVENT_TURN_TO_PLAYER, WorldObject::FindNearestCreature(), WorldObject::FindNearestGameObject(), GO_DR_PORTCULLIS, gythEvent, ScriptedAI::me, NPC_LORD_VICTOR_NEFARIUS, victorGUID, and waveDoorGUID.

◆ SummonedCreatureDespawn()

void boss_rend_blackhand::boss_rend_blackhandAI::SummonedCreatureDespawn ( Creature creature)
inlineoverridevirtual

Reimplemented from BossAI.

195 {
196 if (creature->IsAlive() && !summons.IsAnyCreatureInCombat())
197 {
199 }
200
202 }
bool IsAnyCreatureInCombat() const
Definition: ScriptedCreature.cpp:176
void SummonedCreatureDespawn(Creature *summon) override
Definition: ScriptedCreature.cpp:681
bool IsAlive() const
Definition: Unit.h:1204

References DATA_WARCHIEF_REND_BLACKHAND, FAIL, BossAI::instance, Unit::IsAlive(), SummonList::IsAnyCreatureInCombat(), InstanceScript::SetBossState(), BossAI::SummonedCreatureDespawn(), and BossAI::summons.

◆ SummonedCreatureDies()

void boss_rend_blackhand::boss_rend_blackhandAI::SummonedCreatureDies ( Creature ,
Unit  
)
inlineoverridevirtual

Reimplemented from CreatureAI.

141 {
143 {
144 events.ScheduleEvent(EVENT_WAVES_TEXT_1 + _currentWave, 10s);
145 }
146 }
@ EVENT_WAVES_TEXT_1
Definition: boss_rend_blackhand.cpp:83
bool IsAnyCreatureAlive() const
Definition: ScriptedCreature.cpp:144

References _currentWave, EVENT_WAVES_TEXT_1, SummonList::IsAnyCreatureAlive(), and BossAI::summons.

◆ SummonWave()

void boss_rend_blackhand::boss_rend_blackhandAI::SummonWave ( )
inline
417 {
419
420 if (GameObject* waveDoor = me->GetMap()->GetGameObject(waveDoorGUID))
421 {
422 waveDoor->UseDoorOrButton();
423 }
424
425 ++_currentWave;
426 }
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
Definition: Object.cpp:2432

References _currentWave, Map::GetGameObject(), WorldObject::GetMap(), ScriptedAI::me, WorldObject::SummonCreatureGroup(), and waveDoorGUID.

Referenced by UpdateAI().

◆ UpdateAI()

void boss_rend_blackhand::boss_rend_blackhandAI::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Reimplemented from BossAI.

245 {
246 if (gythEvent)
247 {
248 events.Update(diff);
249
250 while (uint32 eventId = events.ExecuteEvent())
251 {
252 switch (eventId)
253 {
254 case EVENT_START_1:
257
259 victor->AI()->Talk(SAY_NEFARIUS_0);
260
262 door2->SetGoState(GO_STATE_READY);
263
264 events.ScheduleEvent(EVENT_START_2, 4s);
265 break;
266 case EVENT_START_2:
267 events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
269 victor->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
270 events.ScheduleEvent(EVENT_START_3, 4s);
271 break;
272 case EVENT_START_3:
274 victor->AI()->Talk(SAY_NEFARIUS_1);
275 events.ScheduleEvent(EVENT_SPAWN_WAVE, 2s);
276 events.ScheduleEvent(EVENT_TURN_TO_REND, 4s);
277 break;
280 {
281 victor->SetFacingToObject(me);
282 victor->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
283 }
284 break;
287 if (Unit* player = victor->SelectNearestPlayer(60.0f))
288 victor->SetFacingToObject(player);
289 break;
292 victor->SetFacingTo(1.518436f);
293 break;
295 me->SetFacingTo(1.658063f);
296 break;
298 me->SetFacingTo(1.500983f);
299 break;
302 victor->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION);
303 break;
306 break;
308 events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0ms);
310 victor->AI()->Talk(SAY_NEFARIUS_2);
312 events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
313 events.ScheduleEvent(EVENT_WAVES_EMOTE_1, 5s);
314 events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
315 break;
317 events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
319 victor->AI()->Talk(SAY_NEFARIUS_3);
320 events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
321 events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
322 break;
324 events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
326 victor->AI()->Talk(SAY_NEFARIUS_4);
327 events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
328 events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
329 break;
332 events.ScheduleEvent(EVENT_WAVES_EMOTE_2, 4s);
333 events.ScheduleEvent(EVENT_TURN_TO_FACING_3, 8s);
334 events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
335 break;
337 events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
339 victor->AI()->Talk(SAY_NEFARIUS_5);
340 events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
341 events.ScheduleEvent(EVENT_SPAWN_WAVE, 3s);
342 break;
344 events.ScheduleEvent(EVENT_TURN_TO_PLAYER, 0);
346 victor->AI()->Talk(SAY_NEFARIUS_6);
347 events.ScheduleEvent(EVENT_TURN_TO_FACING_1, 4s);
348 events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_2, 13s);
349 break;
352 victor->AI()->Talk(SAY_NEFARIUS_7);
354 events.ScheduleEvent(EVENT_PATH_REND, 1s);
355 events.ScheduleEvent(EVENT_WAVES_COMPLETE_TEXT_3, 4s);
356 break;
359 victor->AI()->Talk(SAY_NEFARIUS_8);
360 events.ScheduleEvent(EVENT_PATH_NEFARIUS, 1s);
361 events.ScheduleEvent(EVENT_PATH_REND, 1s);
362 break;
365 victor->GetMotionMaster()->MovePath(NEFARIUS_PATH_1, true);
366 break;
367 case EVENT_PATH_REND:
369 break;
370 case EVENT_TELEPORT_1:
371 me->NearTeleportTo(194.2993f, -474.0814f, 121.4505f, -0.01225555f);
372 events.ScheduleEvent(EVENT_TELEPORT_2, 13s);
373 break;
374 case EVENT_TELEPORT_2:
375 me->NearTeleportTo(216.485f, -434.93f, 110.888f, -0.01225555f);
376 me->SummonCreature(NPC_GYTH, 211.762f, -397.5885f, 111.1817f, 4.747295f);
377 break;
378 case EVENT_SPAWN_WAVE:
379 SummonWave();
380 break;
381 default:
382 break;
383 }
384 }
385 }
386
387 if (!UpdateVictim())
388 return;
389
390 events.Update(diff);
391
393 return;
394
395 while (uint32 eventId = events.ExecuteEvent())
396 {
397 switch (eventId)
398 {
399 case EVENT_WHIRLWIND:
401 events.ScheduleEvent(EVENT_WHIRLWIND, 13s, 18s);
402 break;
403 case EVENT_CLEAVE:
405 events.ScheduleEvent(EVENT_CLEAVE, 10s, 14s);
406 break;
409 events.ScheduleEvent(EVENT_MORTAL_STRIKE, 14s, 18s);
410 break;
411 }
412 }
414 }
std::uint32_t uint32
Definition: Define.h:107
@ UNIT_STATE_CASTING
Definition: UnitDefines.h:164
@ GO_STATE_READY
Definition: GameObjectData.h:691
@ DATA_VAELASTRASZ
Definition: blackrock_spire.h:57
@ SAY_NEFARIUS_0
Definition: boss_rend_blackhand.cpp:39
@ SAY_NEFARIUS_4
Definition: boss_rend_blackhand.cpp:43
@ SAY_NEFARIUS_6
Definition: boss_rend_blackhand.cpp:45
@ SAY_NEFARIUS_3
Definition: boss_rend_blackhand.cpp:42
@ SAY_NEFARIUS_5
Definition: boss_rend_blackhand.cpp:44
@ SAY_NEFARIUS_7
Definition: boss_rend_blackhand.cpp:46
@ SAY_BLACKHAND_1
Definition: boss_rend_blackhand.cpp:35
@ SAY_NEFARIUS_1
Definition: boss_rend_blackhand.cpp:40
@ SAY_BLACKHAND_2
Definition: boss_rend_blackhand.cpp:36
@ SAY_NEFARIUS_8
Definition: boss_rend_blackhand.cpp:47
@ SAY_NEFARIUS_2
Definition: boss_rend_blackhand.cpp:41
@ REND_PATH_1
Definition: boss_rend_blackhand.cpp:63
@ NEFARIUS_PATH_1
Definition: boss_rend_blackhand.cpp:60
@ SPELL_CLEAVE
Definition: boss_rend_blackhand.cpp:26
@ SPELL_MORTAL_STRIKE
Definition: boss_rend_blackhand.cpp:27
@ SPELL_WHIRLWIND
Definition: boss_rend_blackhand.cpp:25
@ EVENT_WAVES_TEXT_2
Definition: boss_rend_blackhand.cpp:84
@ EVENT_WAVES_TEXT_3
Definition: boss_rend_blackhand.cpp:85
@ EVENT_PATH_REND
Definition: boss_rend_blackhand.cpp:93
@ EVENT_WAVES_COMPLETE_TEXT_2
Definition: boss_rend_blackhand.cpp:89
@ EVENT_TURN_TO_REND
Definition: boss_rend_blackhand.cpp:77
@ EVENT_TURN_TO_FACING_1
Definition: boss_rend_blackhand.cpp:79
@ EVENT_START_2
Definition: boss_rend_blackhand.cpp:74
@ EVENT_SPAWN_WAVE
Definition: boss_rend_blackhand.cpp:82
@ EVENT_PATH_NEFARIUS
Definition: boss_rend_blackhand.cpp:94
@ EVENT_TURN_TO_FACING_3
Definition: boss_rend_blackhand.cpp:81
@ EVENT_WAVES_EMOTE_2
Definition: boss_rend_blackhand.cpp:92
@ EVENT_TELEPORT_2
Definition: boss_rend_blackhand.cpp:96
@ EVENT_WAVES_TEXT_5
Definition: boss_rend_blackhand.cpp:87
@ EVENT_START_3
Definition: boss_rend_blackhand.cpp:75
@ EVENT_WAVES_TEXT_4
Definition: boss_rend_blackhand.cpp:86
@ EVENT_TURN_TO_FACING_2
Definition: boss_rend_blackhand.cpp:80
@ EVENT_WAVES_COMPLETE_TEXT_3
Definition: boss_rend_blackhand.cpp:90
@ EVENT_WAVES_EMOTE_1
Definition: boss_rend_blackhand.cpp:91
@ EVENT_WAVES_COMPLETE_TEXT_1
Definition: boss_rend_blackhand.cpp:88
@ EMOTE_ONESHOT_POINT
Definition: SharedDefines.h:1917
@ EMOTE_ONESHOT_QUESTION
Definition: SharedDefines.h:1900
@ EMOTE_ONESHOT_ROAR
Definition: SharedDefines.h:1907
@ EMOTE_ONESHOT_TALK
Definition: SharedDefines.h:1895
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:240
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
bool UpdateVictim()
Definition: CreatureAI.cpp:269
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355
Player * SelectNearestPlayer(float distance=0) const
Definition: Object.cpp:2473
Definition: Unit.h:630
void SetFacingTo(float ori)
Definition: Unit.cpp:20483
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
bool HasUnitState(const uint32 f) const
Definition: Unit.h:673
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition: Unit.cpp:19937
void HandleEmoteCommand(uint32 emoteId)
Definition: Unit.cpp:1984
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
void MovePath(uint32 path_id, bool repeatable)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:849
void SummonWave()
Definition: boss_rend_blackhand.cpp:416

References DATA_VAELASTRASZ, DATA_WARCHIEF_REND_BLACKHAND, UnitAI::DoCast(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), EMOTE_ONESHOT_POINT, EMOTE_ONESHOT_QUESTION, EMOTE_ONESHOT_ROAR, EMOTE_ONESHOT_TALK, EVENT_CLEAVE, EVENT_MORTAL_STRIKE, EVENT_PATH_NEFARIUS, EVENT_PATH_REND, EVENT_SPAWN_WAVE, EVENT_START_1, EVENT_START_2, EVENT_START_3, EVENT_TELEPORT_1, EVENT_TELEPORT_2, EVENT_TURN_TO_FACING_1, EVENT_TURN_TO_FACING_2, EVENT_TURN_TO_FACING_3, EVENT_TURN_TO_PLAYER, EVENT_TURN_TO_REND, EVENT_WAVES_COMPLETE_TEXT_1, EVENT_WAVES_COMPLETE_TEXT_2, EVENT_WAVES_COMPLETE_TEXT_3, EVENT_WAVES_EMOTE_1, EVENT_WAVES_EMOTE_2, EVENT_WAVES_TEXT_1, EVENT_WAVES_TEXT_2, EVENT_WAVES_TEXT_3, EVENT_WAVES_TEXT_4, EVENT_WAVES_TEXT_5, EVENT_WHIRLWIND, ObjectAccessor::GetCreature(), Map::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), Unit::GetMotionMaster(), GO_GYTH_ENTRY_DOOR, GO_STATE_READY, gythEvent, Unit::HandleEmoteCommand(), Unit::HasUnitState(), IN_PROGRESS, BossAI::instance, ScriptedAI::me, MotionMaster::MovePath(), Unit::NearTeleportTo(), NEFARIUS_PATH_1, NOT_STARTED, NPC_GYTH, REND_PATH_1, SAY_BLACKHAND_1, SAY_BLACKHAND_2, SAY_NEFARIUS_0, SAY_NEFARIUS_1, SAY_NEFARIUS_2, SAY_NEFARIUS_3, SAY_NEFARIUS_4, SAY_NEFARIUS_5, SAY_NEFARIUS_6, SAY_NEFARIUS_7, SAY_NEFARIUS_8, WorldObject::SelectNearestPlayer(), InstanceScript::SetBossState(), ZoneScript::SetData(), Unit::SetFacingTo(), SPELL_CLEAVE, SPELL_MORTAL_STRIKE, SPELL_WHIRLWIND, WorldObject::SummonCreature(), SummonWave(), UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), and victorGUID.

Member Data Documentation

◆ _currentWave

uint8 boss_rend_blackhand::boss_rend_blackhandAI::_currentWave
private

◆ gythEvent

bool boss_rend_blackhand::boss_rend_blackhandAI::gythEvent
private

Referenced by Reset(), SetData(), and UpdateAI().

◆ victorGUID

ObjectGuid boss_rend_blackhand::boss_rend_blackhandAI::victorGUID
private

Referenced by Reset(), SetData(), and UpdateAI().

◆ waveDoorGUID

ObjectGuid boss_rend_blackhand::boss_rend_blackhandAI::waveDoorGUID
private

Referenced by Reset(), SetData(), and SummonWave().