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

Public Member Functions

 boss_faction_championsAI (Creature *creature, uint32 aitype)
 
void Reset () override
 
void JustReachedHome () override
 
float CalculateThreat (float distance, float armor, uint32 health)
 
void UpdateThreat ()
 
void UpdatePower ()
 
void RemoveCC ()
 
void JustDied (Unit *) override
 
void EnterCombat (Unit *) override
 
void KilledUnit (Unit *who) override
 
CreatureSelectRandomFriendlyMissingBuff (uint32 spell)
 
UnitSelectEnemyCaster (bool)
 
uint32 EnemiesInRange (float distance)
 
void AttackStart (Unit *who) 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 ()
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
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
 
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 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)
 

Private Attributes

uint32 _aiType
 
EventMap _events
 

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 BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _EnterCombat ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade ()
 
void TeleportCheaters ()
 
- 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 BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_faction_championsAI::boss_faction_championsAI ( Creature creature,
uint32  aitype 
)
inline
554  : BossAI(creature, BOSS_CRUSADERS)
555  {
556  _aiType = aitype;
557  }
Definition: trial_of_the_crusader.h:14
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444
uint32 _aiType
Definition: boss_faction_champions.cpp:741

Member Function Documentation

void boss_faction_championsAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

691  {
692  if (!who)
693  return;
694 
695  if (me->Attack(who, true))
696  {
697  me->AddThreat(who, 10.0f);
698  me->SetInCombatWith(who);
699  who->SetInCombatWith(me);
700 
701  if (_aiType == AI_MELEE || _aiType == AI_PET)
702  DoStartMovement(who);
703  else
704  DoStartMovement(who, 20.0f);
705  SetCombatMovement(true);
706  }
707  }
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
bool Attack(Unit *victim, bool meleeAttack)
Definition: Unit.cpp:7222
Definition: boss_faction_champions.cpp:37
Definition: boss_faction_champions.cpp:34
Creature *const me
Definition: CreatureAI.h:71
void SetCombatMovement(bool allowMovement)
Definition: ScriptedCreature.cpp:382
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:134
uint32 _aiType
Definition: boss_faction_champions.cpp:741
void SetInCombatWith(Unit *enemy)
Definition: Unit.cpp:9840

+ Here is the call graph for this function:

float boss_faction_championsAI::CalculateThreat ( float  distance,
float  armor,
uint32  health 
)
inline
574  {
575  float dist_mod = (_aiType == AI_MELEE || _aiType == AI_PET) ? 15.0f / (15.0f + distance) : 1.0f;
576  float armor_mod = (_aiType == AI_MELEE || _aiType == AI_PET) ? armor / 16635.0f : 0.0f;
577  float eh = (health + 1) * (1.0f + armor_mod);
578  return dist_mod * 30000.0f / eh;
579  }
Definition: boss_faction_champions.cpp:37
Definition: boss_faction_champions.cpp:34
double distance(double x, double y)
Definition: g3dmath.h:731
uint32 _aiType
Definition: boss_faction_champions.cpp:741

+ Here is the caller graph for this function:

uint32 boss_faction_championsAI::EnemiesInRange ( float  distance)
inline
677  {
678  std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
679  std::list<HostileReference*>::const_iterator iter;
680  uint32 count = 0;
681  for (iter = tList.begin(); iter != tList.end(); ++iter)
682  {
683  Unit* target = ObjectAccessor::GetUnit(*me, (*iter)->getUnitGuid());
684  if (target && me->GetDistance2d(target) < distance)
685  ++count;
686  }
687  return count;
688  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
ThreatContainer::StorageType const & getThreatList() const
Definition: ThreatManager.h:263
double distance(double x, double y)
Definition: g3dmath.h:731
Creature *const me
Definition: CreatureAI.h:71
uint32_t uint32
Definition: Define.h:150
float GetDistance2d(WorldObject const *obj) const
Definition: Object.cpp:1612
ThreatManager & getThreatManager()
Definition: Unit.h:1998
Definition: Unit.h:1305

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_faction_championsAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

Reimplemented in npc_toc_retro_paladin::npc_toc_retro_paladinAI, npc_toc_hunter::npc_toc_hunterAI, and npc_toc_warlock::npc_toc_warlockAI.

623  {
624  DoCast(me, SPELL_ANTI_AOE, true);
625  _EnterCombat();
627  pChampionController->AI()->SetData(2, IN_PROGRESS);
628  }
void _EnterCombat()
Definition: ScriptedCreature.cpp:480
Definition: trial_of_the_crusader.h:200
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: InstanceScript.h:59
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_faction_champions.cpp:43
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_faction_championsAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

Reimplemented in npc_toc_enh_shaman::npc_toc_enh_shamanAI.

616  {
617  if (_aiType != AI_PET)
619  pChampionController->AI()->SetData(2, DONE);
620  }
Definition: boss_faction_champions.cpp:37
Definition: trial_of_the_crusader.h:200
Definition: inflate.h:49
Definition: Creature.h:467
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
uint32 _aiType
Definition: boss_faction_champions.cpp:741
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_faction_championsAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

567  {
569  pChampionController->AI()->SetData(2, FAIL);
571  }
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
Definition: trial_of_the_crusader.h:200
Definition: Creature.h:467
Definition: InstanceScript.h:60
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_faction_championsAI::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

631  {
632  if (who->GetTypeId() == TYPEID_PLAYER)
633  {
634  Map::PlayerList const &players = me->GetMap()->GetPlayers();
635  uint32 TeamInInstance = 0;
636 
637  if (!players.isEmpty())
638  if (Player* player = players.begin()->GetSource())
639  TeamInInstance = player->GetTeam();
640 
641  if (TeamInInstance == ALLIANCE)
642  {
644  temp->AI()->Talk(SAY_KILL_PLAYER);
645  }
646  else
648  temp->AI()->Talk(SAY_KILL_PLAYER);
649 
650  }
651  }
Definition: trial_of_the_crusader.h:184
Definition: boss_faction_champions.cpp:29
Map * GetMap() const
Definition: Object.h:543
Definition: trial_of_the_crusader.h:185
Definition: Creature.h:467
iterator begin()
Definition: MapRefManager.h:37
Definition: SharedDefines.h:1000
Creature *const me
Definition: CreatureAI.h:71
TypeID GetTypeId() const
Definition: Object.h:113
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
uint32_t uint32
Definition: Define.h:150
bool isEmpty() const
Definition: LinkedList.h:102
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
PlayerList const & GetPlayers() const
Definition: Map.h:433
Definition: MapRefManager.h:26
Definition: ObjectGuid.h:33
FROM * GetSource() const
Definition: Reference.h:96
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

void boss_faction_championsAI::RemoveCC ( )
inline
606  {
612  //DoCast(me, SPELL_PVP_TRINKET);
613  }
Definition: SpellAuraDefines.h:72
Definition: SpellAuraDefines.h:67
Definition: SpellAuraDefines.h:86
Creature *const me
Definition: CreatureAI.h:71
Definition: SpellAuraDefines.h:85
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check)
Definition: Unit.cpp:3567
Definition: SpellAuraDefines.h:65

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_faction_championsAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

Reimplemented in npc_toc_pet_hunter::npc_toc_pet_hunterAI, npc_toc_pet_warlock::npc_toc_pet_warlockAI, npc_toc_retro_paladin::npc_toc_retro_paladinAI, npc_toc_enh_shaman::npc_toc_enh_shamanAI, npc_toc_rogue::npc_toc_rogueAI, npc_toc_dk::npc_toc_dkAI, npc_toc_warrior::npc_toc_warriorAI, npc_toc_boomkin::npc_toc_boomkinAI, npc_toc_hunter::npc_toc_hunterAI, npc_toc_mage::npc_toc_mageAI, npc_toc_warlock::npc_toc_warlockAI, npc_toc_shadow_priest::npc_toc_shadow_priestAI, npc_toc_priest::npc_toc_priestAI, npc_toc_paladin::npc_toc_paladinAI, npc_toc_shaman::npc_toc_shamanAI, and npc_toc_druid::npc_toc_druidAI.

560  {
562  if (IsHeroic() && (_aiType != AI_PET))
564  }
Definition: boss_faction_champions.cpp:37
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: boss_faction_champions.cpp:199
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
EventMap _events
Definition: boss_faction_champions.cpp:743
Definition: boss_faction_champions.cpp:200
Definition: Common.h:103
uint32 _aiType
Definition: boss_faction_champions.cpp:741

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Unit* boss_faction_championsAI::SelectEnemyCaster ( bool  )
inline
664  {
665  std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
666  std::list<HostileReference*>::const_iterator iter;
667  for (iter = tList.begin(); iter!=tList.end(); ++iter)
668  {
669  Unit* target = ObjectAccessor::GetUnit(*me, (*iter)->getUnitGuid());
670  if (target && target->getPowerType() == POWER_MANA)
671  return target;
672  }
673  return NULL;
674  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
arena_t NULL
Definition: jemalloc_internal.h:624
ThreatContainer::StorageType const & getThreatList() const
Definition: ThreatManager.h:263
Creature *const me
Definition: CreatureAI.h:71
Powers getPowerType() const
Definition: Unit.h:1444
ThreatManager & getThreatManager()
Definition: Unit.h:1998
Definition: Unit.h:1305
Definition: SharedDefines.h:248

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Creature* boss_faction_championsAI::SelectRandomFriendlyMissingBuff ( uint32  spell)
inline
654  {
655  std::list<Creature*> lst = DoFindFriendlyMissingBuff(40.0f, spell);
656  std::list<Creature*>::const_iterator itr = lst.begin();
657  if (lst.empty())
658  return NULL;
659  advance(itr, rand32() % lst.size());
660  return (*itr);
661  }
arena_t NULL
Definition: jemalloc_internal.h:624
std::list< Creature * > DoFindFriendlyMissingBuff(float range, uint32 spellId)
Definition: ScriptedCreature.cpp:337
void advance(octet_iterator &it, distance_type n, octet_iterator end)
Definition: checked.h:190
uint32 rand32()
Definition: Random.cpp:64

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_faction_championsAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

Reimplemented in npc_toc_pet_hunter::npc_toc_pet_hunterAI, npc_toc_pet_warlock::npc_toc_pet_warlockAI, npc_toc_retro_paladin::npc_toc_retro_paladinAI, npc_toc_enh_shaman::npc_toc_enh_shamanAI, npc_toc_rogue::npc_toc_rogueAI, npc_toc_dk::npc_toc_dkAI, npc_toc_warrior::npc_toc_warriorAI, npc_toc_boomkin::npc_toc_boomkinAI, npc_toc_hunter::npc_toc_hunterAI, npc_toc_mage::npc_toc_mageAI, npc_toc_warlock::npc_toc_warlockAI, npc_toc_shadow_priest::npc_toc_shadow_priestAI, npc_toc_priest::npc_toc_priestAI, npc_toc_paladin::npc_toc_paladinAI, npc_toc_shaman::npc_toc_shamanAI, and npc_toc_druid::npc_toc_druidAI.

710  {
711  _events.Update(diff);
712 
713  while (uint32 eventId = _events.ExecuteEvent())
714  {
715  switch (eventId)
716  {
717  case EVENT_THREAT:
718  UpdatePower();
719  UpdateThreat();
721  return;
722  case EVENT_REMOVE_CC:
724  {
725  RemoveCC();
727  }
728  else
730  return;
731  default:
732  return;
733  }
734  }
735 
736  if (_aiType == AI_MELEE || _aiType == AI_PET)
738  }
Definition: boss_faction_champions.cpp:37
void UpdateThreat()
Definition: boss_faction_champions.cpp:581
void UpdatePower()
Definition: boss_faction_champions.cpp:599
Definition: boss_faction_champions.cpp:34
Definition: Common.h:97
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_faction_champions.cpp:199
uint32_t uint32
Definition: Define.h:150
bool HasBreakableByDamageCrowdControlAura(Unit *excludeCasterChannel=NULL) const
Definition: Unit.cpp:590
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void Update(uint32 time)
Definition: EventMap.h:54
void RescheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:146
EventMap _events
Definition: boss_faction_champions.cpp:743
Definition: boss_faction_champions.cpp:200
Definition: Common.h:103
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void RemoveCC()
Definition: boss_faction_champions.cpp:605
uint32 _aiType
Definition: boss_faction_champions.cpp:741

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_faction_championsAI::UpdatePower ( )
inline
600  {
601  if (me->getPowerType() == POWER_MANA)
603  }
int32 ModifyPower(Powers power, int32 val)
Definition: Unit.cpp:10285
Creature *const me
Definition: CreatureAI.h:71
Powers getPowerType() const
Definition: Unit.h:1444
int32 GetMaxPower(Powers power) const
Definition: Unit.cpp:11598
Definition: SharedDefines.h:248

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_faction_championsAI::UpdateThreat ( )
inline
582  {
583  std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
584  for (std::list<HostileReference*>::const_iterator itr = tList.begin(); itr != tList.end(); ++itr)
585  {
586  Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
587  if (unit && me->getThreatManager().getThreat(unit))
588  {
589  if (unit->GetTypeId() == TYPEID_PLAYER)
590  {
591  float threat = CalculateThreat(me->GetDistance2d(unit), (float)unit->GetArmor(), unit->GetHealth());
592  me->getThreatManager().modifyThreatPercent(unit, -100);
593  me->AddThreat(unit, 1000000.0f * threat);
594  }
595  }
596  }
597  }
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
void modifyThreatPercent(Unit *victim, int32 percent)
Definition: ThreatManager.cpp:452
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
ThreatContainer::StorageType const & getThreatList() const
Definition: ThreatManager.h:263
Creature *const me
Definition: CreatureAI.h:71
TypeID GetTypeId() const
Definition: Object.h:113
uint32 GetArmor() const
Definition: Unit.h:1419
float getThreat(Unit *victim, bool alsoSearchOfflineList=false)
Definition: ThreatManager.cpp:469
Definition: ObjectGuid.h:33
float GetDistance2d(WorldObject const *obj) const
Definition: Object.cpp:1612
ThreatManager & getThreatManager()
Definition: Unit.h:1998
uint32 GetHealth() const
Definition: Unit.h:1426
Definition: Unit.h:1305
float CalculateThreat(float distance, float armor, uint32 health)
Definition: boss_faction_champions.cpp:573

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32 boss_faction_championsAI::_aiType
private
EventMap boss_faction_championsAI::_events
private

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