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

Public Member Functions

 npc_commander_eligor_dawnbringerAI (Creature *creature)
 
void Reset () override
 
void MovementInform (uint32 type, uint32 id) override
 
void StoreTargets ()
 
void ChangeImage (uint32 entry, uint32 model, uint8 text)
 
void TurnAudience ()
 
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

EventMap _events
 
ObjectGuid audienceList [10]
 
ObjectGuid imageList [5]
 
uint8 talkWing
 

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_commander_eligor_dawnbringerAI()

npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::npc_commander_eligor_dawnbringerAI ( Creature creature)
inline
1783 : ScriptedAI(creature)
1784 {
1785 talkWing = 0;
1786 }
Definition: ScriptedCreature.h:190
uint8 talkWing
Definition: zone_dragonblight.cpp:2022

References talkWing.

Member Function Documentation

◆ ChangeImage()

void npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::ChangeImage ( uint32  entry,
uint32  model,
uint8  text 
)
inline
1935 {
1937 {
1938 Talk(text);
1939 creature->SetEntry(entry);
1940 creature->SetDisplayId(model);
1941 creature->CastSpell(creature, SPELL_HEROIC_IMAGE_CHANNEL);
1943 }
1944 }
Talk
Definition: hyjal.cpp:82
@ EVENT_TALK_COMPLETE
Definition: zone_dragonblight.cpp:1754
@ SPELL_HEROIC_IMAGE_CHANNEL
Definition: zone_dragonblight.cpp:1750
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:210
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group=0, uint32 phase=0)
Definition: EventMap.cpp:56
Creature * me
Definition: ScriptedCreature.h:280
Definition: Creature.h:43
ObjectGuid imageList[5]
Definition: zone_dragonblight.cpp:2021
EventMap _events
Definition: zone_dragonblight.cpp:2019

References _events, EVENT_TALK_COMPLETE, ObjectAccessor::GetCreature(), imageList, ScriptedAI::me, EventMap::ScheduleEvent(), SPELL_HEROIC_IMAGE_CHANNEL, and talkWing.

Referenced by MovementInform().

◆ MovementInform()

void npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1803 {
1804 if (type == POINT_MOTION_TYPE)
1805 {
1806 if (id == 1)
1807 {
1808 me->SetFacingTo(PosTalkLocations[talkWing].GetOrientation());
1809 TurnAudience();
1810
1811 switch (talkWing)
1812 {
1813 case 0: // Pinnacle of Naxxramas
1814 {
1815 switch (urand (0, 1))
1816 {
1817 case 0:
1820 break;
1821 case 1:
1823 break;
1824 }
1825 }
1826 break;
1827 case 1: // Death knight wing of Naxxramas
1828 {
1829 switch (urand (0, 2))
1830 {
1831 case 0:
1833 break;
1834 case 1:
1836 break;
1837 case 2:
1840 break;
1841 }
1842 }
1843 break;
1844 case 2: // Blighted abomination wing of Naxxramas
1845 {
1846 switch (urand (0, 3))
1847 {
1848 case 0:
1850 break;
1851 case 1:
1853 break;
1854 case 2:
1856 break;
1857 case 3:
1859 break;
1860 }
1861 }
1862 break;
1863 case 3: // Accursed spider wing of Naxxramas
1864 {
1865 switch (urand (0, 2))
1866 {
1867 case 0:
1869 break;
1870 case 1:
1872 break;
1873 case 2:
1875 break;
1876 }
1877 }
1878 break;
1879 case 4: // Dread plague wing of Naxxramas
1880 {
1881 switch (urand (0, 2))
1882 {
1883 case 0:
1885 break;
1886 case 1:
1889 break;
1890 case 2:
1892 break;
1893 }
1894 }
1895 break;
1896 case 5: // Home
1898 break;
1899 }
1900 }
1901 }
1902 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ EVENT_KELTHUZAD_2
Definition: zone_dragonblight.cpp:1756
@ SAY_NOTH
Definition: zone_dragonblight.cpp:1745
@ SAY_LOATHEB
Definition: zone_dragonblight.cpp:1748
@ NPC_IMAGE_OF_THADDIUS
Definition: zone_dragonblight.cpp:1702
@ SAY_GLUTH
Definition: zone_dragonblight.cpp:1738
@ EVENT_START_RANDOM
Definition: zone_dragonblight.cpp:1752
@ MODEL_IMAGE_OF_GROBBULUS
Definition: zone_dragonblight.cpp:1683
@ SAY_SAPPHIRON
Definition: zone_dragonblight.cpp:1724
@ EVENT_HEIGAN_2
Definition: zone_dragonblight.cpp:1761
@ SAY_MAEXXNA
Definition: zone_dragonblight.cpp:1743
@ MODEL_IMAGE_OF_GOTHIK
Definition: zone_dragonblight.cpp:1678
@ MODEL_IMAGE_OF_RAZUVIOUS
Definition: zone_dragonblight.cpp:1677
@ NPC_IMAGE_OF_THANE
Definition: zone_dragonblight.cpp:1697
@ MODEL_IMAGE_OF_LOATHEB
Definition: zone_dragonblight.cpp:1691
@ MODEL_IMAGE_OF_THADDIUS
Definition: zone_dragonblight.cpp:1684
@ MODEL_IMAGE_OF_FAERLINA
Definition: zone_dragonblight.cpp:1687
@ SAY_PATCHWERK
Definition: zone_dragonblight.cpp:1736
@ EVENT_DEATH_KNIGHTS_2
Definition: zone_dragonblight.cpp:1758
@ NPC_IMAGE_OF_GOTHIK
Definition: zone_dragonblight.cpp:1696
@ NPC_IMAGE_OF_ANUBREKHAN
Definition: zone_dragonblight.cpp:1704
@ SAY_DEATH_KNIGHTS_1
Definition: zone_dragonblight.cpp:1731
@ MODEL_IMAGE_OF_NOTH
Definition: zone_dragonblight.cpp:1689
@ SAY_HEIGAN_1
Definition: zone_dragonblight.cpp:1746
@ SAY_FAERLINA
Definition: zone_dragonblight.cpp:1742
@ MODEL_IMAGE_OF_MAEXXNA
Definition: zone_dragonblight.cpp:1688
@ SAY_GROBBULUS
Definition: zone_dragonblight.cpp:1737
@ MODEL_IMAGE_OF_PATCHWERK
Definition: zone_dragonblight.cpp:1682
@ NPC_IMAGE_OF_KELTHUZAD
Definition: zone_dragonblight.cpp:1693
@ NPC_IMAGE_OF_FAERLINA
Definition: zone_dragonblight.cpp:1705
@ SAY_ANUBREKHAN
Definition: zone_dragonblight.cpp:1741
@ SAY_GOTHIK
Definition: zone_dragonblight.cpp:1730
@ MODEL_IMAGE_OF_SAPPHIRON
Definition: zone_dragonblight.cpp:1676
@ MODEL_IMAGE_OF_ANUBREKHAN
Definition: zone_dragonblight.cpp:1686
@ MODEL_IMAGE_OF_KELTHUZAD
Definition: zone_dragonblight.cpp:1675
@ NPC_IMAGE_OF_MAEXXNA
Definition: zone_dragonblight.cpp:1706
@ NPC_IMAGE_OF_PATCHWERK
Definition: zone_dragonblight.cpp:1700
@ SAY_KELTHUZAD_1
Definition: zone_dragonblight.cpp:1725
@ NPC_IMAGE_OF_GLUTH
Definition: zone_dragonblight.cpp:1703
@ NPC_IMAGE_OF_RAZUVIOUS
Definition: zone_dragonblight.cpp:1695
@ NPC_IMAGE_OF_HEIGAN
Definition: zone_dragonblight.cpp:1708
@ NPC_IMAGE_OF_SAPPHIRON
Definition: zone_dragonblight.cpp:1694
@ NPC_IMAGE_OF_NOTH
Definition: zone_dragonblight.cpp:1707
@ MODEL_IMAGE_OF_GLUTH
Definition: zone_dragonblight.cpp:1685
@ MODEL_IMAGE_OF_HEIGAN
Definition: zone_dragonblight.cpp:1690
@ NPC_IMAGE_OF_GROBBULUS
Definition: zone_dragonblight.cpp:1701
@ NPC_IMAGE_OF_LOATHEB
Definition: zone_dragonblight.cpp:1709
@ SAY_RAZUVIOUS
Definition: zone_dragonblight.cpp:1729
@ SAY_THADDIUS
Definition: zone_dragonblight.cpp:1739
@ MODEL_IMAGE_OF_THANE
Definition: zone_dragonblight.cpp:1679
Position const PosTalkLocations[6]
Definition: zone_dragonblight.cpp:1766
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:48
void SetFacingTo(float ori)
Definition: Unit.cpp:20527
void ChangeImage(uint32 entry, uint32 model, uint8 text)
Definition: zone_dragonblight.cpp:1934
void TurnAudience()
Definition: zone_dragonblight.cpp:1946

References _events, ChangeImage(), EVENT_DEATH_KNIGHTS_2, EVENT_HEIGAN_2, EVENT_KELTHUZAD_2, EVENT_START_RANDOM, ScriptedAI::me, MODEL_IMAGE_OF_ANUBREKHAN, MODEL_IMAGE_OF_FAERLINA, MODEL_IMAGE_OF_GLUTH, MODEL_IMAGE_OF_GOTHIK, MODEL_IMAGE_OF_GROBBULUS, MODEL_IMAGE_OF_HEIGAN, MODEL_IMAGE_OF_KELTHUZAD, MODEL_IMAGE_OF_LOATHEB, MODEL_IMAGE_OF_MAEXXNA, MODEL_IMAGE_OF_NOTH, MODEL_IMAGE_OF_PATCHWERK, MODEL_IMAGE_OF_RAZUVIOUS, MODEL_IMAGE_OF_SAPPHIRON, MODEL_IMAGE_OF_THADDIUS, MODEL_IMAGE_OF_THANE, NPC_IMAGE_OF_ANUBREKHAN, NPC_IMAGE_OF_FAERLINA, NPC_IMAGE_OF_GLUTH, NPC_IMAGE_OF_GOTHIK, NPC_IMAGE_OF_GROBBULUS, NPC_IMAGE_OF_HEIGAN, NPC_IMAGE_OF_KELTHUZAD, NPC_IMAGE_OF_LOATHEB, NPC_IMAGE_OF_MAEXXNA, NPC_IMAGE_OF_NOTH, NPC_IMAGE_OF_PATCHWERK, NPC_IMAGE_OF_RAZUVIOUS, NPC_IMAGE_OF_SAPPHIRON, NPC_IMAGE_OF_THADDIUS, NPC_IMAGE_OF_THANE, POINT_MOTION_TYPE, PosTalkLocations, SAY_ANUBREKHAN, SAY_DEATH_KNIGHTS_1, SAY_FAERLINA, SAY_GLUTH, SAY_GOTHIK, SAY_GROBBULUS, SAY_HEIGAN_1, SAY_KELTHUZAD_1, SAY_LOATHEB, SAY_MAEXXNA, SAY_NOTH, SAY_PATCHWERK, SAY_RAZUVIOUS, SAY_SAPPHIRON, SAY_THADDIUS, EventMap::ScheduleEvent(), Unit::SetFacingTo(), talkWing, TurnAudience(), and urand().

◆ Reset()

void npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1789 {
1790 talkWing = 0;
1791
1792 for (uint8 i = 0; i < 10; ++i)
1793 audienceList[i].Clear();
1794
1795 for (uint8 i = 0; i < 5; ++i)
1796 imageList[i].Clear();
1797
1800 }
std::uint8_t uint8
Definition: Define.h:109
@ EVENT_GET_TARGETS
Definition: zone_dragonblight.cpp:1755
ObjectGuid audienceList[10]
Definition: zone_dragonblight.cpp:2020

References _events, audienceList, EVENT_GET_TARGETS, EVENT_START_RANDOM, imageList, EventMap::ScheduleEvent(), and talkWing.

◆ StoreTargets()

void npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::StoreTargets ( )
inline
1905 {
1906 uint8 creturesCount = 0;
1907
1908 for (uint8 ii = 0; ii < 3; ++ii)
1909 {
1910 std::list<Creature*> creatureList;
1911 GetCreatureListWithEntryInGrid(creatureList, me, AudienceMobs[ii], 15.0f);
1912 for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
1913 {
1914 if (Creature* creature = *itr)
1915 {
1916 audienceList[creturesCount] = creature->GetGUID();
1917 ++creturesCount;
1918 }
1919 }
1920 }
1921
1922 if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_KELTHUZAD, 20.0f, true))
1923 imageList[0] = creature->GetGUID();
1924 if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_RAZUVIOUS, 20.0f, true))
1925 imageList[1] = creature->GetGUID();
1926 if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_PATCHWERK, 20.0f, true))
1927 imageList[2] = creature->GetGUID();
1928 if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_ANUBREKHAN, 20.0f, true))
1929 imageList[3] = creature->GetGUID();
1930 if (Creature* creature = me->FindNearestCreature(NPC_IMAGE_OF_NOTH, 20.0f, true))
1931 imageList[4] = creature->GetGUID();
1932 }
uint32 const AudienceMobs[3]
Definition: zone_dragonblight.cpp:1764
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:860
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2457

References audienceList, AudienceMobs, WorldObject::FindNearestCreature(), GetCreatureListWithEntryInGrid(), imageList, ScriptedAI::me, NPC_IMAGE_OF_ANUBREKHAN, NPC_IMAGE_OF_KELTHUZAD, NPC_IMAGE_OF_NOTH, NPC_IMAGE_OF_PATCHWERK, and NPC_IMAGE_OF_RAZUVIOUS.

Referenced by UpdateAI().

◆ TurnAudience()

void npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::TurnAudience ( )
inline
1947 {
1948 for (uint8 i = 0; i < 10; ++i)
1949 {
1951 creature->SetFacingToObject(me);
1952 }
1953 }

References audienceList, ObjectAccessor::GetCreature(), and ScriptedAI::me.

Referenced by MovementInform().

◆ UpdateAI()

void npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from ScriptedAI.

1956 {
1957 _events.Update(diff);
1958
1959 while (uint32 eventId = _events.ExecuteEvent())
1960 {
1961 switch (eventId)
1962 {
1963 case EVENT_START_RANDOM:
1964 talkWing = urand (0, 4);
1965 Talk(talkWing);
1967 break;
1969 me->SetWalk(true);
1970 me->GetMotionMaster()->Clear();
1972 break;
1974 talkWing = 5;
1975 Talk(talkWing);
1977 break;
1978 case EVENT_GET_TARGETS:
1979 StoreTargets();
1980 break;
1981 case EVENT_KELTHUZAD_2:
1984 break;
1985 case EVENT_KELTHUZAD_3:
1987 break;
1991 {
1992 creature->SetEntry(NPC_IMAGE_OF_BLAUMEUX);
1993 creature->SetDisplayId(MODEL_IMAGE_OF_BLAUMEUX);
1994 }
1996 break;
2000 {
2001 creature->SetEntry(NPC_IMAGE_OF_ZELIEK);
2002 creature->SetDisplayId(MODEL_IMAGE_OF_ZELIEK);
2003 }
2005 break;
2008 break;
2009 case EVENT_HEIGAN_2:
2011 break;
2012 default:
2013 break;
2014 }
2015 }
2017 }
std::uint32_t uint32
Definition: Define.h:107
@ EVENT_DEATH_KNIGHTS_4
Definition: zone_dragonblight.cpp:1760
@ SAY_DEATH_KNIGHTS_2
Definition: zone_dragonblight.cpp:1732
@ NPC_IMAGE_OF_ZELIEK
Definition: zone_dragonblight.cpp:1699
@ MODEL_IMAGE_OF_BLAUMEUX
Definition: zone_dragonblight.cpp:1680
@ SAY_DEATH_KNIGHTS_3
Definition: zone_dragonblight.cpp:1733
@ EVENT_KELTHUZAD_3
Definition: zone_dragonblight.cpp:1757
@ SAY_KELTHUZAD_2
Definition: zone_dragonblight.cpp:1726
@ SAY_DEATH_KNIGHTS_4
Definition: zone_dragonblight.cpp:1734
@ MODEL_IMAGE_OF_ZELIEK
Definition: zone_dragonblight.cpp:1681
@ EVENT_MOVE_TO_POINT
Definition: zone_dragonblight.cpp:1753
@ NPC_IMAGE_OF_BLAUMEUX
Definition: zone_dragonblight.cpp:1698
@ SAY_KELTHUZAD_3
Definition: zone_dragonblight.cpp:1727
@ EVENT_DEATH_KNIGHTS_3
Definition: zone_dragonblight.cpp:1759
@ SAY_HEIGAN_2
Definition: zone_dragonblight.cpp:1747
uint32 ExecuteEvent()
Definition: EventMap.cpp:114
void Update(uint32 time)
Definition: EventMap.h:54
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
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
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:213
void Clear(bool reset=true)
Definition: MotionMaster.h:167
void StoreTargets()
Definition: zone_dragonblight.cpp:1904

References _events, MotionMaster::Clear(), UnitAI::DoMeleeAttackIfReady(), EVENT_DEATH_KNIGHTS_2, EVENT_DEATH_KNIGHTS_3, EVENT_DEATH_KNIGHTS_4, EVENT_GET_TARGETS, EVENT_HEIGAN_2, EVENT_KELTHUZAD_2, EVENT_KELTHUZAD_3, EVENT_MOVE_TO_POINT, EVENT_START_RANDOM, EVENT_TALK_COMPLETE, EventMap::ExecuteEvent(), ObjectAccessor::GetCreature(), Unit::GetMotionMaster(), imageList, ScriptedAI::me, MODEL_IMAGE_OF_BLAUMEUX, MODEL_IMAGE_OF_ZELIEK, MotionMaster::MovePoint(), NPC_IMAGE_OF_BLAUMEUX, NPC_IMAGE_OF_ZELIEK, PosTalkLocations, SAY_DEATH_KNIGHTS_2, SAY_DEATH_KNIGHTS_3, SAY_DEATH_KNIGHTS_4, SAY_HEIGAN_2, SAY_KELTHUZAD_2, SAY_KELTHUZAD_3, EventMap::ScheduleEvent(), Creature::SetWalk(), StoreTargets(), talkWing, EventMap::Update(), and urand().

Member Data Documentation

◆ _events

EventMap npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::_events
private

◆ audienceList

ObjectGuid npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::audienceList[10]
private

Referenced by Reset(), StoreTargets(), and TurnAudience().

◆ imageList

ObjectGuid npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::imageList[5]
private

◆ talkWing

uint8 npc_commander_eligor_dawnbringer::npc_commander_eligor_dawnbringerAI::talkWing
private