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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast. More...
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list. More...
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim. More...
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished. More...
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

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
727 : ScriptedAI(creature), summons(me)
728 {
729 instance = creature->GetInstanceScript();
730 }
Definition: ScriptedCreature.h:190
Creature * me
Definition: ScriptedCreature.h:280
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * instance
Definition: boss_illidan.cpp:1029
SummonList summons
Definition: boss_illidan.cpp:1030

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.

1013 {
1014 if (damage >= me->GetHealth())
1015 damage = me->GetHealth() - 1;
1016 }
uint32 GetHealth() const
Definition: Unit.h:869

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

◆ DoAction()

void npc_akama_illidan::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

762 {
763 switch (param)
764 {
766 {
770 }
771 break;
773 {
775 }
776 break;
778 {
779 if (me->IsEngaged())
780 {
784 }
785 else
786 {
789 }
790 }
791 break;
793 {
797 }, 3490ms);
801 }, 8340ms); // 4850ms
804 }, 8740ms);
805 }
806 break;
807 }
808 }
constexpr auto WEEK
Definition: Common.h:50
@ REACT_PASSIVE
Definition: Unit.h:548
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_STATE_ROOT
Definition: UnitDefines.h:159
@ SPELL_AKAMA_DESPAWN
Definition: boss_illidan.cpp:679
@ SAY_AKAMA_LIGHT
Definition: boss_illidan.cpp:701
@ PATH_AKAMA_ILLIDARI_COUNCIL_1
Definition: boss_illidan.cpp:686
@ POINT_ILLIDAN_DEFEATED_1
Definition: boss_illidan.cpp:668
@ 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:710
Position AkamaIllidariCouncilTeleport
Definition: boss_illidan.cpp:706
Talk
Definition: hyjal.cpp:82
@ EMOTE_ONESHOT_SALUTE
Definition: SharedDefines.h:1942
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:94
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void DespawnOnEvade(Seconds respawnDelay=20s)
Definition: Creature.cpp:2181
void SetRespawnDelay(uint32 delay)
Definition: Creature.h:293
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:696
bool IsEngaged() const
Definition: Unit.h:817
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition: Unit.cpp:17990
EventProcessor m_Events
Definition: Unit.h:1792
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition: Unit.cpp:19937
void HandleEmoteCommand(uint32 emoteId)
Definition: Unit.cpp:1984
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211
void MovePath(uint32 path_id, bool repeatable)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:849

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(), Unit::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.

1001 {
1002 ScheduleTimedEvent(12s, 18s, [&] {
1004 }, 16s, 24s);
1005
1006 ScheduleTimedEvent(5s, 10s, [&] {
1007 if (me->HealthBelowPct(20))
1009 }, 5s, 10s);
1010 }
@ SPELL_HEALING_POTION
Definition: boss_illidan.cpp:675
@ SPELL_CHAIN_LIGHTNING
Definition: boss_illidan.cpp:676
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:312
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:873

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.

956 {
957 // Minions Event
959 {
963
966 }, 6700ms);
969 }, 9530ms); // 2830ms
972 }, 14400ms); // 4870ms
973 }
974 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ SAY_AKAMA_MINIONS
Definition: boss_illidan.cpp:700
@ PATH_AKAMA_MINIONS
Definition: boss_illidan.cpp:689
@ 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
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5669
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21256
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:100
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, Unit::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.

977 {
978 summons.Summon(summon);
980 if (summon->GetEntry() == NPC_ILLIDARI_ELITE)
981 {
982 me->AddThreat(summon, 1000000.0f);
983 summon->AddThreat(me, 1000000.0f);
984 summon->AI()->AttackStart(me);
985 AttackStart(summon);
986 }
987 }
@ UNIT_NPC_FLAG_NONE
Definition: UnitDefines.h:293
@ NPC_ILLIDARI_ELITE
Definition: boss_illidan.cpp:684
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:27
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:208
CreatureAI * AI() const
Definition: Creature.h:143
uint32 GetEntry() const
Definition: Object.h:112
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14608
void ReplaceAllNpcFlags(NPCFlags flags)
Definition: Unit.h:697

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.

995 {
996 if (victim->GetEntry() == NPC_ILLIDARI_ELITE)
998 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:48
Position IllidariMinionPos[10]
Definition: boss_illidan.cpp:711
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355

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.

811 {
812 if (type == POINT_MOTION_TYPE)
813 {
814 switch (id)
815 {
817 {
819 {
820 me->SetFacingToObject(illidan);
821 illidan->AI()->DoAction(ACTION_START_EVENT);
823 }
826 }, 15400ms);
829 }, 19440ms); // 4040ms
832 }, 23080ms); // 3640ms
835 }, 33840ms); // 10760ms
839 }, 35210ms); // 1370ms
843 }, 37640ms); // 2430ms
844 }
845 break;
847 {
848 me->SetWalk(true);
850 {
851 float x, y, z;
852 me->GetNearPoint(illidan, x, y, z, 15.f, 0, me->GetAngle(illidan));
853 me->GetMotionMaster()->MovePoint(POINT_ILLIDAN_DEFEATED_2, x, y, z); // Maiev starts Akama's Ending scene
854 }
855 }
856 break;
857 }
858 }
859 else if (type == WAYPOINT_MOTION_TYPE)
860 {
862 if (id == 2)
864 }
865 }
@ WAYPOINT_MOTION_TYPE
Definition: MotionMaster.h:39
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
@ SHEATH_STATE_MELEE
Definition: UnitDefines.h:106
@ SAY_AKAMA_TIME_HAS_COME
Definition: boss_illidan.cpp:699
@ POINT_FACE_ILLIDAN
Definition: boss_illidan.cpp:667
@ SAY_AKAMA_FREE
Definition: boss_illidan.cpp:698
@ SPELL_AKAMA_TELEPORT
Definition: boss_illidan.cpp:678
@ POINT_ILLIDAN_DEFEATED_2
Definition: boss_illidan.cpp:669
@ ACTION_START_EVENT
Definition: boss_illidan.cpp:112
@ EMOTE_ONESHOT_ROAR
Definition: SharedDefines.h:1907
@ EMOTE_ONESHOT_TALK
Definition: SharedDefines.h:1895
Definition: Creature.h:46
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:337
uint32 GetCurrentWaypointID() const
Definition: Creature.h:350
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3178
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:2626
void GetPosition(float &x, float &y) const
Definition: Position.h:122
float GetAngle(const Position *pos) const
Definition: Position.cpp:77
void SetFacingToObject(WorldObject *object)
Definition: Unit.cpp:20493
virtual void SetSheath(SheathState sheathed)
Definition: Unit.h:945

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, Unit::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.

868 {
869 switch (pathId)
870 {
871 // Talk to Open Door
873 {
876 }, 200ms);
877
881 }, 8000ms); // 7800ms
882 }
883 break;
884 // Reached Door
886 {
889 }, 4600ms);
892 }, 8120ms); // 3520ms
895 }, 17860ms); // 9740ms
899 }, 23930ms); // 6070ms
902 udalo->AI()->Talk(SAY_UDALO);
903 }, 25190ms); // 1260ms
906 olum->AI()->Talk(SAY_OLUM);
907 }, 31370ms); // 6180ms
911 udalo->AI()->DoCastSelf(SPELL_DEATHSWORN_DOOR_OPEN);
913 olum->AI()->DoCastSelf(SPELL_DEATHSWORN_DOOR_OPEN);
914 }, 39710ms); // 8340ms
917 door->AI()->DoCastSelf(SPELL_ARCANE_EXPLOSION_VIS);
918 }, 50660ms); // 10950ms
922 udalo->InterruptNonMeleeSpells(false);
924 olum->InterruptNonMeleeSpells(false);
927 }, 50680ms); // 20ms
930 }, 56955ms); // 6275ms
933 }, 64030ms); // 7075ms
934 }
935 break;
936 // Talk to Initiate Fight
938 {
941 }
942 break;
944 {
947
948 for (int i = 0; i < 10; ++i)
950 }
951 break;
952 }
953 }
@ DONE
Definition: InstanceScript.h:60
@ NOT_STARTED
Definition: InstanceScript.h:57
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_SPIRIT_OF_UDALO
Definition: boss_illidan.cpp:683
@ SPELL_DEATHSWORN_DOOR_OPEN
Definition: boss_illidan.cpp:673
@ SAY_OLUM
Definition: boss_illidan.cpp:692
@ SAY_AKAMA_SALUTE
Definition: boss_illidan.cpp:696
@ SAY_AKAMA_DOOR
Definition: boss_illidan.cpp:694
@ SAY_AKAMA_ALONE
Definition: boss_illidan.cpp:695
@ NPC_SPIRIT_OF_OLUM
Definition: boss_illidan.cpp:682
@ PATH_AKAMA_ILLIDARI_COUNCIL_3
Definition: boss_illidan.cpp:688
@ SPELL_ARCANE_EXPLOSION_VIS
Definition: boss_illidan.cpp:674
@ SPELL_AKAMA_DOOR_OPEN
Definition: boss_illidan.cpp:671
@ PATH_AKAMA_ILLIDARI_COUNCIL_2
Definition: boss_illidan.cpp:687
@ NPC_ILLIDAN_DOOR_TRIGGER
Definition: boss_illidan.cpp:681
@ SAY_AKAMA_COUNCIL_2
Definition: boss_illidan.cpp:703
@ SAY_AKAMA_BETRAYER
Definition: boss_illidan.cpp:697
@ SAY_UDALO
Definition: boss_illidan.cpp:691
@ SPELL_AKAMA_DOOR_FAIL
Definition: boss_illidan.cpp:672
@ SAY_AKAMA_COUNCIL_1
Definition: boss_illidan.cpp:702
Position SpiritUdaloPos
Definition: boss_illidan.cpp:707
Position SpiritOlumPos
Definition: boss_illidan.cpp:708
@ DATA_AKAMA_ILLIDAN
Definition: black_temple.h:37
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4111
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:695
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:351

References EventProcessor::AddEventAtOffset(), DATA_AKAMA_ILLIDAN, UnitAI::DoCastSelf(), DONE, WorldObject::FindNearestCreature(), Unit::GetMotionMaster(), IllidariMinionPos, instance, Unit::InterruptNonMeleeSpells(), Unit::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

Reimplemented from ScriptedAI.

733 {
738 me->setActive(false);
742 }
@ SPELL_REDUCED_THREAT
Definition: boss_illidan.cpp:677
void KillAllEvents(bool force)
Definition: EventProcessor.cpp:82
TaskScheduler & CancelAll()
Definition: TaskScheduler.cpp:45
TaskScheduler scheduler
Definition: CreatureAI.h:76
void setActive(bool isActiveObject)
Definition: Object.cpp:1085

References TaskScheduler::CancelAll(), SummonList::DespawnAll(), UnitAI::DoCastSelf(), EventProcessor::KillAllEvents(), Unit::m_Events, ScriptedAI::me, REACT_AGGRESSIVE, CreatureAI::scheduler, WorldObject::setActive(), Unit::SetControlled(), Unit::SetNpcFlag(), Creature::SetReactState(), SPELL_REDUCED_THREAT, summons, UNIT_NPC_FLAG_GOSSIP, and UNIT_STATE_ROOT.

◆ sGossipSelect()

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

◆ SummonedCreatureDies()

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

Reimplemented from CreatureAI.

990 {
991 summons.Despawn(summon);
992 }
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.

1019 {
1020 scheduler.Update(diff);
1021
1022 if (!UpdateVictim())
1023 return;
1024
1026 }
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition: TaskScheduler.cpp:27
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
bool UpdateVictim()
Definition: CreatureAI.cpp:269

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

Member Data Documentation

◆ instance

InstanceScript* npc_akama_illidan::instance
private

◆ summons

SummonList npc_akama_illidan::summons
private