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

Public Member Functions

 boss_mr_smiteAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void EnterCombat (Unit *) override
 
bool bCheckChances ()
 
void UpdateAI (uint32 uiDiff) override
 
void MovementInform (uint32 uiType, uint32) override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &) override
 
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 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 ()
 
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

InstanceScriptinstance
 
uint32 uiTrashTimer
 
uint32 uiSlamTimer
 
uint32 uiNimbleReflexesTimer
 
uint8 uiHealth
 
uint32 uiPhase
 
uint32 uiTimer
 
- 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_mr_smite::boss_mr_smiteAI::boss_mr_smiteAI ( Creature creature)
inline
53  : ScriptedAI(creature)
54  {
55  Initialize();
56  instance = creature->GetInstanceScript();
57  }
ScriptedAI(Creature *creature)
Definition: ScriptedCreature.cpp:100
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
InstanceScript * instance
Definition: boss_mr_smite.cpp:71
void Initialize()
Definition: boss_mr_smite.cpp:59

+ Here is the call graph for this function:

Member Function Documentation

bool boss_mr_smite::boss_mr_smiteAI::bCheckChances ( )
inline
95  {
96  uint32 uiChances = urand(0, 99);
97  if (uiChances <= 15)
98  return false;
99  else
100  return true;
101  }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32_t uint32
Definition: Define.h:150

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_mr_smite::boss_mr_smiteAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

90  {
91  Talk(SAY_AGGRO);
92  }
Definition: boss_mr_smite.cpp:38
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42

+ Here is the call graph for this function:

void boss_mr_smite::boss_mr_smiteAI::Initialize ( void  )
inline
60  {
61  uiTrashTimer = urand(5000, 9000);
62  uiSlamTimer = 9000;
63  uiNimbleReflexesTimer = urand(15500, 31600);
64 
65  uiHealth = 0;
66 
67  uiPhase = 0;
68  uiTimer = 0;
69  }
uint32 uiTrashTimer
Definition: boss_mr_smite.cpp:73
uint32 uiTimer
Definition: boss_mr_smite.cpp:80
uint32 uiSlamTimer
Definition: boss_mr_smite.cpp:74
uint8 uiHealth
Definition: boss_mr_smite.cpp:77
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32 uiNimbleReflexesTimer
Definition: boss_mr_smite.cpp:75
uint32 uiPhase
Definition: boss_mr_smite.cpp:79

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_mr_smite::boss_mr_smiteAI::MovementInform ( uint32  uiType,
uint32   
)
inlineoverridevirtual

Reimplemented from CreatureAI.

175  {
176  if (uiType != POINT_MOTION_TYPE)
177  return;
178 
179  uiTimer = 1500;
180  uiPhase = 1;
181  }
uint32 uiTimer
Definition: boss_mr_smite.cpp:80
uint32 uiPhase
Definition: boss_mr_smite.cpp:79
Definition: MotionMaster.h:46
void boss_mr_smite::boss_mr_smiteAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

83  {
84  Initialize();
85 
87  }
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
Definition: ScriptedCreature.cpp:364
Definition: boss_mr_smite.cpp:35
void Initialize()
Definition: boss_mr_smite.cpp:59
Definition: CreatureAI.h:63
Definition: CreatureAI.h:64

+ Here is the call graph for this function:

void boss_mr_smite::boss_mr_smiteAI::UpdateAI ( uint32  uiDiff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

104  {
105  if (!UpdateVictim())
106  return;
107 
108  /*START ACID-AI*/
109  if (uiTrashTimer <= uiDiff)
110  {
111  if (bCheckChances())
113  uiTrashTimer = urand(6000, 15500);
114  } else uiTrashTimer -= uiDiff;
115 
116  if (uiSlamTimer <= uiDiff)
117  {
118  if (bCheckChances())
120  uiSlamTimer = 11000;
121  } else uiSlamTimer -= uiDiff;
122 
123  if (uiNimbleReflexesTimer <= uiDiff)
124  {
125  if (bCheckChances())
127  uiNimbleReflexesTimer = urand(27300, 60100);
128  } else uiNimbleReflexesTimer -= uiDiff;
129  /*END ACID-AI*/
130 
131  if ((uiHealth == 0 && !HealthAbovePct(66)) || (uiHealth == 1 && !HealthAbovePct(33)))
132  {
133  ++uiHealth;
135  SetCombatMovement(false);
137  {
138  me->GetMotionMaster()->Clear();
139  me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ());
140  }
141  }
142 
143  if (uiPhase)
144  {
145  if (uiTimer <= uiDiff)
146  {
147  switch (uiPhase)
148  {
149  case 1:
150  me->HandleEmoteCommand(EMOTE_STATE_KNEEL); //dosen't work?
151  uiTimer = 1000;
152  uiPhase = 2;
153  break;
154  case 2:
155  if (uiHealth == 1)
157  else
159  uiTimer = 500;
160  uiPhase = 3;
161  break;
162  case 3:
163  SetCombatMovement(true);
165  uiPhase = 0;
166  break;
167  }
168  } else uiTimer -= uiDiff;
169  }
170 
172  }
Definition: boss_mr_smite.cpp:33
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
uint32 uiTrashTimer
Definition: boss_mr_smite.cpp:73
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
Definition: ScriptedCreature.cpp:364
bool UpdateVictim()
Definition: CreatureAI.cpp:233
void Clear(bool reset=true)
Definition: MotionMaster.h:138
uint32 uiTimer
Definition: boss_mr_smite.cpp:80
Definition: boss_mr_smite.cpp:31
void MoveChase(Unit *target, float dist=0.0f, float angle=0.0f)
Definition: MotionMaster.cpp:241
bool bCheckChances()
Definition: boss_mr_smite.cpp:94
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
Definition: boss_mr_smite.cpp:35
Definition: deadmines.h:40
InstanceScript * instance
Definition: boss_mr_smite.cpp:71
uint32 uiSlamTimer
Definition: boss_mr_smite.cpp:74
Definition: CreatureAI.h:63
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
uint8 uiHealth
Definition: boss_mr_smite.cpp:77
Unit * GetVictim() const
Definition: Unit.h:1379
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_mr_smite.cpp:32
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: GameObject.h:880
void SetCombatMovement(bool allowMovement)
Definition: ScriptedCreature.cpp:382
Definition: SharedDefines.h:2461
uint32 uiNimbleReflexesTimer
Definition: boss_mr_smite.cpp:75
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:143
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1444
uint32 uiPhase
Definition: boss_mr_smite.cpp:79
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
float m_CombatDistance
Definition: Creature.h:704
Definition: boss_mr_smite.cpp:36
Definition: boss_mr_smite.cpp:30
Definition: CreatureAI.h:64

+ Here is the call graph for this function:

Member Data Documentation

InstanceScript* boss_mr_smite::boss_mr_smiteAI::instance
uint8 boss_mr_smite::boss_mr_smiteAI::uiHealth
uint32 boss_mr_smite::boss_mr_smiteAI::uiNimbleReflexesTimer
uint32 boss_mr_smite::boss_mr_smiteAI::uiPhase
uint32 boss_mr_smite::boss_mr_smiteAI::uiSlamTimer
uint32 boss_mr_smite::boss_mr_smiteAI::uiTimer
uint32 boss_mr_smite::boss_mr_smiteAI::uiTrashTimer

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