TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
npc_akama_illidan::npc_akama_illidanAI Struct Reference

Public Member Functions

 npc_akama_illidanAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void EnterEvadeMode (EvadeReason) override
 
void EnterCombat (Unit *) override
 
void MoveInLineOfSight (Unit *) override
 
void MovementInform (uint32 MovementType, uint32) override
 
void DamageTaken (Unit *done_by, uint32 &damage) override
 
void KillAllElites ()
 
void BeginTalk ()
 
void BeginChannel ()
 
void BeginWalk ()
 
void EnterPhase (PhaseAkama NextPhase)
 
void HandleTalkSequence ()
 
void HandleChannelSequence ()
 
void HandleWalkSequence ()
 
void UpdateAI (uint32 diff) override
 
void sGossipSelect (Player *player, uint32, uint32) override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
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 OnPossess (bool)
 
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 DoResetThreat ()
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 
void DoTeleportTo (float x, float y, float z, uint32 time=0)
 
void DoTeleportTo (float const pos[4])
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
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 HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () 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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.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 void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Private Attributes

bool JustCreated
 
InstanceScriptinstance
 
PhaseAkama Phase
 
uint32 Timer
 
ObjectGuid IllidanGUID
 
ObjectGuid ChannelGUID
 
ObjectGuid SpiritGUID [2]
 
ObjectGuid GateGUID
 
ObjectGuid DoorGUID [2]
 
uint32 ChannelCount
 
uint32 WalkCount
 
uint32 TalkCount
 
uint32 Check_Timer
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- 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 CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

npc_akama_illidan::npc_akama_illidanAI::npc_akama_illidanAI ( Creature creature)
inline
1385  : ScriptedAI(creature)
1386  {
1387  Initialize();
1388  instance = creature->GetInstanceScript();
1389  JustCreated = true;
1390  }
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
bool JustCreated
Definition: boss_illidan.cpp:1789
void Initialize()
Definition: boss_illidan.cpp:1392
InstanceScript * instance
Definition: boss_illidan.cpp:1790

+ Here is the call graph for this function:

Member Function Documentation

void npc_akama_illidan::npc_akama_illidanAI::BeginChannel ( )
inline
1498  {
1499  me->setActive(true);
1501  if (!JustCreated)
1502  return;
1503  float x, y, z;
1505  gate->GetPosition(x, y, z);
1506  else
1507  return; // if door not spawned, don't crash server
1508 
1510  {
1511  ChannelGUID = Channel->GetGUID();
1512  Channel->SetDisplayId(MODEL_INVISIBLE); // Invisible but spell visuals can still be seen.
1514  }
1515 
1516  for (uint8 i = 0; i < 2; ++i)
1518  {
1519  Spirit->SetVisible(false);
1520  SpiritGUID[i] = Spirit->GetGUID();
1521  }
1522  }
float x
Definition: Vector3.h:62
Definition: Unit.h:735
Definition: boss_illidan.cpp:152
bool JustCreated
Definition: boss_illidan.cpp:1789
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
ObjectGuid ChannelGUID
Definition: boss_illidan.cpp:1794
Definition: boss_illidan.cpp:112
Definition: Creature.h:467
Definition: Channel.h:126
float y
Definition: Vector3.h:62
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid GateGUID
Definition: boss_illidan.cpp:1796
Definition: Object.h:56
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: GameObject.h:880
Definition: boss_illidan.cpp:153
Definition: Object.h:55
G3D::Vector3 const SpiritSpawns[2]
Definition: boss_illidan.cpp:340
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: boss_illidan.cpp:135
float z
Definition: Vector3.h:62
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:143
uint8_t uint8
Definition: Define.h:152
Definition: boss_illidan.cpp:154
Definition: UpdateFields.h:135
G3D::int16 x
Definition: Vector2int16.h:37
ObjectGuid SpiritGUID[2]
Definition: boss_illidan.cpp:1795
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::BeginTalk ( )
inline
1481  {
1483  for (uint8 i = 0; i < 2; ++i)
1484  instance->HandleGameObject(DoorGUID[i], false);
1486  {
1487  illidan->RemoveAurasDueToSpell(SPELL_KNEEL);
1488  me->SetInFront(illidan);
1489  illidan->SetInFront(me);
1490  me->GetMotionMaster()->MoveIdle();
1491  illidan->GetMotionMaster()->MoveIdle();
1492  ENSURE_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, illidan->AI())->AkamaGUID = me->GetGUID();
1494  }
1495  }
void MoveIdle()
Definition: MotionMaster.cpp:185
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
ObjectGuid DoorGUID[2]
Definition: boss_illidan.cpp:1797
Definition: boss_illidan.cpp:476
Definition: Creature.h:467
Definition: boss_illidan.cpp:85
Creature *const me
Definition: CreatureAI.h:71
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
InstanceScript * instance
Definition: boss_illidan.cpp:1790
Definition: InstanceScript.h:59
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: boss_illidan.cpp:169
ObjectGuid const & GetGUID() const
Definition: Object.h:105
void EnterPhase(PhaseAkama NextPhase)
Definition: boss_illidan.cpp:1531
uint8_t uint8
Definition: Define.h:152
void SetInFront(WorldObject const *target)
Definition: Unit.cpp:15771
ObjectGuid IllidanGUID
Definition: boss_illidan.cpp:1793
Definition: black_temple.h:37

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::BeginWalk ( )
inline
1525  {
1526  me->SetWalk(false);
1527  me->SetSpeed(MOVE_RUN, 1.0f);
1529  }
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
G3D::Vector3 const AkamaWP[13]
Definition: boss_illidan.cpp:323
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
uint32 WalkCount
Definition: boss_illidan.cpp:1799
Definition: Unit.h:600
bool SetWalk(bool enable)
Definition: Unit.cpp:15800
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:10531
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::DamageTaken ( Unit done_by,
uint32 damage 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1460  {
1461  if (damage > me->GetHealth() || done_by->GetGUID() != IllidanGUID)
1462  damage = 0;
1463  }
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetHealth() const
Definition: Unit.h:1426
ObjectGuid IllidanGUID
Definition: boss_illidan.cpp:1793

+ Here is the call graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1449 { }
void npc_akama_illidan::npc_akama_illidanAI::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from CreatureAI.

1443  {
1444  me->RemoveAllAuras();
1445  me->DeleteThreatList();
1446  me->CombatStop(true);
1447  }
void RemoveAllAuras()
Definition: Unit.cpp:3920
Creature *const me
Definition: CreatureAI.h:71
void DeleteThreatList()
Definition: Unit.cpp:10700
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:7371

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::EnterPhase ( PhaseAkama  NextPhase)
inline
1532  {
1533  switch (NextPhase)
1534  {
1535  case PHASE_CHANNEL:
1536  BeginChannel();
1537  Timer = 5000;
1538  ChannelCount = 0;
1539  break;
1540  case PHASE_WALK:
1541  if (Phase == PHASE_CHANNEL)
1542  WalkCount = 0;
1543  else if (Phase == PHASE_TALK)
1544  {
1546  ENSURE_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, illidan->AI())->DeleteFromThreatList(me->GetGUID());
1549  ++WalkCount;
1550  }
1551  JustCreated = false;
1552  BeginWalk();
1553  Timer = 0;
1554  break;
1555  case PHASE_TALK:
1556  if (Phase == PHASE_WALK)
1557  {
1558  BeginTalk();
1559  Timer = 0;
1560  }
1561  else if (Phase == PHASE_FIGHT_ILLIDAN)
1562  {
1563  Timer = 1;
1564  TalkCount = 0;
1565  }
1566  break;
1567  case PHASE_FIGHT_ILLIDAN:
1569  {
1570  me->AddThreat(illidan, 10000000.0f);
1571  me->GetMotionMaster()->MoveChase(illidan);
1572  }
1573  Timer = 30000; // chain lightning
1574  break;
1575  case PHASE_FIGHT_MINIONS:
1577  Timer = urand(10000, 16000); // summon minion
1578  break;
1579  case PHASE_RETURN:
1581  KillAllElites();
1582  WalkCount = 0;
1583  BeginWalk();
1584  Timer = 1;
1585  break;
1586  default:
1587  break;
1588  }
1589  Phase = NextPhase;
1590  }
uint32 Timer
Definition: boss_illidan.cpp:1792
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
Definition: Unit.h:674
uint32 TalkCount
Definition: boss_illidan.cpp:1800
void MoveChase(Unit *target, float dist=0.0f, float angle=0.0f)
Definition: MotionMaster.cpp:241
void BeginWalk()
Definition: boss_illidan.cpp:1524
bool JustCreated
Definition: boss_illidan.cpp:1789
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
void KillAllElites()
Definition: boss_illidan.cpp:1465
Definition: boss_illidan.cpp:476
void EnterEvadeMode(EvadeReason) override
Definition: boss_illidan.cpp:1442
Definition: Creature.h:467
uint32 ChannelCount
Definition: boss_illidan.cpp:1798
Definition: boss_illidan.cpp:181
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Creature *const me
Definition: CreatureAI.h:71
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
Definition: CreatureAI.h:90
Definition: boss_illidan.cpp:183
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_illidan.cpp:179
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
uint32 WalkCount
Definition: boss_illidan.cpp:1799
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: boss_illidan.cpp:182
void BeginTalk()
Definition: boss_illidan.cpp:1480
Definition: UpdateFields.h:109
Definition: boss_illidan.cpp:178
void BeginChannel()
Definition: boss_illidan.cpp:1497
Phase
Definition: boss_kiljaeden.cpp:153
ObjectGuid IllidanGUID
Definition: boss_illidan.cpp:1793
Definition: boss_illidan.cpp:180

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::HandleChannelSequence ( )
inline
1616  {
1617  Unit* Channel = NULL;
1618  Unit* Spirit[2] = { NULL, NULL };
1619  if (ChannelCount <= 5)
1620  {
1621  Channel = ObjectAccessor::GetUnit(*me, ChannelGUID);
1622  Spirit[0] = ObjectAccessor::GetUnit(*me, SpiritGUID[0]);
1623  Spirit[1] = ObjectAccessor::GetUnit(*me, SpiritGUID[1]);
1624  if (!Channel || !Spirit[0] || !Spirit[1])
1625  return;
1626  }
1627 
1628  switch (ChannelCount)
1629  {
1630  case 0: // channel failed
1631  me->InterruptNonMeleeSpells(true);
1632  Timer = 2000;
1633  break;
1634  case 1: // spirit appear
1635  Spirit[0]->SetVisible(true);
1636  Spirit[1]->SetVisible(true);
1637  Timer = 2000;
1638  break;
1639  case 2: // spirit help
1640  DoCast(Channel, SPELL_AKAMA_DOOR_CHANNEL);
1641  Spirit[0]->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL, false);
1642  Spirit[1]->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL, false);
1643  Timer = 5000;
1644  break;
1645  case 3: // open the gate
1646  me->InterruptNonMeleeSpells(true);
1647  Spirit[0]->InterruptNonMeleeSpells(true);
1648  Spirit[1]->InterruptNonMeleeSpells(true);
1650  Timer = 2000;
1651  break;
1652  case 4:
1654  Timer = 2000;
1655  break;
1656  case 5:
1658  Channel->setDeathState(JUST_DIED);
1659  Spirit[0]->SetVisible(false);
1660  Spirit[1]->SetVisible(false);
1661  Timer = 3000;
1662  break;
1663  case 6:
1665  break;
1666  default:
1667  break;
1668  }
1669  ++ChannelCount;
1670  }
uint32 Timer
Definition: boss_illidan.cpp:1792
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Definition: Unit.h:542
ObjectGuid ChannelGUID
Definition: boss_illidan.cpp:1794
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 ChannelCount
Definition: boss_illidan.cpp:1798
Definition: SharedDefines.h:2460
Definition: Channel.h:126
Definition: boss_illidan.cpp:110
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid GateGUID
Definition: boss_illidan.cpp:1796
InstanceScript * instance
Definition: boss_illidan.cpp:1790
void SetVisible(bool x)
Definition: Unit.cpp:10368
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_illidan.cpp:179
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
Definition: boss_illidan.cpp:42
virtual void setDeathState(DeathState s)
Definition: Unit.cpp:10593
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
void EnterPhase(PhaseAkama NextPhase)
Definition: boss_illidan.cpp:1531
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1444
Definition: boss_illidan.cpp:111
Definition: Unit.h:1305
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
ObjectGuid SpiritGUID[2]
Definition: boss_illidan.cpp:1795

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::HandleTalkSequence ( )
inline
1593  {
1594  switch (TalkCount)
1595  {
1596  case 0:
1598  {
1600  illidan->AI()->Talk(SAY_ILLIDAN_MINION);
1601  }
1602  Timer = 8000;
1603  break;
1604  case 1:
1606  Timer = 3000;
1607  break;
1608  case 2:
1610  break;
1611  }
1612  ++TalkCount;
1613  }
uint32 Timer
Definition: boss_illidan.cpp:1792
uint32 TalkCount
Definition: boss_illidan.cpp:1800
Definition: boss_illidan.cpp:45
Definition: boss_illidan.cpp:191
Definition: boss_illidan.cpp:476
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_illidan.cpp:179
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: boss_illidan.cpp:43
void EnterPhase(PhaseAkama NextPhase)
Definition: boss_illidan.cpp:1531
ObjectGuid IllidanGUID
Definition: boss_illidan.cpp:1793

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::HandleWalkSequence ( )
inline
1673  {
1674  switch (WalkCount)
1675  {
1676  case 6:
1677  for (uint8 i = 0; i < 2; ++i)
1678  instance->HandleGameObject(DoorGUID[i], true);
1679  break;
1680  case 8:
1681  if (Phase == PHASE_WALK)
1683  else
1685  break;
1686  case 12:
1688  break;
1689  }
1690 
1691  if (Phase == PHASE_WALK)
1692  {
1693  Timer = 0;
1694  ++WalkCount;
1696  }
1697  }
uint32 Timer
Definition: boss_illidan.cpp:1792
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
ObjectGuid DoorGUID[2]
Definition: boss_illidan.cpp:1797
G3D::Vector3 const AkamaWP[13]
Definition: boss_illidan.cpp:323
Definition: boss_illidan.cpp:181
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
InstanceScript * instance
Definition: boss_illidan.cpp:1790
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
Definition: boss_illidan.cpp:179
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
uint32 WalkCount
Definition: boss_illidan.cpp:1799
Definition: boss_illidan.cpp:182
void EnterPhase(PhaseAkama NextPhase)
Definition: boss_illidan.cpp:1531
uint8_t uint8
Definition: Define.h:152
G3D::int16 x
Definition: Vector2int16.h:37
Phase
Definition: boss_kiljaeden.cpp:153
Definition: boss_illidan.cpp:180

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::Initialize ( void  )
inline
1393  {
1394  ChannelGUID.Clear();
1395  SpiritGUID[0].Clear();
1396  SpiritGUID[1].Clear();
1397 
1399  Timer = 0;
1400 
1401  ChannelCount = 0;
1402  TalkCount = 0;
1403  Check_Timer = 5000;
1404  WalkCount = 0;
1405  }
uint32 Timer
Definition: boss_illidan.cpp:1792
uint32 TalkCount
Definition: boss_illidan.cpp:1800
ObjectGuid ChannelGUID
Definition: boss_illidan.cpp:1794
uint32 ChannelCount
Definition: boss_illidan.cpp:1798
uint32 Check_Timer
Definition: boss_illidan.cpp:1801
Definition: boss_illidan.cpp:177
uint32 WalkCount
Definition: boss_illidan.cpp:1799
void Clear()
Definition: ObjectGuid.h:215
Phase
Definition: boss_kiljaeden.cpp:153
ObjectGuid SpiritGUID[2]
Definition: boss_illidan.cpp:1795

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::KillAllElites ( )
inline
1466  {
1468  std::vector<Unit*> eliteList;
1469  for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
1470  {
1471  Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
1472  if (unit && unit->GetEntry() == ILLIDARI_ELITE)
1473  eliteList.push_back(unit);
1474  }
1475  for (std::vector<Unit*>::const_iterator itr = eliteList.begin(); itr != eliteList.end(); ++itr)
1476  (*itr)->setDeathState(JUST_DIED);
1478  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Definition: Unit.h:542
ThreatContainer::StorageType const & getThreatList() const
Definition: ThreatManager.h:263
void EnterEvadeMode(EvadeReason) override
Definition: boss_illidan.cpp:1442
Creature *const me
Definition: CreatureAI.h:71
Definition: CreatureAI.h:90
Definition: boss_illidan.cpp:155
std::list< HostileReference * > StorageType
Definition: ThreatManager.h:149
ThreatManager & getThreatManager()
Definition: Unit.h:1998
uint32 GetEntry() const
Definition: Object.h:107
Definition: Unit.h:1305

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

1450 { }
void npc_akama_illidan::npc_akama_illidanAI::MovementInform ( uint32  MovementType,
uint32   
)
inlineoverridevirtual

Reimplemented from CreatureAI.

1454  {
1455  if (MovementType == POINT_MOTION_TYPE)
1456  Timer = 1;
1457  }
uint32 Timer
Definition: boss_illidan.cpp:1792
Definition: MotionMaster.h:46
void npc_akama_illidan::npc_akama_illidanAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1408  {
1409  Initialize();
1411 
1416 
1417  if (JustCreated) // close all doors at create
1418  {
1420 
1421  for (uint8 i = 0; i < 2; ++i)
1422  instance->HandleGameObject(DoorGUID[i], false);
1423  }
1424  else // open all doors, raid wiped
1425  {
1427  WalkCount = 1; // skip first wp
1428 
1429  for (uint8 i = 0; i < 2; ++i)
1430  instance->HandleGameObject(DoorGUID[i], true);
1431  }
1432 
1433  KillAllElites();
1434 
1435  me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has strange values..
1437  me->setActive(false);
1438  me->SetVisible(false);
1439  }
Definition: Unit.h:735
Definition: black_temple.h:50
bool JustCreated
Definition: boss_illidan.cpp:1789
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
Definition: black_temple.h:49
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:996
void KillAllElites()
Definition: boss_illidan.cpp:1465
ObjectGuid DoorGUID[2]
Definition: boss_illidan.cpp:1797
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: black_temple.h:51
void Initialize()
Definition: boss_illidan.cpp:1392
Creature *const me
Definition: CreatureAI.h:71
ObjectGuid GateGUID
Definition: boss_illidan.cpp:1796
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
InstanceScript * instance
Definition: boss_illidan.cpp:1790
Definition: InstanceScript.h:58
void SetVisible(bool x)
Definition: Unit.cpp:10368
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
uint32 WalkCount
Definition: boss_illidan.cpp:1799
uint8_t uint8
Definition: Define.h:152
Definition: UpdateFields.h:135
ObjectGuid IllidanGUID
Definition: boss_illidan.cpp:1793
Definition: black_temple.h:37

+ Here is the call graph for this function:

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

Reimplemented from UnitAI.

1783  {
1784  player->CLOSE_GOSSIP_MENU();
1786  }
Definition: boss_illidan.cpp:178
void EnterPhase(PhaseAkama NextPhase)
Definition: boss_illidan.cpp:1531

+ Here is the call graph for this function:

void npc_akama_illidan::npc_akama_illidanAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1700  {
1701  if (!me->IsVisible())
1702  {
1703  if (Check_Timer <= diff)
1704  {
1706  me->SetVisible(true);
1707 
1708  Check_Timer = 5000;
1709  } else Check_Timer -= diff;
1710  }
1711  bool Event = false;
1712  if (Timer)
1713  {
1714  if (Timer <= diff)
1715  Event = true;
1716  else Timer -= diff;
1717  }
1718 
1719  if (Event)
1720  {
1721  switch (Phase)
1722  {
1723  case PHASE_CHANNEL:
1724  if (JustCreated)
1726  else{
1728  }
1729  break;
1730  case PHASE_TALK:
1732  break;
1733  case PHASE_WALK:
1734  case PHASE_RETURN:
1736  break;
1737  case PHASE_FIGHT_ILLIDAN:
1738  {
1740  if (illidan && illidan->HealthBelowPct(90))
1742  else
1743  {
1745  Timer = 30000;
1746  }
1747  }
1748  break;
1749  case PHASE_FIGHT_MINIONS:
1750  {
1751  float x, y, z;
1752  me->GetPosition(x, y, z);
1753  Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x + rand32() % 10, y + rand32() % 10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
1754  // Creature* Elite = me->SummonCreature(ILLIDARI_ELITE, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
1755  if (Elite)
1756  {
1757  Elite->AI()->AttackStart(me);
1758  Elite->AddThreat(me, 1000000.0f);
1759  AttackStart(Elite);
1760  me->AddThreat(Elite, 1000000.0f);
1761  }
1762  Timer = urand(10000, 16000);
1764  if (illidan->HealthBelowPct(10))
1766  }
1767  break;
1768  default:
1769  break;
1770  }
1771  }
1772 
1773  if (!UpdateVictim())
1774  return;
1775 
1776  if (HealthBelowPct(20))
1778 
1780  }
uint32 Timer
Definition: boss_illidan.cpp:1792
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
bool UpdateVictim()
Definition: CreatureAI.cpp:233
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:247
bool JustCreated
Definition: boss_illidan.cpp:1789
Definition: boss_illidan.cpp:113
void HandleTalkSequence()
Definition: boss_illidan.cpp:1592
Definition: inflate.h:49
Definition: Creature.h:467
Definition: boss_illidan.cpp:114
Definition: boss_illidan.cpp:181
void HandleWalkSequence()
Definition: boss_illidan.cpp:1672
Definition: black_temple.h:36
void HandleChannelSequence()
Definition: boss_illidan.cpp:1615
Creature *const me
Definition: CreatureAI.h:71
InstanceScript * instance
Definition: boss_illidan.cpp:1790
Definition: boss_illidan.cpp:183
G3D::int16 z
Definition: Vector3int16.h:46
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:1430
CreatureAI * AI() const
Definition: Creature.h:525
void GetPosition(float &x, float &y) const
Definition: Position.h:109
Definition: boss_illidan.cpp:155
uint32 Check_Timer
Definition: boss_illidan.cpp:1801
void SetVisible(bool x)
Definition: Unit.cpp:10368
G3D::int16 y
Definition: Vector2int16.h:38
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_illidan.cpp:179
bool IsVisible() const
Definition: Unit.cpp:10363
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
Definition: boss_illidan.cpp:182
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
Definition: boss_illidan.cpp:178
void EnterPhase(PhaseAkama NextPhase)
Definition: boss_illidan.cpp:1531
uint32 rand32()
Definition: Random.cpp:64
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
G3D::int16 x
Definition: Vector2int16.h:37
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Phase
Definition: boss_kiljaeden.cpp:153
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
ObjectGuid IllidanGUID
Definition: boss_illidan.cpp:1793
Definition: boss_illidan.cpp:180
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346
Definition: Object.h:54

+ Here is the call graph for this function:

Member Data Documentation

uint32 npc_akama_illidan::npc_akama_illidanAI::ChannelCount
private
ObjectGuid npc_akama_illidan::npc_akama_illidanAI::ChannelGUID
private
uint32 npc_akama_illidan::npc_akama_illidanAI::Check_Timer
private
ObjectGuid npc_akama_illidan::npc_akama_illidanAI::DoorGUID[2]
private
ObjectGuid npc_akama_illidan::npc_akama_illidanAI::GateGUID
private
ObjectGuid npc_akama_illidan::npc_akama_illidanAI::IllidanGUID
private
InstanceScript* npc_akama_illidan::npc_akama_illidanAI::instance
private
bool npc_akama_illidan::npc_akama_illidanAI::JustCreated
private
PhaseAkama npc_akama_illidan::npc_akama_illidanAI::Phase
private
ObjectGuid npc_akama_illidan::npc_akama_illidanAI::SpiritGUID[2]
private
uint32 npc_akama_illidan::npc_akama_illidanAI::TalkCount
private
uint32 npc_akama_illidan::npc_akama_illidanAI::Timer
private
uint32 npc_akama_illidan::npc_akama_illidanAI::WalkCount
private

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