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

Public Member Functions

 npc_akama_illidan (Creature *creature)
 
void Reset () override
 
void sGossipSelect (Player *player, uint32, uint32) override
 
void DoAction (int32 param) override
 
void MovementInform (uint32 type, uint32 id) override
 
void PathEndReached (uint32 pathId) override
 
void JustReachedHome () override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
void KilledUnit (Unit *victim) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void DamageTaken (Unit *, uint32 &damage, 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...
 
- 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
 
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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon. More...
 
 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

InstanceScriptinstance
 
SummonList summons
 

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 ScriptedAI
Creatureme
 
- 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)
 
virtual void MoveInLineOfSight (Unit *)
 
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

◆ npc_akama_illidan()

npc_akama_illidan::npc_akama_illidan ( Creature creature)
inline
769 : ScriptedAI(creature), summons(me)
770 {
771 instance = creature->GetInstanceScript();
772 }
Definition: ScriptedCreature.h:190
Creature * me
Definition: ScriptedCreature.h:280
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
InstanceScript * instance
Definition: boss_illidan.cpp:1074
SummonList summons
Definition: boss_illidan.cpp:1075

References WorldObject::GetInstanceScript(), and instance.

Member Function Documentation

◆ DamageTaken()

void npc_akama_illidan::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from ScriptedAI.

1058 {
1059 if (damage >= me->GetHealth())
1060 damage = me->GetHealth() - 1;
1061 }
uint32 GetHealth() const
Definition: Unit.h:1029

References Unit::GetHealth(), and ScriptedAI::me.

◆ DoAction()

void npc_akama_illidan::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

807 {
808 switch (param)
809 {
811 {
815 }
816 break;
818 {
820 }
821 break;
823 {
824 if (me->IsEngaged())
825 {
829 }
830 else
831 {
834 }
835 }
836 break;
838 {
842 }, 3490ms);
846 }, 8340ms); // 4850ms
849 }, 8740ms);
850 }
851 break;
852 }
853 }
constexpr auto WEEK
Definition: Common.h:50
@ SPELL_AKAMA_DESPAWN
Definition: boss_illidan.cpp:721
@ SAY_AKAMA_LIGHT
Definition: boss_illidan.cpp:743
@ PATH_AKAMA_ILLIDARI_COUNCIL_1
Definition: boss_illidan.cpp:728
@ POINT_ILLIDAN_DEFEATED_1
Definition: boss_illidan.cpp:710
@ ACTION_AKAMA_MINIONS
Definition: boss_illidan.cpp:122
@ ACTION_ILLIDARI_COUNCIL_DONE
Definition: boss_illidan.cpp:121
@ ACTION_AKAMA_MAIEV_DESPAWN
Definition: boss_illidan.cpp:124
@ ACTION_AKAMA_ENDING
Definition: boss_illidan.cpp:123
Position IllidanDefeated
Definition: boss_illidan.cpp:752
Position AkamaIllidariCouncilTeleport
Definition: boss_illidan.cpp:748
Talk
Definition: hyjal.cpp:82
@ EMOTE_ONESHOT_SALUTE
Definition: SharedDefines.h:1942
@ REACT_PASSIVE
Definition: Unit.h:548
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_STATE_ROOT
Definition: UnitDefines.h:159
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Definition: EventProcessor.h:107
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition: UnitAI.h:392
@ EVADE_REASON_OTHER
Definition: CreatureAI.h:93
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:208
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition: Creature.cpp:2186
void SetRespawnDelay(uint32 delay)
Definition: Creature.h:292
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:94
EventProcessor m_Events
Definition: Object.h:642
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:727
bool IsEngaged() const
Definition: Unit.h:881
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition: Unit.cpp:18034
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition: Unit.cpp:19979
void HandleEmoteCommand(uint32 emoteId)
Definition: Unit.cpp:2000
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:213
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:852

References ACTION_AKAMA_ENDING, ACTION_AKAMA_MAIEV_DESPAWN, ACTION_AKAMA_MINIONS, ACTION_ILLIDARI_COUNCIL_DONE, EventProcessor::AddEventAtOffset(), AkamaIllidariCouncilTeleport, SummonList::DespawnAll(), Creature::DespawnOnEvade(), UnitAI::DoCastSelf(), EMOTE_ONESHOT_SALUTE, CreatureAI::EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, Unit::GetMotionMaster(), Unit::HandleEmoteCommand(), IllidanDefeated, Unit::IsEngaged(), WorldObject::m_Events, ScriptedAI::me, MotionMaster::MovePath(), MotionMaster::MovePoint(), Unit::NearTeleportTo(), PATH_AKAMA_ILLIDARI_COUNCIL_1, POINT_ILLIDAN_DEFEATED_1, REACT_PASSIVE, Unit::RemoveNpcFlag(), SAY_AKAMA_LIGHT, Unit::SetControlled(), Creature::SetReactState(), Creature::SetRespawnDelay(), SPELL_AKAMA_DESPAWN, summons, UNIT_NPC_FLAG_GOSSIP, UNIT_STATE_ROOT, and WEEK.

◆ JustEngagedWith()

void npc_akama_illidan::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

1046 {
1047 ScheduleTimedEvent(12s, 18s, [&] {
1049 }, 16s, 24s);
1050
1051 ScheduleTimedEvent(5s, 10s, [&] {
1052 if (me->HealthBelowPct(20))
1054 }, 5s, 10s);
1055 }
@ SPELL_HEALING_POTION
Definition: boss_illidan.cpp:717
@ SPELL_CHAIN_LIGHTNING
Definition: boss_illidan.cpp:718
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:240
void ScheduleTimedEvent(Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
Definition: ScriptedCreature.cpp:321
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:1037

References UnitAI::DoCastSelf(), UnitAI::DoCastVictim(), Unit::HealthBelowPct(), ScriptedAI::me, ScriptedAI::ScheduleTimedEvent(), SPELL_CHAIN_LIGHTNING, and SPELL_HEALING_POTION.

◆ JustReachedHome()

void npc_akama_illidan::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

1001 {
1002 // Minions Event
1004 {
1008
1011 }, 6700ms);
1014 }, 9530ms); // 2830ms
1017 }, 14400ms); // 4870ms
1018 }
1019 }
@ SAY_AKAMA_MINIONS
Definition: boss_illidan.cpp:742
@ PATH_AKAMA_MINIONS
Definition: boss_illidan.cpp:731
@ SPELL_DEATH
Definition: boss_illidan.cpp:95
@ DATA_ILLIDAN_STORMRAGE
Definition: black_temple.h:38
@ EMOTE_STATE_READY1H
Definition: SharedDefines.h:1966
@ EMOTE_ONESHOT_EXCLAMATION
Definition: SharedDefines.h:1899
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5698
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21316
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:103
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235

References EventProcessor::AddEventAtOffset(), DATA_ILLIDAN_STORMRAGE, EMOTE_ONESHOT_EXCLAMATION, EMOTE_STATE_READY1H, InstanceScript::GetBossState(), InstanceScript::GetCreature(), Unit::GetMotionMaster(), Unit::HandleEmoteCommand(), Unit::HasAura(), IN_PROGRESS, instance, WorldObject::m_Events, ScriptedAI::me, MotionMaster::MovePath(), PATH_AKAMA_MINIONS, REACT_PASSIVE, Unit::RemoveNpcFlag(), SAY_AKAMA_MINIONS, Creature::SetReactState(), Unit::SetUInt32Value(), SPELL_DEATH, UNIT_NPC_EMOTESTATE, and UNIT_NPC_FLAG_GOSSIP.

◆ JustSummoned()

void npc_akama_illidan::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1022 {
1023 summons.Summon(summon);
1025 if (summon->GetEntry() == NPC_ILLIDARI_ELITE)
1026 {
1027 me->AddThreat(summon, 1000000.0f);
1028 summon->AddThreat(me, 1000000.0f);
1029 summon->AI()->AttackStart(me);
1030 AttackStart(summon);
1031 }
1032 }
@ NPC_ILLIDARI_ELITE
Definition: boss_illidan.cpp:726
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:293
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:210
CreatureAI * AI() const
Definition: Creature.h:140
uint32 GetEntry() const
Definition: Object.h:115
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14653
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:728

References Unit::AddThreat(), Creature::AI(), UnitAI::AttackStart(), ScriptedAI::AttackStart(), Object::GetEntry(), ScriptedAI::me, NPC_ILLIDARI_ELITE, Unit::ReplaceAllNpcFlags(), SummonList::Summon(), summons, and UNIT_NPC_FLAG_NONE.

◆ KilledUnit()

void npc_akama_illidan::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1040 {
1041 if (victim->GetEntry() == NPC_ILLIDARI_ELITE)
1043 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
Position IllidariMinionPos[10]
Definition: boss_illidan.cpp:753
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:49
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:2366

References Object::GetEntry(), IllidariMinionPos, ScriptedAI::me, NPC_ILLIDARI_ELITE, WorldObject::SummonCreature(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, and urand().

◆ MovementInform()

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

Reimplemented from ScriptedAI.

856 {
857 if (type == POINT_MOTION_TYPE)
858 {
859 switch (id)
860 {
862 {
864 {
865 me->SetFacingToObject(illidan);
866 illidan->AI()->DoAction(ACTION_START_EVENT);
868 }
871 }, 15400ms);
874 }, 19440ms); // 4040ms
877 }, 23080ms); // 3640ms
880 }, 33840ms); // 10760ms
884 }, 35210ms); // 1370ms
888 }, 37640ms); // 2430ms
889 }
890 break;
892 {
893 me->SetWalk(true);
895 {
896 float x, y, z;
897 me->GetNearPoint(illidan, x, y, z, 15.f, 0, me->GetAngle(illidan));
898 me->GetMotionMaster()->MovePoint(POINT_ILLIDAN_DEFEATED_2, x, y, z); // Maiev starts Akama's Ending scene
899 }
900 }
901 break;
902 }
903 }
904 else if (type == WAYPOINT_MOTION_TYPE)
905 {
907 if (id == 2)
909 }
910 }
@ SAY_AKAMA_TIME_HAS_COME
Definition: boss_illidan.cpp:741
@ POINT_FACE_ILLIDAN
Definition: boss_illidan.cpp:709
@ SAY_AKAMA_FREE
Definition: boss_illidan.cpp:740
@ SPELL_AKAMA_TELEPORT
Definition: boss_illidan.cpp:720
@ POINT_ILLIDAN_DEFEATED_2
Definition: boss_illidan.cpp:711
@ ACTION_START_EVENT
Definition: boss_illidan.cpp:112
@ EMOTE_ONESHOT_ROAR
Definition: SharedDefines.h:1907
@ EMOTE_ONESHOT_TALK
Definition: SharedDefines.h:1895
@ SHEATH_STATE_MELEE
Definition: UnitDefines.h:106
@ WAYPOINT_MOTION_TYPE
Definition: MotionMaster.h:41
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:48
Definition: Creature.h:43
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:336
uint32 GetCurrentWaypointID() const
Definition: Creature.h:349
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3191
void GetNearPoint(WorldObject const *searcher, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle, float controlZ=0, Position const *startPos=nullptr) const
Definition: Object.cpp:2637
void GetPosition(float &x, float &y) const
Definition: Position.h:121
float GetAngle(const Position *pos) const
Definition: Position.cpp:78
void SetFacingToObject(WorldObject *object)
Definition: Unit.cpp:20537
virtual void SetSheath(SheathState sheathed)
Definition: Unit.h:1639

References ACTION_START_EVENT, EventProcessor::AddEventAtOffset(), DATA_ILLIDAN_STORMRAGE, UnitAI::DoCastSelf(), EMOTE_ONESHOT_ROAR, EMOTE_ONESHOT_SALUTE, EMOTE_ONESHOT_TALK, EMOTE_STATE_READY1H, Position::GetAngle(), InstanceScript::GetCreature(), Creature::GetCurrentWaypointID(), Unit::GetMotionMaster(), WorldObject::GetNearPoint(), Position::GetPosition(), Unit::HandleEmoteCommand(), instance, WorldObject::m_Events, ScriptedAI::me, MotionMaster::MovePoint(), PATH_AKAMA_MINIONS, POINT_FACE_ILLIDAN, POINT_ILLIDAN_DEFEATED_1, POINT_ILLIDAN_DEFEATED_2, POINT_MOTION_TYPE, SAY_AKAMA_FREE, SAY_AKAMA_TIME_HAS_COME, Unit::SetFacingToObject(), Creature::SetHomePosition(), Unit::SetSheath(), Unit::SetUInt32Value(), Creature::SetWalk(), SHEATH_STATE_MELEE, SPELL_AKAMA_TELEPORT, UNIT_NPC_EMOTESTATE, and WAYPOINT_MOTION_TYPE.

◆ PathEndReached()

void npc_akama_illidan::PathEndReached ( uint32  pathId)
inlineoverridevirtual

Reimplemented from CreatureAI.

913 {
914 switch (pathId)
915 {
916 // Talk to Open Door
918 {
921 }, 200ms);
922
926 }, 8000ms); // 7800ms
927 }
928 break;
929 // Reached Door
931 {
934 }, 4600ms);
937 }, 8120ms); // 3520ms
940 }, 17860ms); // 9740ms
944 }, 23930ms); // 6070ms
947 udalo->AI()->Talk(SAY_UDALO);
948 }, 25190ms); // 1260ms
951 olum->AI()->Talk(SAY_OLUM);
952 }, 31370ms); // 6180ms
956 udalo->AI()->DoCastSelf(SPELL_DEATHSWORN_DOOR_OPEN);
958 olum->AI()->DoCastSelf(SPELL_DEATHSWORN_DOOR_OPEN);
959 }, 39710ms); // 8340ms
962 door->AI()->DoCastSelf(SPELL_ARCANE_EXPLOSION_VIS);
963 }, 50660ms); // 10950ms
967 udalo->InterruptNonMeleeSpells(false);
969 olum->InterruptNonMeleeSpells(false);
972 }, 50680ms); // 20ms
975 }, 56955ms); // 6275ms
978 }, 64030ms); // 7075ms
979 }
980 break;
981 // Talk to Initiate Fight
983 {
986 }
987 break;
989 {
992
993 for (int i = 0; i < 10; ++i)
995 }
996 break;
997 }
998 }
@ NPC_SPIRIT_OF_UDALO
Definition: boss_illidan.cpp:725
@ SPELL_DEATHSWORN_DOOR_OPEN
Definition: boss_illidan.cpp:715
@ SAY_OLUM
Definition: boss_illidan.cpp:734
@ SAY_AKAMA_SALUTE
Definition: boss_illidan.cpp:738
@ SAY_AKAMA_DOOR
Definition: boss_illidan.cpp:736
@ SAY_AKAMA_ALONE
Definition: boss_illidan.cpp:737
@ NPC_SPIRIT_OF_OLUM
Definition: boss_illidan.cpp:724
@ PATH_AKAMA_ILLIDARI_COUNCIL_3
Definition: boss_illidan.cpp:730
@ SPELL_ARCANE_EXPLOSION_VIS
Definition: boss_illidan.cpp:716
@ SPELL_AKAMA_DOOR_OPEN
Definition: boss_illidan.cpp:713
@ PATH_AKAMA_ILLIDARI_COUNCIL_2
Definition: boss_illidan.cpp:729
@ NPC_ILLIDAN_DOOR_TRIGGER
Definition: boss_illidan.cpp:723
@ SAY_AKAMA_COUNCIL_2
Definition: boss_illidan.cpp:745
@ SAY_AKAMA_BETRAYER
Definition: boss_illidan.cpp:739
@ SAY_UDALO
Definition: boss_illidan.cpp:733
@ SPELL_AKAMA_DOOR_FAIL
Definition: boss_illidan.cpp:714
@ SAY_AKAMA_COUNCIL_1
Definition: boss_illidan.cpp:744
Position SpiritUdaloPos
Definition: boss_illidan.cpp:749
Position SpiritOlumPos
Definition: boss_illidan.cpp:750
@ DATA_AKAMA_ILLIDAN
Definition: black_temple.h:37
@ DONE
Definition: InstanceScript.h:60
@ NOT_STARTED
Definition: InstanceScript.h:57
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:48
@ REACT_AGGRESSIVE
Definition: Unit.h:550
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2457
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4129
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:726
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:373

References EventProcessor::AddEventAtOffset(), DATA_AKAMA_ILLIDAN, UnitAI::DoCastSelf(), DONE, WorldObject::FindNearestCreature(), Unit::GetMotionMaster(), IllidariMinionPos, instance, Unit::InterruptNonMeleeSpells(), WorldObject::m_Events, ScriptedAI::me, MotionMaster::MovePath(), NOT_STARTED, NPC_ILLIDAN_DOOR_TRIGGER, NPC_ILLIDARI_ELITE, NPC_SPIRIT_OF_OLUM, NPC_SPIRIT_OF_UDALO, PATH_AKAMA_ILLIDARI_COUNCIL_1, PATH_AKAMA_ILLIDARI_COUNCIL_2, PATH_AKAMA_ILLIDARI_COUNCIL_3, PATH_AKAMA_MINIONS, REACT_AGGRESSIVE, SAY_AKAMA_ALONE, SAY_AKAMA_BETRAYER, SAY_AKAMA_COUNCIL_1, SAY_AKAMA_COUNCIL_2, SAY_AKAMA_DOOR, SAY_AKAMA_SALUTE, SAY_OLUM, SAY_UDALO, InstanceScript::SetBossState(), Unit::SetControlled(), Unit::SetNpcFlag(), Creature::SetReactState(), SPELL_AKAMA_DOOR_FAIL, SPELL_AKAMA_DOOR_OPEN, SPELL_ARCANE_EXPLOSION_VIS, SPELL_DEATHSWORN_DOOR_OPEN, SpiritOlumPos, SpiritUdaloPos, WorldObject::SummonCreature(), TEMPSUMMON_TIMED_DESPAWN, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, UNIT_NPC_FLAG_GOSSIP, and UNIT_STATE_ROOT.

◆ Reset()

void npc_akama_illidan::Reset ( )
inlineoverridevirtual

◆ sGossipSelect()

void npc_akama_illidan::sGossipSelect ( Player player,
uint32  ,
uint32   
)
inlineoverridevirtual

◆ SummonedCreatureDies()

void npc_akama_illidan::SummonedCreatureDies ( Creature summon,
Unit  
)
inlineoverridevirtual

Reimplemented from CreatureAI.

1035 {
1036 summons.Despawn(summon);
1037 }
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:89

References SummonList::Despawn(), and summons.

◆ UpdateAI()

void npc_akama_illidan::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from ScriptedAI.

1064 {
1065 scheduler.Update(diff);
1066
1067 if (!UpdateVictim())
1068 return;
1069
1071 }
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition: TaskScheduler.cpp:27
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
bool UpdateVictim()
Definition: CreatureAI.cpp:280

References UnitAI::DoMeleeAttackIfReady(), CreatureAI::scheduler, TaskScheduler::Update(), and CreatureAI::UpdateVictim().

Member Data Documentation

◆ instance

◆ summons

SummonList npc_akama_illidan::summons
private