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

Public Member Functions

 boss_paletressAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void SetData (uint32 uiId, uint32) override
 
void DamageTaken (Unit *, uint32 &damage) override
 
void MovementInform (uint32 MovementType, uint32 Point) override
 
void UpdateAI (uint32 uiDiff) override
 
void JustSummoned (Creature *summon) 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 SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
void EnterCombat (Unit *) override
 
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 ()
 
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 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

InstanceScriptinstance
 
ObjectGuid MemoryGUID
 
bool bHealth
 
bool bDone
 
uint32 uiHolyFireTimer
 
uint32 uiHolySmiteTimer
 
uint32 uiRenewTimer
 
uint32 uiResetTimer
 
- 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_paletress::boss_paletressAI::boss_paletressAI ( Creature creature)
inline
267  : ScriptedAI(creature)
268  {
269  Initialize();
270  instance = creature->GetInstanceScript();
271 
272  creature->SetReactState(REACT_PASSIVE);
274  creature->RestoreFaction();
275  }
void Initialize()
Definition: boss_argent_challenge.cpp:277
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
Definition: Unit.h:674
Definition: Unit.h:1129
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
void RestoreFaction()
Definition: Unit.cpp:14277
Definition: UpdateFields.h:109
InstanceScript * instance
Definition: boss_argent_challenge.cpp:289
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

Member Function Documentation

void boss_paletress::boss_paletressAI::DamageTaken ( Unit ,
uint32 damage 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

318  {
319  if (damage >= me->GetHealth())
320  {
321  damage = 0;
322  EnterEvadeMode();
323  me->setFaction(35);
324  bDone = true;
325  }
326  }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
bool bDone
Definition: boss_argent_challenge.cpp:293
uint32 GetHealth() const
Definition: Unit.h:1426

+ Here is the call graph for this function:

void boss_paletress::boss_paletressAI::Initialize ( void  )
inline
278  {
279  uiHolyFireTimer = urand(9000, 12000);
280  uiHolySmiteTimer = urand(5000, 7000);
281  uiRenewTimer = urand(2000, 5000);
282 
283  uiResetTimer = 7000;
284 
285  bHealth = false;
286  bDone = false;
287  }
uint32 uiResetTimer
Definition: boss_argent_challenge.cpp:298
bool bHealth
Definition: boss_argent_challenge.cpp:292
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32 uiHolyFireTimer
Definition: boss_argent_challenge.cpp:295
uint32 uiRenewTimer
Definition: boss_argent_challenge.cpp:297
bool bDone
Definition: boss_argent_challenge.cpp:293
uint32 uiHolySmiteTimer
Definition: boss_argent_challenge.cpp:296

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_paletress::boss_paletressAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from ScriptedAI.

411  {
412  MemoryGUID = summon->GetGUID();
413  }
ObjectGuid const & GetGUID() const
Definition: Object.h:105
ObjectGuid MemoryGUID
Definition: boss_argent_challenge.cpp:290

+ Here is the call graph for this function:

void boss_paletress::boss_paletressAI::MovementInform ( uint32  MovementType,
uint32  Point 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

329  {
330  if (MovementType != POINT_MOTION_TYPE || Point != 0)
331  return;
332 
334 
335  me->DisappearAndDie();
336  }
Definition: inflate.h:49
Creature *const me
Definition: CreatureAI.h:71
Definition: trial_of_the_champion.h:28
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
InstanceScript * instance
Definition: boss_argent_challenge.cpp:289
void DisappearAndDie()
Definition: Creature.cpp:256
Definition: MotionMaster.h:46

+ Here is the call graph for this function:

void boss_paletress::boss_paletressAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

301  {
302  me->RemoveAllAuras();
303 
304  Initialize();
305 
307  if (pMemory->IsAlive())
308  pMemory->RemoveFromWorld();
309  }
void RemoveAllAuras()
Definition: Unit.cpp:3920
void Initialize()
Definition: boss_argent_challenge.cpp:277
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
ObjectGuid MemoryGUID
Definition: boss_argent_challenge.cpp:290

+ Here is the call graph for this function:

void boss_paletress::boss_paletressAI::SetData ( uint32  uiId,
uint32   
)
inlineoverridevirtual

Reimplemented from UnitAI.

312  {
313  if (uiId == 1)
315  }
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3442
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_argent_challenge.cpp:72

+ Here is the call graph for this function:

void boss_paletress::boss_paletressAI::UpdateAI ( uint32  uiDiff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

339  {
340  if (bDone && uiResetTimer <= uiDiff)
341  {
342  me->GetMotionMaster()->MovePoint(0, 746.87f, 665.87f, 411.75f);
343  bDone = false;
344  } else uiResetTimer -= uiDiff;
345 
346  if (!UpdateVictim())
347  return;
348 
349  if (uiHolyFireTimer <= uiDiff)
350  {
351  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 250, true))
352  {
353  if (target && target->IsAlive())
354  DoCast(target, SPELL_HOLY_FIRE);
355  }
356  if (me->HasAura(SPELL_SHIELD))
357  uiHolyFireTimer = 13000;
358  else
359  uiHolyFireTimer = urand(9000, 12000);
360  } else uiHolyFireTimer -= uiDiff;
361 
362  if (uiHolySmiteTimer <= uiDiff)
363  {
364  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 250, true))
365  {
366  if (target && target->IsAlive())
367  DoCast(target, SPELL_SMITE);
368  }
369  if (me->HasAura(SPELL_SHIELD))
370  uiHolySmiteTimer = 9000;
371  else
372  uiHolySmiteTimer = urand(5000, 7000);
373  } else uiHolySmiteTimer -= uiDiff;
374 
375  if (me->HasAura(SPELL_SHIELD))
376  {
377  if (uiRenewTimer <= uiDiff)
378  {
380  uint8 uiTarget = urand(0, 1);
381  switch (uiTarget)
382  {
383  case 0:
385  break;
386  case 1:
388  if (pMemory->IsAlive())
389  DoCast(pMemory, SPELL_RENEW);
390  break;
391  }
392  uiRenewTimer = urand(15000, 17000);
393  } else uiRenewTimer -= uiDiff;
394  }
395 
396  if (!bHealth && !HealthAbovePct(25))
397  {
399  DoCastAOE(SPELL_HOLY_NOVA, false);
402  DoCastAOE(SPELL_CONFESS, false);
403 
404  bHealth = true;
405  }
406 
408  }
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4240
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_argent_challenge.cpp:74
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: boss_argent_challenge.cpp:73
uint32 uiResetTimer
Definition: boss_argent_challenge.cpp:298
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
Definition: Creature.h:467
Definition: boss_argent_challenge.cpp:65
bool bHealth
Definition: boss_argent_challenge.cpp:292
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Definition: UnitAI.h:35
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
uint32 uiHolyFireTimer
Definition: boss_argent_challenge.cpp:295
Definition: boss_argent_challenge.cpp:71
Definition: boss_argent_challenge.cpp:72
Definition: boss_argent_challenge.cpp:67
uint32 uiRenewTimer
Definition: boss_argent_challenge.cpp:297
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
uint8_t uint8
Definition: Define.h:152
bool bDone
Definition: boss_argent_challenge.cpp:293
Definition: Unit.h:1305
Definition: boss_argent_challenge.cpp:69
uint32 uiHolySmiteTimer
Definition: boss_argent_challenge.cpp:296
ObjectGuid MemoryGUID
Definition: boss_argent_challenge.cpp:290

+ Here is the call graph for this function:

Member Data Documentation

bool boss_paletress::boss_paletressAI::bDone
bool boss_paletress::boss_paletressAI::bHealth
InstanceScript* boss_paletress::boss_paletressAI::instance
ObjectGuid boss_paletress::boss_paletressAI::MemoryGUID
uint32 boss_paletress::boss_paletressAI::uiHolyFireTimer
uint32 boss_paletress::boss_paletressAI::uiHolySmiteTimer
uint32 boss_paletress::boss_paletressAI::uiRenewTimer
uint32 boss_paletress::boss_paletressAI::uiResetTimer

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