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

Public Member Functions

 boss_archaedasAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void ActivateMinion (ObjectGuid uiGuid, bool flag)
 
void EnterCombat (Unit *) override
 
void SpellHit (Unit *, const SpellInfo *spell) override
 
void KilledUnit (Unit *) override
 
void UpdateAI (uint32 uiDiff) override
 
void JustDied (Unit *) override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) 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 EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
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 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 sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Public Attributes

uint32 uiTremorTimer
 
int32 iAwakenTimer
 
uint32 uiWallMinionTimer
 
bool bWakingUp
 
bool bGuardiansAwake
 
bool bVaultWalkersAwake
 
InstanceScriptinstance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 

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

boss_archaedas::boss_archaedasAI::boss_archaedasAI ( Creature creature)
inline
68  : ScriptedAI(creature)
69  {
70  Initialize();
72  }
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Creature *const me
Definition: CreatureAI.h:71
void Initialize()
Definition: boss_archaedas.cpp:74
InstanceScript * instance
Definition: boss_archaedas.cpp:92

+ Here is the call graph for this function:

Member Function Documentation

void boss_archaedas::boss_archaedasAI::ActivateMinion ( ObjectGuid  uiGuid,
bool  flag 
)
inline
106  {
107  Unit* minion = ObjectAccessor::GetUnit(*me, uiGuid);
108 
109  if (minion && minion->IsAlive())
110  {
111  DoCast(minion, SPELL_AWAKEN_VAULT_WALKER, flag);
112  minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true);
115  minion->setFaction(14);
117  }
118  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Definition: Unit.h:675
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3442
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_archaedas.cpp:45
bool IsAlive() const
Definition: Unit.h:1692
Definition: boss_archaedas.cpp:49
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: boss_archaedas.cpp:53
Definition: UpdateFields.h:109
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
Definition: Unit.h:698

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_archaedas::boss_archaedasAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

121  {
122  me->setFaction(14);
125  }
Definition: Unit.h:675
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: UpdateFields.h:109
Definition: Unit.h:698

+ Here is the call graph for this function:

void boss_archaedas::boss_archaedasAI::Initialize ( void  )
inline
75  {
76  uiTremorTimer = 60000;
77  iAwakenTimer = 0;
78  uiWallMinionTimer = 10000;
79 
80  bWakingUp = false;
81  bGuardiansAwake = false;
82  bVaultWalkersAwake = false;
83  }
bool bVaultWalkersAwake
Definition: boss_archaedas.cpp:91
uint32 uiTremorTimer
Definition: boss_archaedas.cpp:85
bool bWakingUp
Definition: boss_archaedas.cpp:88
bool bGuardiansAwake
Definition: boss_archaedas.cpp:90
uint32 uiWallMinionTimer
Definition: boss_archaedas.cpp:87
int32 iAwakenTimer
Definition: boss_archaedas.cpp:86

+ Here is the caller graph for this function:

void boss_archaedas::boss_archaedasAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

206  {
207  instance->SetData(DATA_ANCIENT_DOOR, DONE); // open the vault door
208  instance->SetData(DATA_MINIONS, SPECIAL); // deactivate his minions
209  }
Definition: inflate.h:49
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
Definition: InstanceScript.h:62
Definition: uldaman.h:32
Definition: uldaman.h:29
InstanceScript * instance
Definition: boss_archaedas.cpp:92

+ Here is the call graph for this function:

void boss_archaedas::boss_archaedasAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

139  {
140  Talk(SAY_KILL);
141  }
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_archaedas.cpp:39

+ Here is the call graph for this function:

void boss_archaedas::boss_archaedasAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

95  {
96  Initialize();
97 
98  instance->SetData(0, 5); // respawn any dead minions
99  me->setFaction(35);
103  }
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:14463
Definition: Unit.h:675
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
void Initialize()
Definition: boss_archaedas.cpp:74
Definition: UpdateFields.h:109
Definition: boss_archaedas.cpp:52
InstanceScript * instance
Definition: boss_archaedas.cpp:92
Definition: Unit.h:698

+ Here is the call graph for this function:

void boss_archaedas::boss_archaedasAI::SpellHit ( Unit ,
const SpellInfo spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

128  {
129  // Being woken up from the altar, start the awaken sequence
130  if (spell == sSpellMgr->GetSpellInfo(SPELL_ARCHAEDAS_AWAKEN))
131  {
132  Talk(SAY_AGGRO);
133  iAwakenTimer = 4000;
134  bWakingUp = true;
135  }
136  }
bool bWakingUp
Definition: boss_archaedas.cpp:88
Definition: boss_archaedas.cpp:45
#define sSpellMgr
Definition: SpellMgr.h:756
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
int32 iAwakenTimer
Definition: boss_archaedas.cpp:86
Definition: boss_archaedas.cpp:36

+ Here is the call graph for this function:

void boss_archaedas::boss_archaedasAI::UpdateAI ( uint32  uiDiff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

144  {
145  // we're still doing awaken animation
146  if (bWakingUp && iAwakenTimer >= 0)
147  {
148  iAwakenTimer -= uiDiff;
149  return; // dont do anything until we are done
150  } else if (bWakingUp && iAwakenTimer <= 0)
151  {
152  bWakingUp = false;
154  return; // dont want to continue until we finish the AttackStart method
155  }
156 
157  //Return since we have no target
158  if (!UpdateVictim())
159  return;
160 
161  // wake a wall minion
162  if (uiWallMinionTimer <= uiDiff)
163  {
165 
166  uiWallMinionTimer = 10000;
167  } else uiWallMinionTimer -= uiDiff;
168 
169  //If we are <66 summon the guardians
170  if (!bGuardiansAwake && !HealthAbovePct(66))
171  {
172  ActivateMinion(instance->GetGuidData(5), true); // EarthenGuardian1
173  ActivateMinion(instance->GetGuidData(6), true); // EarthenGuardian2
174  ActivateMinion(instance->GetGuidData(7), true); // EarthenGuardian3
175  ActivateMinion(instance->GetGuidData(8), true); // EarthenGuardian4
176  ActivateMinion(instance->GetGuidData(9), true); // EarthenGuardian5
177  ActivateMinion(instance->GetGuidData(10), false); // EarthenGuardian6
179  bGuardiansAwake = true;
180  }
181 
182  //If we are <33 summon the vault walkers
183  if (!bVaultWalkersAwake && !HealthAbovePct(33))
184  {
185  ActivateMinion(instance->GetGuidData(1), true); // VaultWalker1
186  ActivateMinion(instance->GetGuidData(2), true); // VaultWalker2
187  ActivateMinion(instance->GetGuidData(3), true); // VaultWalker3
188  ActivateMinion(instance->GetGuidData(4), false); // VaultWalker4
190  bVaultWalkersAwake = true;
191  }
192 
193  if (uiTremorTimer <= uiDiff)
194  {
195  //Cast
197 
198  //45 seconds until we should cast this agian
199  uiTremorTimer = 45000;
200  } else uiTremorTimer -= uiDiff;
201 
203  }
bool UpdateVictim()
Definition: CreatureAI.cpp:233
bool bVaultWalkersAwake
Definition: boss_archaedas.cpp:91
Definition: boss_archaedas.cpp:38
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
uint32 uiTremorTimer
Definition: boss_archaedas.cpp:85
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
Definition: boss_archaedas.cpp:37
bool bWakingUp
Definition: boss_archaedas.cpp:88
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: InstanceScript.h:59
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: uldaman.h:32
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
bool bGuardiansAwake
Definition: boss_archaedas.cpp:90
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void ActivateMinion(ObjectGuid uiGuid, bool flag)
Definition: boss_archaedas.cpp:105
uint32 uiWallMinionTimer
Definition: boss_archaedas.cpp:87
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
int32 iAwakenTimer
Definition: boss_archaedas.cpp:86
InstanceScript * instance
Definition: boss_archaedas.cpp:92
Definition: boss_archaedas.cpp:44

+ Here is the call graph for this function:

Member Data Documentation

bool boss_archaedas::boss_archaedasAI::bGuardiansAwake
bool boss_archaedas::boss_archaedasAI::bVaultWalkersAwake
bool boss_archaedas::boss_archaedasAI::bWakingUp
int32 boss_archaedas::boss_archaedasAI::iAwakenTimer
InstanceScript* boss_archaedas::boss_archaedasAI::instance
uint32 boss_archaedas::boss_archaedasAI::uiTremorTimer
uint32 boss_archaedas::boss_archaedasAI::uiWallMinionTimer

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