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

Public Member Functions

 boss_ichoron (Creature *c)
 
void Reset () override
 
void DoAction (int32 param) override
 
void DoExplodeCompleted ()
 
void IchoronDoCastToAllHostilePlayers (uint32 spellId, bool triggered)
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustSummoned (Creature *summoned) override
 
void SummonedCreatureDespawn (Creature *summoned) override
 
void JustDied (Unit *killer) override
 
void KilledUnit (Unit *victim) override
 
void MoveInLineOfSight (Unit *) override
 
void EnterEvadeMode (EvadeReason why) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) 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, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
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 - this happens after JustEnteredCombat.
 
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 - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, 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=0ms)
 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
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool IsEscortNPC (bool=true) const
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, 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 *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
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 ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
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)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, 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:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
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

bool _isExploded
 
bool _isFrenzy
 

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)
 
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
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_ichoron()

boss_ichoron::boss_ichoron ( Creature c)
inline
74: BossAI(c, BOSS_ICHORON) { }
Definition ScriptedCreature.h:485
@ BOSS_ICHORON
Definition violet_hold.h:137

Member Function Documentation

◆ DoAction()

void boss_ichoron::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

86 {
87 if (!me->IsAlive())
88 return;
89
90 switch (param)
91 {
95 if (_isExploded)
97 break;
99 uint32 damage = me->CountPctFromMaxHealth(3);
100 damage = std::min(damage, me->GetHealth() - 1);
101 me->ModifyHealth(-int32(damage));
102 me->LowerPlayerDamageReq(damage);
103 break;
104 }
105 }
std::int32_t int32
Definition Define.h:103
std::uint32_t uint32
Definition Define.h:107
#define ACTION_WATER_ELEMENT_KILLED
Definition boss_ichoron.cpp:25
#define ACTION_WATER_ELEMENT_HIT
Definition boss_ichoron.cpp:24
InstanceScript *const instance
Definition ScriptedCreature.h:492
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true)
Definition Creature.cpp:3837
int32 ModifyHealth(int32 val)
Definition Unit.cpp:10966
bool IsAlive() const
Definition Unit.h:1794
uint32 GetHealth() const
Definition Unit.h:1108
uint32 CountPctFromMaxHealth(int32 pct) const
Definition Unit.h:1121
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
Creature * me
Definition ScriptedCreature.h:281
bool _isExploded
Definition boss_ichoron.cpp:269
void DoExplodeCompleted()
Definition boss_ichoron.cpp:107
@ DATA_ACHIEV
Definition violet_hold.h:52

References _isExploded, ACTION_WATER_ELEMENT_HIT, ACTION_WATER_ELEMENT_KILLED, Unit::CountPctFromMaxHealth(), DATA_ACHIEV, DoExplodeCompleted(), Unit::GetHealth(), BossAI::instance, Unit::IsAlive(), Creature::LowerPlayerDamageReq(), ScriptedAI::me, Unit::ModifyHealth(), and ZoneScript::SetData().

◆ DoExplodeCompleted()

void boss_ichoron::DoExplodeCompleted ( )
inline
108 {
109 _isExploded = false;
111 if (!HealthBelowPct(25))
112 {
115 }
116
119 }
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ SAY_BUBBLE
Definition boss_ichoron.cpp:45
@ SPELL_PROTECTIVE_BUBBLE
Definition boss_ichoron.cpp:57
@ SPELL_DRAINED
Definition boss_ichoron.cpp:55
void SetDisplayId(uint32 displayId, float displayScale=1.f) override
Definition Creature.cpp:3513
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:394
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5038
uint32 GetNativeDisplayId() const
Definition Unit.h:1977
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
Talk
Definition hyjal.cpp:82
bool HealthBelowPct(uint32 pct) const
Definition ScriptedCreature.h:368

References _isExploded, UnitAI::DoCastSelf(), Unit::GetNativeDisplayId(), ScriptedAI::HealthBelowPct(), ScriptedAI::me, Unit::RemoveAura(), Unit::RemoveUnitFlag(), SAY_BUBBLE, Creature::SetDisplayId(), SPELL_DRAINED, SPELL_PROTECTIVE_BUBBLE, and UNIT_FLAG_NOT_SELECTABLE.

Referenced by DoAction(), and UpdateAI().

◆ EnterEvadeMode()

void boss_ichoron::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

263 {
265 _EnterEvadeMode(why);
266 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:258
void _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition ScriptedCreature.cpp:702
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:748

References BossAI::_EnterEvadeMode(), ScriptedAI::me, Unit::SetUnitFlag(), and UNIT_FLAG_NON_ATTACKABLE.

◆ IchoronDoCastToAllHostilePlayers()

void boss_ichoron::IchoronDoCastToAllHostilePlayers ( uint32  spellId,
bool  triggered 
)
inline
122 {
123 Map::PlayerList const& playerList = me->GetMap()->GetPlayers();
124 if (playerList.IsEmpty())
125 return;
126
127 for (Map::PlayerList::const_iterator i = playerList.begin(); i != playerList.end(); ++i)
128 if (Player* plr = i->GetSource())
129 DoCast(plr, spellId, triggered);
130 }
Definition LinkedList.h:139
bool IsEmpty() const
Definition LinkedList.h:97
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:329
Definition Player.h:1084
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:178
Map * GetMap() const
Definition Object.h:625

References MapRefMgr::begin(), UnitAI::DoCast(), MapRefMgr::end(), WorldObject::GetMap(), Map::GetPlayers(), LinkedListHead::IsEmpty(), and ScriptedAI::me.

Referenced by UpdateAI().

◆ JustDied()

void boss_ichoron::JustDied ( Unit killer)
inlineoverridevirtual

Reimplemented from CreatureAI.

245 {
247 _isExploded = false;
250 BossAI::JustDied(killer);
251 }
@ SAY_DEATH
Definition boss_ichoron.cpp:41
void JustDied(Unit *) override
Definition ScriptedCreature.h:527

References _isExploded, Unit::GetNativeDisplayId(), BossAI::JustDied(), ScriptedAI::me, Unit::RemoveUnitFlag(), SAY_DEATH, Creature::SetDisplayId(), and UNIT_FLAG_NOT_SELECTABLE.

◆ JustEngagedWith()

void boss_ichoron::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

133 {
134 _isExploded = false;
135 _isFrenzy = false;
139 events.RescheduleEvent(EVENT_WATER_BOLT_VOLLEY, 7s, 12s);
141 }
@ EVENT_WATER_BOLT_VOLLEY
Definition boss_ichoron.cpp:68
@ SAY_AGGRO
Definition boss_ichoron.cpp:39
events
Definition boss_sartura.cpp:43
void JustEngagedWith(Unit *) override
Called for reaction when initially engaged - this happens after JustEnteredCombat.
Definition ScriptedCreature.h:525
bool _isFrenzy
Definition boss_ichoron.cpp:270

References _isExploded, _isFrenzy, DATA_ACHIEV, UnitAI::DoCastSelf(), EVENT_WATER_BOLT_VOLLEY, BossAI::instance, BossAI::JustEngagedWith(), SAY_AGGRO, ZoneScript::SetData(), and SPELL_PROTECTIVE_BUBBLE.

◆ JustSummoned()

void boss_ichoron::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from CreatureAI.

223 {
224 if (summoned)
225 {
226 summoned->SetSpeed(MOVE_RUN, 0.3f);
228 summoned->GetMotionMaster()->MoveFollow(me, 0, 0, MOTION_SLOT_ACTIVE, false, false);
229 DoCast(summoned, SPELL_CREATE_GLOBULE_VISUAL, true);
230 BossAI::JustSummoned(summoned);
232 }
233 }
@ MOTION_SLOT_ACTIVE
Definition MotionMaster.h:65
@ MOVEMENTFLAG_WALKING
Definition UnitDefines.h:380
@ MOVE_RUN
Definition UnitDefines.h:357
@ SPELL_CREATE_GLOBULE_VISUAL
Definition boss_ichoron.cpp:63
void JustSummoned(Creature *summon) override
Definition ScriptedCreature.cpp:725
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE, bool inheritWalkState=true, bool inheritSpeed=true)
The unit will follow this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:447
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:114
MotionMaster * GetMotionMaster()
Definition Unit.h:1759
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:11296
void RemoveUnitMovementFlag(uint32 f)
Definition Unit.h:773
virtual void SetGuidData(uint32, ObjectGuid)
Definition ZoneScript.h:45
@ DATA_ADD_TRASH_MOB
Definition violet_hold.h:48

References DATA_ADD_TRASH_MOB, UnitAI::DoCast(), Object::GetGUID(), Unit::GetMotionMaster(), BossAI::instance, BossAI::JustSummoned(), ScriptedAI::me, MOTION_SLOT_ACTIVE, MOVE_RUN, MotionMaster::MoveFollow(), MOVEMENTFLAG_WALKING, Unit::RemoveUnitMovementFlag(), ZoneScript::SetGuidData(), Unit::SetSpeed(), and SPELL_CREATE_GLOBULE_VISUAL.

◆ KilledUnit()

void boss_ichoron::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

254 {
255 if (victim && victim->GetGUID() == me->GetGUID())
256 return;
257 Talk(SAY_SLAY);
258 }
@ SAY_SLAY
Definition boss_ichoron.cpp:40

References Object::GetGUID(), ScriptedAI::me, and SAY_SLAY.

◆ MoveInLineOfSight()

void boss_ichoron::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

260{}

◆ Reset()

void boss_ichoron::Reset ( )
inlineoverridevirtual

◆ SummonedCreatureDespawn()

void boss_ichoron::SummonedCreatureDespawn ( Creature summoned)
inlineoverridevirtual

Reimplemented from CreatureAI.

236 {
237 if (summoned)
238 {
241 }
242 }
void SummonedCreatureDespawn(Creature *summon) override
Definition ScriptedCreature.cpp:732
@ DATA_DELETE_TRASH_MOB
Definition violet_hold.h:49

References DATA_DELETE_TRASH_MOB, Object::GetGUID(), BossAI::instance, ZoneScript::SetGuidData(), and BossAI::SummonedCreatureDespawn().

◆ UpdateAI()

void boss_ichoron::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

144 {
145 if (!UpdateVictim())
146 return;
147
148 events.Update(diff);
149
150 if (!_isFrenzy && !_isExploded && HealthBelowPct(25))
151 {
154 _isFrenzy = true;
155 }
156
157 if (!_isFrenzy)
158 {
159 if (!_isExploded)
160 {
162 {
168 _isExploded = true;
169 events.CancelEvent(EVENT_WATER_BOLT_VOLLEY);
170 events.RescheduleEvent(EVENT_DRAINED_CHECK, 15s);
172 me->SetDisplayId(11686);
173 for (uint8 i = 0; i < MAX_SPAWN_LOC; ++i)
174 {
175 float angle = rand_norm() * 2 * M_PI;
176 Position p1(SpawnLoc[i]), p2(SpawnLoc[i]);
177 p1.m_positionX += 2.5f * cos(angle);
178 p1.m_positionY += 2.5f * std::sin(angle);
179 p2.m_positionX -= 2.5f * cos(angle);
180 p2.m_positionY -= 2.5f * std::sin(angle);
183 }
184 }
185 }
186 else
187 {
188 if (events.ExecuteEvent() == EVENT_DRAINED_CHECK)
190 else
191 {
192 bool isWaterElementsAlive = false;
193 if (!summons.empty())
194 {
195 for (ObjectGuid const& guid : summons)
196 if (Creature* temp = ObjectAccessor::GetCreature(*me, guid))
197 if (temp->IsAlive())
198 {
199 isWaterElementsAlive = true;
200 break;
201 }
202 }
203
204 if (!isWaterElementsAlive)
206 }
207 }
208 }
209
210 if (!_isExploded)
211 {
212 if (events.ExecuteEvent() == EVENT_WATER_BOLT_VOLLEY)
213 {
215 events.Repeat(10s, 15s);
216 }
217 }
218
220 }
std::uint8_t uint8
Definition Define.h:109
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition Object.h:49
double rand_norm()
Definition Random.cpp:85
@ EVENT_DRAINED_CHECK
Definition boss_ichoron.cpp:69
@ SAY_SHATTER
Definition boss_ichoron.cpp:44
@ SAY_ENRAGE
Definition boss_ichoron.cpp:43
@ NPC_ICHOR_GLOBULE
Definition boss_ichoron.cpp:50
static Position SpawnLoc[MAX_SPAWN_LOC]
Definition boss_ichoron.cpp:28
#define MAX_SPAWN_LOC
Definition boss_ichoron.cpp:27
@ SPELL_WATER_BOLT_VOLLEY
Definition boss_ichoron.cpp:59
@ SPELL_FRENZY
Definition boss_ichoron.cpp:56
@ SPELL_WATER_BLAST
Definition boss_ichoron.cpp:58
SummonList summons
Definition ScriptedCreature.h:539
Creature * DoSummon(uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
Definition CreatureAI.cpp:628
bool UpdateVictim()
Definition CreatureAI.cpp:350
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:117
Definition Creature.h:47
Definition ObjectGuid.h:118
bool empty() const
Definition ScriptedCreature.h:73
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:285
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:40
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4316
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5999
Definition ObjectAccessor.h:61
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210
Definition Position.h:27
void IchoronDoCastToAllHostilePlayers(uint32 spellId, bool triggered)
Definition boss_ichoron.cpp:121

References _isExploded, _isFrenzy, UnitAI::DoCastAOE(), UnitAI::DoCastSelf(), DoExplodeCompleted(), UnitAI::DoMeleeAttackIfReady(), CreatureAI::DoSummon(), CreatureAI::DoZoneInCombat(), SummonList::empty(), EVENT_DRAINED_CHECK, EVENT_WATER_BOLT_VOLLEY, ObjectAccessor::GetCreature(), Unit::HasAura(), ScriptedAI::HealthBelowPct(), IchoronDoCastToAllHostilePlayers(), Unit::InterruptNonMeleeSpells(), Position::m_positionX, Position::m_positionY, MAX_SPAWN_LOC, ScriptedAI::me, NPC_ICHOR_GLOBULE, rand_norm(), SAY_ENRAGE, SAY_SHATTER, Creature::SetDisplayId(), Unit::SetUnitFlag(), SpawnLoc, SPELL_DRAINED, SPELL_FRENZY, SPELL_PROTECTIVE_BUBBLE, SPELL_WATER_BLAST, SPELL_WATER_BOLT_VOLLEY, BossAI::summons, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, UNIT_FLAG_NOT_SELECTABLE, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _isExploded

bool boss_ichoron::_isExploded
private

◆ _isFrenzy

bool boss_ichoron::_isFrenzy
private

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


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