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

Public Member Functions

 boss_ichoronAI (Creature *c)
 
void Reset () override
 
void DoAction (int32 param) override
 
void DoExplodeCompleted ()
 
void IchoronDoCastToAllHostilePlayers (uint32 spellId, bool triggered)
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void UpdateAI (uint32 uiDiff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustSummoned (Creature *pSummoned) override
 
void SummonedCreatureDespawn (Creature *pSummoned) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *victim) override
 
void MoveInLineOfSight (Unit *) override
 
void EnterEvadeMode (EvadeReason why) 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 bool CanRespawn ()
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
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.
 
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 *)
 
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 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:
 
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
 

Public Attributes

InstanceScriptpInstance
 
SummonList globules
 
bool bIsExploded
 
bool bIsFrenzy
 
uint32 uiWaterBoltVolleyTimer
 
uint32 uiDrainedTimer
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

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 ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- 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 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_ichoronAI()

boss_ichoron::boss_ichoronAI::boss_ichoronAI ( Creature c)
inline
79 {
81 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1203
Definition ScriptedCreature.h:190
Creature * me
Definition ScriptedCreature.h:280
InstanceScript * pInstance
Definition boss_ichoron.cpp:83
SummonList globules
Definition boss_ichoron.cpp:84

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DoAction()

void boss_ichoron::boss_ichoronAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

102 {
103 if (!me->IsAlive())
104 return;
105
106 switch (param)
107 {
109 if (pInstance)
112 if (bIsExploded)
114 break;
116 uint32 damage = me->CountPctFromMaxHealth(3);
117 damage = std::min(damage, me->GetHealth() - 1);
118 me->ModifyHealth(-int32(damage));
119 me->LowerPlayerDamageReq(damage);
120 break;
121 }
122 }
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
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true)
Definition Creature.cpp:3823
int32 ModifyHealth(int32 val)
Definition Unit.cpp:14143
bool IsAlive() const
Definition Unit.h:1707
uint32 GetHealth() const
Definition Unit.h:1038
uint32 CountPctFromMaxHealth(int32 pct) const
Definition Unit.h:1051
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
void DoExplodeCompleted()
Definition boss_ichoron.cpp:124
bool bIsExploded
Definition boss_ichoron.cpp:85
@ DATA_ACHIEV
Definition violet_hold.h:144

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

◆ DoExplodeCompleted()

void boss_ichoron::boss_ichoronAI::DoExplodeCompleted ( )
inline
125 {
126 bIsExploded = false;
128 if (!HealthBelowPct(25))
129 {
132 }
133
136 }
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:275
@ 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:3535
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4808
uint32 GetNativeDisplayId() const
Definition Unit.h:1889
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1178
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:720
Talk
Definition hyjal.cpp:82
bool HealthBelowPct(uint32 pct) const
Definition ScriptedCreature.h:364

References bIsExploded, Unit::CastSpell(), 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::boss_ichoronAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

286 {
289
290 if (pInstance)
292 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:251
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:208
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:719
@ DATA_FAILED
Definition violet_hold.h:139

References DATA_FAILED, CreatureAI::EnterEvadeMode(), ScriptedAI::me, pInstance, ZoneScript::SetData(), Unit::SetUnitFlag(), and UNIT_FLAG_NON_ATTACKABLE.

◆ IchoronDoCastToAllHostilePlayers()

void boss_ichoron::boss_ichoronAI::IchoronDoCastToAllHostilePlayers ( uint32  spellId,
bool  triggered 
)
inline
139 {
140 Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
141 if (PlayerList.IsEmpty())
142 return;
143
144 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
145 if (Player* plr = i->GetSource())
146 me->CastSpell(plr, spellId, triggered);
147 }
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:333
Definition Player.h:1081
Map * GetMap() const
Definition Object.h:536

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

Referenced by UpdateAI().

◆ JustDied()

void boss_ichoron::boss_ichoronAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

266 {
268 bIsExploded = false;
272 if (pInstance)
274 }
@ SAY_DEATH
Definition boss_ichoron.cpp:41
void DespawnAll(uint32 delay=0)
Definition ScriptedCreature.cpp:71
@ DATA_BOSS_DIED
Definition violet_hold.h:138

References bIsExploded, DATA_BOSS_DIED, SummonList::DespawnAll(), Unit::GetNativeDisplayId(), globules, ScriptedAI::me, pInstance, Unit::RemoveUnitFlag(), SAY_DEATH, ZoneScript::SetData(), Creature::SetDisplayId(), and UNIT_FLAG_NOT_SELECTABLE.

◆ JustEngagedWith()

void boss_ichoron::boss_ichoronAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

150 {
151 bIsExploded = false;
152 bIsFrenzy = false;
153 uiDrainedTimer = 15000;
154 uiWaterBoltVolleyTimer = urand(7000, 12000);
158 if (pInstance)
160 }
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ SAY_AGGRO
Definition boss_ichoron.cpp:39
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:106
uint32 uiDrainedTimer
Definition boss_ichoron.cpp:88
uint32 uiWaterBoltVolleyTimer
Definition boss_ichoron.cpp:87
bool bIsFrenzy
Definition boss_ichoron.cpp:86

References bIsExploded, bIsFrenzy, Unit::CastSpell(), DATA_ACHIEV, CreatureAI::DoZoneInCombat(), ScriptedAI::me, pInstance, SAY_AGGRO, ZoneScript::SetData(), SPELL_PROTECTIVE_BUBBLE, uiDrainedTimer, uiWaterBoltVolleyTimer, and urand().

◆ JustSummoned()

void boss_ichoron::boss_ichoronAI::JustSummoned ( Creature pSummoned)
inlineoverridevirtual

Reimplemented from CreatureAI.

242 {
243 if (pSummoned)
244 {
245 pSummoned->SetSpeed(MOVE_RUN, 0.3f);
247 pSummoned->GetMotionMaster()->MoveFollow(me, 0, 0);
248 me->CastSpell(pSummoned, SPELL_CREATE_GLOBULE_VISUAL, true); // triggered should ignore los
249 globules.Summon(pSummoned);
250 if (pInstance)
252 }
253 }
@ MOVEMENTFLAG_WALKING
Definition UnitDefines.h:373
@ MOVE_RUN
Definition UnitDefines.h:350
@ SPELL_CREATE_GLOBULE_VISUAL
Definition boss_ichoron.cpp:63
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:409
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:112
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:14481
void RemoveUnitMovementFlag(uint32 f)
Definition Unit.h:744
virtual void SetGuidData(uint32, ObjectGuid)
Definition ZoneScript.h:45
@ DATA_ADD_TRASH_MOB
Definition violet_hold.h:127

References Unit::CastSpell(), DATA_ADD_TRASH_MOB, Object::GetGUID(), Unit::GetMotionMaster(), globules, ScriptedAI::me, MOVE_RUN, MotionMaster::MoveFollow(), MOVEMENTFLAG_WALKING, pInstance, Unit::RemoveUnitMovementFlag(), ZoneScript::SetGuidData(), Unit::SetSpeed(), SPELL_CREATE_GLOBULE_VISUAL, and SummonList::Summon().

◆ KilledUnit()

void boss_ichoron::boss_ichoronAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

277 {
278 if (victim && victim->GetGUID() == me->GetGUID())
279 return;
280 Talk(SAY_SLAY);
281 }
@ SAY_SLAY
Definition boss_ichoron.cpp:40

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

◆ MoveInLineOfSight()

void boss_ichoron::boss_ichoronAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

283{}

◆ Reset()

◆ SummonedCreatureDespawn()

void boss_ichoron::boss_ichoronAI::SummonedCreatureDespawn ( Creature pSummoned)
inlineoverridevirtual

Reimplemented from CreatureAI.

256 {
257 if (pSummoned)
258 {
259 globules.Despawn(pSummoned);
260 if (pInstance)
262 }
263 }
void Despawn(Creature const *summon)
Definition ScriptedCreature.h:89
@ DATA_DELETE_TRASH_MOB
Definition violet_hold.h:128

References DATA_DELETE_TRASH_MOB, SummonList::Despawn(), Object::GetGUID(), globules, pInstance, and ZoneScript::SetGuidData().

◆ UpdateAI()

void boss_ichoron::boss_ichoronAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

163 {
164 if (!UpdateVictim())
165 return;
166
167 if (!bIsFrenzy && !bIsExploded && HealthBelowPct(25))
168 {
170 me->CastSpell(me, SPELL_FRENZY, true);
171 bIsFrenzy = true;
172 }
173
174 if (!bIsFrenzy)
175 {
176 if (!bIsExploded)
177 {
179 {
184 me->CastSpell(me, SPELL_DRAINED, true);
185 bIsExploded = true;
186 uiDrainedTimer = 15000;
188 me->SetDisplayId(11686);
189 for (uint8 i = 0; i < MAX_SPAWN_LOC; ++i)
190 {
191 float angle = rand_norm() * 2 * M_PI;
192 Position p1(SpawnLoc[i]), p2(SpawnLoc[i]);
193 p1.m_positionX += 2.5f * cos(angle);
194 p1.m_positionY += 2.5f * std::sin(angle);
195 p2.m_positionX -= 2.5f * cos(angle);
196 p2.m_positionY -= 2.5f * std::sin(angle);
199 }
200 }
201 }
202 else
203 {
204 if (uiDrainedTimer <= uiDiff)
206 else
207 {
208 uiDrainedTimer -= uiDiff;
209
210 bool bIsWaterElementsAlive = false;
211 if (!globules.empty())
212 {
213 for (ObjectGuid const& guid : globules)
214 if (Creature* pTemp = ObjectAccessor::GetCreature(*me, guid))
215 if (pTemp->IsAlive())
216 {
217 bIsWaterElementsAlive = true;
218 break;
219 }
220 }
221
222 if (!bIsWaterElementsAlive)
224 }
225 }
226 }
227
228 if (!bIsExploded)
229 {
230 if (uiWaterBoltVolleyTimer <= uiDiff)
231 {
232 me->CastSpell((Unit*)nullptr, SPELL_WATER_BOLT_VOLLEY, false);
233 uiWaterBoltVolleyTimer = urand(10000, 15000);
234 }
235 else uiWaterBoltVolleyTimer -= uiDiff;
236 }
237
239 }
std::uint8_t uint8
Definition Define.h:109
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition Object.h:46
double rand_norm()
Definition Random.cpp:77
@ 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
Creature * DoSummon(uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
Definition CreatureAI.cpp:424
bool UpdateVictim()
Definition CreatureAI.cpp:280
Definition Creature.h:43
Definition ObjectGuid.h:118
bool empty() const
Definition ScriptedCreature.h:73
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
Definition Unit.h:636
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4161
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5753
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:138

References bIsExploded, bIsFrenzy, Unit::CastSpell(), DoExplodeCompleted(), UnitAI::DoMeleeAttackIfReady(), CreatureAI::DoSummon(), CreatureAI::DoZoneInCombat(), SummonList::empty(), ObjectAccessor::GetCreature(), globules, 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, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, uiDrainedTimer, uiWaterBoltVolleyTimer, UNIT_FLAG_NOT_SELECTABLE, CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ bIsExploded

bool boss_ichoron::boss_ichoronAI::bIsExploded

◆ bIsFrenzy

bool boss_ichoron::boss_ichoronAI::bIsFrenzy

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

◆ globules

SummonList boss_ichoron::boss_ichoronAI::globules

◆ pInstance

◆ uiDrainedTimer

uint32 boss_ichoron::boss_ichoronAI::uiDrainedTimer

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

◆ uiWaterBoltVolleyTimer

uint32 boss_ichoron::boss_ichoronAI::uiWaterBoltVolleyTimer

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


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