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

Public Member Functions

 boss_zuljin (Creature *creature)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void EnterEvadeMode (EvadeReason) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spellInfo) override
 
void KilledUnit (Unit *) override
 
ObjectGuid GetGUID (int32 index) const override
 
void JustDied (Unit *) override
 
void SpawnAdds ()
 
void MovementInform (uint32 type, uint32 id) override
 
void EnterPhase (uint32 NextPhase)
 
- 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)
 
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()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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 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
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () 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)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
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 *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
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:
 
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.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
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.
 
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.
 
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.
 
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.
 
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

ObjectGuid _chargeTargetGUID
 
uint8 _nextPhase
 

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

boss_zuljin::boss_zuljin ( Creature creature)
inline
139: BossAI(creature, DATA_ZULJIN) { }
Definition ScriptedCreature.h:467
@ DATA_ZULJIN
Definition zulaman.h:33

Member Function Documentation

◆ EnterEvadeMode()

void boss_zuljin::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from CreatureAI.

247 {
248 if (CreatureGroup* formation = me->GetFormation())
249 {
250 for (auto const& itr : formation->GetMembers())
251 {
252 if (itr.first && itr.first != me)
253 itr.first->DespawnOnEvade(2min);
254 }
255 }
256
257 me->DespawnOnEvade(2min);
259 }
void _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition ScriptedCreature.cpp:682
Definition CreatureGroups.h:90
CreatureGroup const * GetFormation() const
Definition Creature.h:357
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition Creature.cpp:2191
Creature * me
Definition ScriptedCreature.h:280

References BossAI::_EnterEvadeMode(), Creature::DespawnOnEvade(), Creature::GetFormation(), and ScriptedAI::me.

◆ EnterPhase()

void boss_zuljin::EnterPhase ( uint32  NextPhase)
inline
348 {
351 DoStopAttack();
353
355 me->RemoveAurasDueToSpell(Transform[NextPhase].unaura);
356
359 }, 1s);
360
361 _nextPhase = NextPhase;
362 }
@ REACT_PASSIVE
Definition Unit.h:548
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition UpdateFields.h:116
@ POINT_CENTER
Definition boss_zuljin.cpp:94
static TransformStruct Transform[4]
Definition boss_zuljin.cpp:129
const Position CenterPosition
Definition boss_zuljin.cpp:105
TaskScheduler scheduler
Definition CreatureAI.h:75
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:95
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Definition EventProcessor.h:107
void Clear(bool reset=true)
Definition MotionMaster.h:167
TaskScheduler & CancelAll()
Definition TaskScheduler.cpp:45
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4941
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:21372
EventProcessor m_Events
Definition Object.h:639
void DoStopAttack()
Definition ScriptedCreature.cpp:248
uint8 _nextPhase
Definition boss_zuljin.cpp:366

References _nextPhase, EventProcessor::AddEventAtOffset(), TaskScheduler::CancelAll(), CenterPosition, MotionMaster::Clear(), ScriptedAI::DoStopAttack(), Unit::GetMotionMaster(), WorldObject::m_Events, ScriptedAI::me, POINT_CENTER, REACT_PASSIVE, Unit::RemoveAurasDueToSpell(), CreatureAI::scheduler, Creature::SetReactState(), Unit::SetUInt32Value(), Transform, and UNIT_VIRTUAL_ITEM_SLOT_ID.

Referenced by JustEngagedWith().

◆ GetGUID()

ObjectGuid boss_zuljin::GetGUID ( int32  index) const
inlineoverridevirtual

Reimplemented from UnitAI.

276 {
277 if (index == GUID_CHARGE_TARGET)
278 return _chargeTargetGUID;
279
280 return ObjectGuid::Empty;
281 }
@ GUID_CHARGE_TARGET
Definition boss_zuljin.cpp:92
static ObjectGuid const Empty
Definition ObjectGuid.h:120
ObjectGuid _chargeTargetGUID
Definition boss_zuljin.cpp:365

References _chargeTargetGUID, ObjectGuid::Empty, and GUID_CHARGE_TARGET.

◆ JustDied()

void boss_zuljin::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

284 {
288
289 me->m_Events.AddEventAtOffset( [this] {
291 }, 3s);
292 }
@ DONE
Definition InstanceScript.h:61
@ SAY_DEATH
Definition boss_zuljin.cpp:38
@ CREATURE_COLUMN_OF_FIRE
Definition boss_zuljin.cpp:67
InstanceScript *const instance
Definition ScriptedCreature.h:474
SummonList summons
Definition ScriptedCreature.h:517
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:385
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:54
void DespawnAll(uint32 delay=0)
Definition ScriptedCreature.cpp:71
Talk
Definition hyjal.cpp:82

References EventProcessor::AddEventAtOffset(), CREATURE_COLUMN_OF_FIRE, DATA_ZULJIN, SummonList::DespawnAll(), SummonList::DespawnEntry(), DONE, BossAI::instance, WorldObject::m_Events, ScriptedAI::me, SAY_DEATH, InstanceScript::SetBossState(), and BossAI::summons.

◆ JustEngagedWith()

void boss_zuljin::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

154 {
157
159 SpawnAdds();
160
161 Talk(SAY_AGGRO, 37s);
162
163 // Phase 1: Default (troll)
164 ScheduleTimedEvent(12s, 29s, [&] {
166 }, 12s, 29s);
167
168 ScheduleTimedEvent(7s, 23s, [&] {
170 }, 7s, 23s);
171
175 }, 10min);
176
177 // Phase 2: Bear Form.
178 ScheduleHealthCheckEvent({ 80 }, [&] {
180 ScheduleTimedEvent(8s, [&] {
182 }, 26s, 30s);
183
184 ScheduleTimedEvent(1s, [&] {
188 }, 1s);
189 });
190
191 // Phase 3: Eagle Form.
192 ScheduleHealthCheckEvent({ 60 }, [&] {
194 });
195
196 // Phase 4: Lynx Form.
197 ScheduleHealthCheckEvent({ 40 }, [&] {
203
204 ScheduleTimedEvent(5s, [&] {
206 return;
207
209 }, 15s, 20s);
210
211 ScheduleTimedEvent(14s, [&] {
213 return;
214
216
217 for (int8 count = 0; count <= 8; ++count)
218 {
221 }, Seconds(1 * count), Seconds(1 * count), GROUP_LYNX);
222 }
223
224 }, 15s, 20s);
225 });
226
227 // Phase 5: Dragonhawk Form.
228 ScheduleHealthCheckEvent({ 20 }, [&] {
231
232 ScheduleTimedEvent(12s, 26s, [&] {
234 }, 12s, 26s);
235
236 ScheduleTimedEvent(11s, 42s, [&] {
238 }, 5s, 25s);
239
240 ScheduleTimedEvent(16s, 26s, [&] {
242 }, 6s, 25s);
243 });
244 }
std::int8_t int8
Definition Define.h:105
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:30
@ SPELL_CAST_OK
Definition SharedDefines.h:1138
@ SAY_AGGRO
Definition boss_zuljin.cpp:30
@ SAY_BERSERK
Definition boss_zuljin.cpp:36
@ SAY_INTRO
Definition boss_zuljin.cpp:29
@ GROUP_LYNX
Definition boss_zuljin.cpp:93
@ SPELL_LYNX_RUSH_HASTE
Definition boss_zuljin.cpp:61
@ SPELL_SUMMON_PILLAR
Definition boss_zuljin.cpp:66
@ SPELL_GRIEVOUS_THROW
Definition boss_zuljin.cpp:45
@ SPELL_CREEPING_PARALYSIS
Definition boss_zuljin.cpp:47
@ SPELL_FLAME_BREATH
Definition boss_zuljin.cpp:65
@ SPELL_ENERGY_STORM
Definition boss_zuljin.cpp:50
@ SPELL_FLAME_WHIRL
Definition boss_zuljin.cpp:64
@ SPELL_OVERPOWER
Definition boss_zuljin.cpp:48
@ CREATURE_FEATHER_VORTEX
Definition boss_zuljin.cpp:54
@ SPELL_CLAW_RAGE_CHARGE
Definition boss_zuljin.cpp:58
@ SPELL_LYNX_RUSH_DAMAGE
Definition boss_zuljin.cpp:62
@ SPELL_BERSERK
Definition boss_zuljin.cpp:78
@ SPELL_CLAW_RAGE_AURA
Definition boss_zuljin.cpp:59
@ SPELL_WHIRLWIND
Definition boss_zuljin.cpp:44
@ PHASE_EAGLE
Definition boss_zuljin.cpp:84
@ PHASE_DRAGONHAWK
Definition boss_zuljin.cpp:86
@ PHASE_LYNX
Definition boss_zuljin.cpp:85
@ PHASE_BEAR
Definition boss_zuljin.cpp:83
void _JustEngagedWith()
Definition ScriptedCreature.cpp:657
void ScheduleHealthCheckEvent(uint32 healthPct, std::function< void()> exec)
Executes a function once the creature reaches the defined health point percent.
Definition ScriptedCreature.cpp:775
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:106
bool HasSpellCooldown(uint32 spell_id) const override
Definition Creature.cpp:2932
void AddSpellCooldown(uint32 spell_id, uint32, uint32 end_time, bool needSendToClient=false, bool forceSendToSpectator=false) override
Definition Creature.cpp:2877
void ResumeChasingVictim()
Helper to resume chasing current victim.
Definition Creature.h:414
void CancelEventGroup(uint8 group)
Definition EventProcessor.cpp:114
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.
Definition UnitAI.cpp:259
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:248
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:240
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:392
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4737
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5753
Unit * GetVictim() const
Definition Unit.h:862
uint8 GetComboPoints(Unit const *who=nullptr) const
Definition Unit.h:967
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
Definition ScriptedCreature.cpp:321
void SpawnAdds()
Definition boss_zuljin.cpp:294
void EnterPhase(uint32 NextPhase)
Definition boss_zuljin.cpp:347

References BossAI::_JustEngagedWith(), EventProcessor::AddEventAtOffset(), Creature::AddSpellCooldown(), EventProcessor::CancelEventGroup(), CREATURE_FEATHER_VORTEX, SummonList::DespawnEntry(), UnitAI::DoCastAOE(), UnitAI::DoCastRandomTarget(), UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), CreatureAI::DoZoneInCombat(), EnterPhase(), Unit::GetComboPoints(), Unit::GetVictim(), GROUP_LYNX, Unit::HasAura(), Creature::HasSpellCooldown(), WorldObject::m_Events, ScriptedAI::me, PHASE_BEAR, PHASE_DRAGONHAWK, PHASE_EAGLE, PHASE_LYNX, Unit::RemoveAurasDueToSpell(), Unit::RemoveOwnedAura(), Creature::ResumeChasingVictim(), SAY_AGGRO, SAY_BERSERK, SAY_INTRO, BossAI::ScheduleHealthCheckEvent(), ScriptedAI::ScheduleTimedEvent(), SpawnAdds(), SPELL_BERSERK, SPELL_CAST_OK, SPELL_CLAW_RAGE_AURA, SPELL_CLAW_RAGE_CHARGE, SPELL_CREEPING_PARALYSIS, SPELL_ENERGY_STORM, SPELL_FLAME_BREATH, SPELL_FLAME_WHIRL, SPELL_GRIEVOUS_THROW, SPELL_LYNX_RUSH_DAMAGE, SPELL_LYNX_RUSH_HASTE, SPELL_OVERPOWER, SPELL_SUMMON_PILLAR, SPELL_WHIRLWIND, and BossAI::summons.

◆ KilledUnit()

void boss_zuljin::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

271 {
272 Talk(SAY_KILL);
273 }
@ SAY_KILL
Definition boss_zuljin.cpp:37

References SAY_KILL.

◆ MovementInform()

void boss_zuljin::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

308 {
309 if (type == POINT_MOTION_TYPE && id == POINT_CENTER)
310 {
312 {
313 spirit->CastSpell(me, SPELL_SPIRIT_DRAIN, false);
314 me->SetFacingToObject(spirit);
315 }
316
317 if (_nextPhase)
319 {
320 spirit->CastStop();
321 spirit->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD);
322 }
323
325
329
330 if (_nextPhase == PHASE_EAGLE)
331 {
332 me->SetCombatMovement(false);
333 DoCastSelf(SPELL_ENERGY_STORM, true); // enemy aura
335 me->SetFacingTo(me->GetHomePosition().GetOrientation());
336 }
337 else
338 {
340 me->SetCombatMovement(true);
342 }
343 }, 2s);
344 }
345 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
@ UNIT_STAND_STATE_DEAD
Definition UnitDefines.h:39
@ REACT_AGGRESSIVE
Definition Unit.h:550
@ UNIT_FIELD_BYTES_1
Definition UpdateFields.h:131
@ SPELL_SPIRIT_DRAIN
Definition boss_zuljin.cpp:71
@ SPELL_SUMMON_CYCLONE
Definition boss_zuljin.cpp:53
Definition Creature.h:43
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:342
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3863
Creature * GetCreatureWithEntry(uint32 entry) const
Definition ScriptedCreature.cpp:132
void SetFacingTo(float ori)
Definition Unit.cpp:20581
void SetFacingToObject(WorldObject *object)
Definition Unit.cpp:20591
void DoResetThreatList()
Definition ScriptedCreature.cpp:445
uint32 spiritEntry
Definition boss_zuljin.cpp:126

References _nextPhase, EventProcessor::AddEventAtOffset(), UnitAI::DoCastAOE(), UnitAI::DoCastSelf(), ScriptedAI::DoResetThreatList(), SummonList::GetCreatureWithEntry(), Creature::GetHomePosition(), WorldObject::m_Events, ScriptedAI::me, PHASE_EAGLE, POINT_CENTER, POINT_MOTION_TYPE, REACT_AGGRESSIVE, Creature::ResumeChasingVictim(), Creature::SetCombatMovement(), Unit::SetFacingTo(), Unit::SetFacingToObject(), Creature::SetReactState(), SPELL_ENERGY_STORM, SPELL_SPIRIT_DRAIN, SPELL_SUMMON_CYCLONE, TransformStruct::spiritEntry, BossAI::summons, Transform, UNIT_FIELD_BYTES_1, and UNIT_STAND_STATE_DEAD.

◆ Reset()

void boss_zuljin::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

142 {
143 _Reset();
145 me->SetCombatMovement(true);
146 me->m_Events.KillAllEvents(false);
147 _nextPhase = 0;
148
149 if (CreatureGroup* formation = me->GetFormation())
150 formation->RespawnFormation(true);
151 }
void _Reset()
Definition ScriptedCreature.cpp:624
void KillAllEvents(bool force)
Definition EventProcessor.cpp:82

References _nextPhase, BossAI::_Reset(), Creature::GetFormation(), EventProcessor::KillAllEvents(), WorldObject::m_Events, ScriptedAI::me, Creature::SetCombatMovement(), Unit::SetUInt32Value(), and UNIT_VIRTUAL_ITEM_SLOT_ID.

◆ SpawnAdds()

void boss_zuljin::SpawnAdds ( )
inline
295 {
296 for (auto const& spiritInfo : SpiritInfo)
297 {
298 if (Creature* creature = me->SummonCreature(spiritInfo.entry, spiritInfo.pos, TEMPSUMMON_DEAD_DESPAWN, 0))
299 {
300 creature->m_Events.AddEventAtOffset([creature] {
301 creature->CastSpell(creature, SPELL_SPIRIT_AURA);
302 }, 1s);
303 }
304 }
305 }
@ TEMPSUMMON_DEAD_DESPAWN
Definition Object.h:52
static SpiritInfoStruct SpiritInfo[4]
Definition boss_zuljin.cpp:113
@ SPELL_SPIRIT_AURA
Definition boss_zuljin.cpp:70
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:2368

References ScriptedAI::me, SPELL_SPIRIT_AURA, SpiritInfo, WorldObject::SummonCreature(), and TEMPSUMMON_DEAD_DESPAWN.

Referenced by JustEngagedWith().

◆ SpellHitTarget()

void boss_zuljin::SpellHitTarget ( Unit target,
SpellInfo const *  spellInfo 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

262 {
263 if (spellInfo->Id == SPELL_CLAW_RAGE_CHARGE && target != me)
264 {
266 _chargeTargetGUID = target->GetGUID();
267 }
268 }
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112

References _chargeTargetGUID, UnitAI::DoCastSelf(), Object::GetGUID(), SpellInfo::Id, ScriptedAI::me, SPELL_CLAW_RAGE_AURA, and SPELL_CLAW_RAGE_CHARGE.

Member Data Documentation

◆ _chargeTargetGUID

ObjectGuid boss_zuljin::_chargeTargetGUID
private

Referenced by GetGUID(), and SpellHitTarget().

◆ _nextPhase

uint8 boss_zuljin::_nextPhase
private

Referenced by EnterPhase(), MovementInform(), and Reset().


The documentation for this struct was generated from the following file: