TrinityCore
boss_elder_nadox Struct Reference

Public Member Functions

 boss_elder_nadox (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void JustEngagedWith (Unit *who) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
uint32 GetData (uint32 type) const override
 
void KilledUnit (Unit *who) override
 
void JustDied (Unit *) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void JustReachedHome () override
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ScriptedAI (Creature *creature, uint32 scriptId)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
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 AddThreat (Unit *victim, float amount, Unit *who=nullptr)
 
void ModifyThreatByPercent (Unit *victim, int32 pct, Unit *who=nullptr)
 
void ResetThreat (Unit *victim, Unit *who=nullptr)
 
void ResetThreatList (Unit *who=nullptr)
 
float GetThreat (Unit const *victim, Unit const *who=nullptr)
 
void ForceCombatStop (Creature *who, bool reset=true)
 
void ForceCombatStopForCreatureEntry (uint32 entry, float maxSearchRange=250.0f, bool samePhase=true, bool reset=true)
 
void ForceCombatStopForCreatureEntry (std::vector< uint32 > creatureEntries, float maxSearchRange=250.0f, bool samePhase=true, bool reset=true)
 
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)
 
UnitDoSelectBelowHpPctFriendlyWithEntry (uint32 entry, float range, uint8 hpPct=1, bool excludeSelf=true)
 
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, Milliseconds despawntime)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (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 >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
- Public Member Functions inherited from CreatureAI
 CreatureAI (Creature *creature, uint32 scriptId={})
 
virtual ~CreatureAI ()
 
uint32 GetId () const
 
bool IsEngaged () const
 
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
void JustEnteredCombat (Unit *) override
 
virtual void JustStartedThreateningMe (Unit *who)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void JustSummonedGameobject (GameObject *)
 
virtual void SummonedGameobjectDespawn (GameObject *)
 
virtual void JustRegisteredDynObject (DynamicObject *)
 
virtual void JustUnregisteredDynObject (DynamicObject *)
 
virtual void JustRegisteredAreaTrigger (AreaTrigger *)
 
virtual void JustUnregisteredAreaTrigger (AreaTrigger *)
 
virtual void SpellHit (WorldObject *, SpellInfo const *)
 
virtual void SpellHitTarget (WorldObject *, SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual bool IsEscorted () const
 
virtual void JustAppeared ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool isNew) override
 
void DoZoneInCombat (Creature *creature=nullptr)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual Optional< QuestGiverStatusGetDialogStatus (Player *player)
 == Gossip system ================================ More...
 
virtual bool OnGossipHello (Player *)
 
virtual bool OnGossipSelect (Player *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void OnQuestAccept (Player *, Quest const *)
 
virtual void OnQuestReward (Player *, Quest const *, LootItemType, uint32)
 
virtual void WaypointStarted (uint32, uint32)
 == Waypoints system ============================= More...
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual PlayerAIGetAIForCharmedPlayer (Player *)
 
int32 VisualizeBoundary (Seconds duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit *> &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit *> &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset, PREDICATE const &predicate)
 
virtual void JustExitedCombat ()
 
virtual void LeavingWorld ()
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellInfo const *)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastSelf (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastVictim (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastAOE (uint32 spellId, CastSpellExtraArgs const &args={})
 
virtual bool ShouldSparWith (Unit const *) const
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void OnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

bool _guardianSummoned
 
bool _guardianDied
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_NO_PATH, EVADE_REASON_SEQUENCE_BREAK,
  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 BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static std::unordered_map< std::pair< uint32, Difficulty >, AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith (Unit *who)
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade (Seconds delayToRespawn=30s, Creature *who=nullptr)
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
CreatureDoSummon (uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

◆ boss_elder_nadox()

boss_elder_nadox::boss_elder_nadox ( Creature creature)
inline
62  : BossAI(creature, DATA_ELDER_NADOX)
63  {
64  Initialize();
65  }
void Initialize()
Definition: boss_elder_nadox.cpp:67
Definition: ahnkahet.h:31
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:493
+ Here is the call graph for this function:

Member Function Documentation

◆ GetData()

uint32 boss_elder_nadox::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

101  {
102  if (type == DATA_RESPECT_YOUR_ELDERS)
103  return !_guardianDied ? 1 : 0;
104 
105  return 0;
106  }
Definition: boss_elder_nadox.cpp:55
bool _guardianDied
Definition: boss_elder_nadox.cpp:176

◆ Initialize()

void boss_elder_nadox::Initialize ( )
inline
68  {
69  _guardianSummoned = false;
70  _guardianDied = false;
71  }
bool _guardianDied
Definition: boss_elder_nadox.cpp:176
bool _guardianSummoned
Definition: boss_elder_nadox.cpp:175
+ Here is the caller graph for this function:

◆ JustDied()

void boss_elder_nadox::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

115  {
116  _JustDied();
117  Talk(SAY_DEATH);
118  }
void _JustDied()
Definition: ScriptedCreature.cpp:517
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:54
Definition: boss_elder_nadox.cpp:29
+ Here is the call graph for this function:

◆ JustEngagedWith()

void boss_elder_nadox::JustEngagedWith ( Unit who)
inlineoverridevirtual

Reimplemented from BossAI.

80  {
82  Talk(SAY_AGGRO);
83 
86 
87  if (IsHeroic())
88  {
91  }
92  }
bool IsHeroic() const
Definition: ScriptedCreature.h:245
Definition: boss_elder_nadox.cpp:52
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
Definition: boss_elder_nadox.cpp:50
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:54
Definition: boss_elder_nadox.cpp:27
EventMap events
Definition: ScriptedCreature.h:348
void JustEngagedWith(Unit *who) override
Definition: ScriptedCreature.h:333
Definition: boss_elder_nadox.cpp:51
Definition: boss_elder_nadox.cpp:53
+ Here is the call graph for this function:

◆ KilledUnit()

void boss_elder_nadox::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

109  {
110  if (who->GetTypeId() == TYPEID_PLAYER)
111  Talk(SAY_SLAY);
112  }
TypeID GetTypeId() const
Definition: Object.h:170
Definition: boss_elder_nadox.cpp:28
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:54
Definition: ObjectGuid.h:40
+ Here is the call graph for this function:

◆ Reset()

void boss_elder_nadox::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

74  {
75  _Reset();
76  Initialize();
77  }
void _Reset()
Definition: ScriptedCreature.cpp:503
void Initialize()
Definition: boss_elder_nadox.cpp:67
+ Here is the call graph for this function:

◆ SummonedCreatureDies()

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

Reimplemented from CreatureAI.

95  {
96  if (summon->GetEntry() == NPC_AHNKAHAR_GUARDIAN)
97  _guardianDied = true;
98  }
bool _guardianDied
Definition: boss_elder_nadox.cpp:176
uint32 GetEntry() const
Definition: Object.h:158
Definition: ahnkahet.h:52
+ Here is the call graph for this function:

◆ UpdateAI()

void boss_elder_nadox::UpdateAI ( uint32  diff)
inlineoverridevirtual
Todo:
: summoned by egg
Todo:
: summoned by egg

Reimplemented from BossAI.

121  {
122  if (!UpdateVictim())
123  return;
124 
125  events.Update(diff);
126 
127  while (uint32 eventId = events.ExecuteEvent())
128  {
129  switch (eventId)
130  {
131  case EVENT_PLAGUE:
132  if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
133  DoCast(target, SPELL_BROOD_PLAGUE, true);
134  events.Repeat(15s);
135  break;
136  case EVENT_BROOD_RAGE:
138  events.Repeat(10s, 50s);
139  break;
143  if (roll_chance_i(33)) // 33% chance of dialog
144  Talk(SAY_EGG_SAC);
145  events.Repeat(10s);
146  break;
147  case EVENT_CHECK_ENRAGE:
148  if (me->HasAura(SPELL_BERSERK))
149  return;
151  DoCast(me, SPELL_BERSERK, true);
152  else
153  events.Repeat(5s);
154  break;
155  default:
156  break;
157  }
158 
160  return;
161  }
162 
163  if (!_guardianSummoned && me->HealthBelowPct(50))
164  {
168  _guardianSummoned = true;
169  }
170 
172  }
Definition: boss_elder_nadox.cpp:31
bool roll_chance_i(int chance)
Definition: Random.h:59
bool UpdateVictim()
Definition: CreatureAI.cpp:246
Definition: boss_elder_nadox.cpp:37
void Repeat(Milliseconds time)
Definition: EventMap.cpp:63
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:321
Definition: boss_elder_nadox.cpp:52
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4520
Definition: boss_elder_nadox.cpp:41
bool _guardianSummoned
Definition: boss_elder_nadox.cpp:175
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:102
Definition: Unit.h:257
Definition: boss_elder_nadox.cpp:39
Creature *const me
Definition: CreatureAI.h:61
Definition: boss_elder_nadox.cpp:50
bool HasUnitState(const uint32 f) const
Definition: Unit.h:850
bool IsWithinBoundary(Position const *pos) const
Definition: AreaBoundary.h:26
Definition: boss_elder_nadox.cpp:30
uint32_t uint32
Definition: Define.h:143
Definition: boss_elder_nadox.cpp:38
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:54
ParallelogramBoundary const ElderNadoxRoomBoundary
Definition: boss_elder_nadox.cpp:58
void Update(uint32 time)
Definition: EventMap.h:54
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:112
Definition: boss_elder_nadox.cpp:40
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:60
EventMap events
Definition: ScriptedCreature.h:348
Definition: boss_elder_nadox.cpp:51
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:897
Definition: boss_elder_nadox.cpp:53
Definition: Unit.h:746
+ Here is the call graph for this function:

Member Data Documentation

◆ _guardianDied

bool boss_elder_nadox::_guardianDied
private

◆ _guardianSummoned

bool boss_elder_nadox::_guardianSummoned
private

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