AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_thorim_start_npcs Struct Reference
Inheritance diagram for boss_thorim_start_npcs:
ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_thorim_start_npcs (Creature *pCreature)
 
void Reset () override
 
void DamageTaken (Unit *who, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustDied (Unit *) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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 MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
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 IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, 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)
 
virtual bool CheckEvadeIfOutOfCombatArea () 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
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- 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 const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
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 sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

EventMap events
 
bool _isCaster
 
bool _playerAttack
 
- Public Attributes inherited from ScriptedAI
Creatureme
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  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 ()
 
- 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)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_thorim_start_npcs()

boss_thorim_start_npcs::boss_thorim_start_npcs ( Creature pCreature)
inline
1004: ScriptedAI(pCreature) { }
Definition ScriptedCreature.h:191

Member Function Documentation

◆ DamageTaken()

void boss_thorim_start_npcs::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from UnitAI.

1021 {
1022 if (!_playerAttack && who && (who->IsPlayer() || who->GetOwnerGUID().IsPlayer()))
1023 {
1024 if (me->GetInstanceScript())
1026 {
1027 if (!thorim->IsInCombat())
1028 {
1029 thorim->SetInCombatWithZone();
1030 thorim->AI()->AttackStart(who);
1031 }
1032 }
1033 _playerAttack = true;
1035 me->CallForHelp(40.0f);
1036 AttackStart(who);
1037 }
1038
1039 if (!_playerAttack && me->HealthBelowPct(60))
1041 }
Definition Creature.h:47
void CallForHelp(float fRadius, Unit *target=nullptr)
Definition Creature.cpp:2435
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:115
void ResetAllThreat()
Definition ThreatManager.cpp:559
uint32 GetMaxHealth() const
Definition Unit.h:1109
void SetHealth(uint32 val)
Definition Unit.cpp:12315
bool HealthBelowPct(int32 pct) const
Definition Unit.h:1116
ThreatManager & GetThreatMgr()
Definition Unit.h:951
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
Creature * me
Definition ScriptedCreature.h:281
bool _playerAttack
Definition boss_thorim.cpp:1008
@ BOSS_THORIM
Definition ulduar.h:41

References _playerAttack, ScriptedAI::AttackStart(), BOSS_THORIM, Creature::CallForHelp(), InstanceScript::GetCreature(), WorldObject::GetInstanceScript(), Unit::GetMaxHealth(), Unit::GetOwnerGUID(), Unit::GetThreatMgr(), Unit::HealthBelowPct(), Object::IsPlayer(), ObjectGuid::IsPlayer(), ScriptedAI::me, ThreatManager::ResetAllThreat(), and Unit::SetHealth().

◆ JustDied()

void boss_thorim_start_npcs::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

1044 {
1045 if (me->GetInstanceScript())
1047 thorim->AI()->DoAction(ACTION_START_TRASH_DIED);
1048 }
@ ACTION_START_TRASH_DIED
Definition boss_thorim.cpp:284

References ACTION_START_TRASH_DIED, BOSS_THORIM, InstanceScript::GetCreature(), WorldObject::GetInstanceScript(), and ScriptedAI::me.

◆ JustEngagedWith()

void boss_thorim_start_npcs::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

1051 {
1053 {
1054 events.ScheduleEvent(EVENT_DR_ACOLYTE_GH, 10s);
1055 events.ScheduleEvent(EVENT_DR_ACOLYTE_HS, 5s);
1056 events.ScheduleEvent(EVENT_DR_ACOLYTE_R, 7s);
1057 }
1059 {
1060 events.ScheduleEvent(EVENT_CM_SOLDIER_BS, 9s);
1061 events.ScheduleEvent(EVENT_CM_SOLDIER_WC, 5s);
1062 events.ScheduleEvent(EVENT_CM_SOLDIER_S, 0ms);
1063 }
1065 {
1066 events.ScheduleEvent(EVENT_CM_CAPTAIN_D, 9s);
1067 events.ScheduleEvent(EVENT_CM_CAPTAIN_HC, 5s);
1068 }
1069 else if (me->GetEntry() == NPC_JORMUNGAR_BEHEMOT)
1070 {
1071 events.ScheduleEvent(EVENT_JB_ACID_BREATH, 12s);
1072 events.ScheduleEvent(EVENT_JB_SWEEP, 5s);
1073 }
1074
1075 me->CallForHelp(10);
1076 }
events
Definition boss_sartura.cpp:43
@ EVENT_DR_ACOLYTE_GH
Definition boss_thorim.cpp:178
@ EVENT_CM_SOLDIER_BS
Definition boss_thorim.cpp:182
@ EVENT_CM_SOLDIER_WC
Definition boss_thorim.cpp:184
@ EVENT_DR_ACOLYTE_HS
Definition boss_thorim.cpp:179
@ EVENT_DR_ACOLYTE_R
Definition boss_thorim.cpp:180
@ EVENT_CM_CAPTAIN_HC
Definition boss_thorim.cpp:187
@ EVENT_JB_SWEEP
Definition boss_thorim.cpp:190
@ EVENT_CM_CAPTAIN_D
Definition boss_thorim.cpp:186
@ EVENT_CM_SOLDIER_S
Definition boss_thorim.cpp:183
@ EVENT_JB_ACID_BREATH
Definition boss_thorim.cpp:189
@ NPC_DARK_RUNE_ACOLYTE_I
Definition boss_thorim.cpp:127
@ NPC_CAPTURED_MERCENARY_CAPTAIN_HORDE
Definition boss_thorim.cpp:131
@ NPC_JORMUNGAR_BEHEMOT
Definition boss_thorim.cpp:132
@ NPC_CAPTURED_MERCENARY_SOLDIER_HORDE
Definition boss_thorim.cpp:129
@ NPC_CAPTURED_MERCENARY_CAPTAIN_ALLY
Definition boss_thorim.cpp:130
@ NPC_CAPTURED_MERCENARY_SOLDIER_ALLY
Definition boss_thorim.cpp:128
uint32 GetEntry() const
Definition Object.h:117

References Creature::CallForHelp(), EVENT_CM_CAPTAIN_D, EVENT_CM_CAPTAIN_HC, EVENT_CM_SOLDIER_BS, EVENT_CM_SOLDIER_S, EVENT_CM_SOLDIER_WC, EVENT_DR_ACOLYTE_GH, EVENT_DR_ACOLYTE_HS, EVENT_DR_ACOLYTE_R, EVENT_JB_ACID_BREATH, EVENT_JB_SWEEP, Object::GetEntry(), ScriptedAI::me, NPC_CAPTURED_MERCENARY_CAPTAIN_ALLY, NPC_CAPTURED_MERCENARY_CAPTAIN_HORDE, NPC_CAPTURED_MERCENARY_SOLDIER_ALLY, NPC_CAPTURED_MERCENARY_SOLDIER_HORDE, NPC_DARK_RUNE_ACOLYTE_I, and NPC_JORMUNGAR_BEHEMOT.

◆ Reset()

void boss_thorim_start_npcs::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1011 {
1012 events.Reset();
1014 _playerAttack = false;
1017 AttackStart(cr);
1018 }
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2499
bool _isCaster
Definition boss_thorim.cpp:1007

References _isCaster, _playerAttack, ScriptedAI::AttackStart(), WorldObject::FindNearestCreature(), Object::GetEntry(), ScriptedAI::me, NPC_DARK_RUNE_ACOLYTE_I, and NPC_JORMUNGAR_BEHEMOT.

◆ UpdateAI()

void boss_thorim_start_npcs::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Implements UnitAI.

1079 {
1080 if (!UpdateVictim())
1081 return;
1082
1083 events.Update(diff);
1085 return;
1086
1087 switch (events.ExecuteEvent())
1088 {
1090 if (HealthBelowPct(60))
1092 else if (Unit* target = DoSelectLowestHpFriendly(60.0f, 20))
1093 me->CastSpell(target, SPELL_GREATER_HEAL, false);
1094 events.Repeat(10s);
1095 break;
1098 me->CastSpell(target, SPELL_HOLY_SMITE, false);
1099 events.Repeat(1600ms);
1100 break;
1101 case EVENT_DR_ACOLYTE_R:
1102 if (HealthBelowPct(75) && !me->HasAura(sSpellMgr->GetSpellIdForDifficulty(SPELL_RENEW, me)))
1104 else if (Unit* target = DoSelectLowestHpFriendly(60.0f, 10))
1105 me->CastSpell(target, SPELL_RENEW, false);
1106 events.Repeat(7s);
1107 break;
1110 events.Repeat(9s);
1111 break;
1114 events.Repeat(5s);
1115 break;
1116 case EVENT_CM_SOLDIER_S:
1117 if (me->GetDistance(me->GetVictim()) > 8)
1118 me->CastSpell(me->GetVictim(), SPELL_SHOOT, false);
1119
1120 events.Repeat(1500ms);
1121 break;
1122 case EVENT_CM_CAPTAIN_D:
1124 events.Repeat(9s);
1125 break;
1128 events.Repeat(5s);
1129 break;
1132 events.Repeat(12s);
1133 break;
1134 case EVENT_JB_SWEEP:
1135 me->CastSpell(me->GetVictim(), SPELL_SWEEP, false);
1136 events.Repeat(5s);
1137 break;
1138 }
1139
1140 if (!_isCaster || (me->GetPower(POWER_MANA) * 100 / me->GetMaxPower(POWER_MANA) < 10))
1142 }
@ POWER_MANA
Definition SharedDefines.h:257
#define sSpellMgr
Definition SpellMgr.h:836
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ SPELL_WING_CLIP
Definition boss_thorim.cpp:67
@ SPELL_GREATER_HEAL
Definition boss_thorim.cpp:61
@ SPELL_SHOOT
Definition boss_thorim.cpp:68
@ SPELL_SWEEP
Definition boss_thorim.cpp:76
@ SPELL_BARBED_SHOT
Definition boss_thorim.cpp:66
@ SPELL_HOLY_SMITE
Definition boss_thorim.cpp:62
@ SPELL_HEROIC_STRIKE
Definition boss_thorim.cpp:72
@ SPELL_RENEW
Definition boss_thorim.cpp:63
@ SPELL_DEVASTATE
Definition boss_thorim.cpp:71
@ SPELL_ACID_BREATH
Definition boss_thorim.cpp:75
bool UpdateVictim()
Definition CreatureAI.cpp:353
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:40
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:111
Definition Unit.h:664
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5982
uint32 GetMaxPower(Powers power) const
Definition Unit.h:1136
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1350
Unit * GetVictim() const
Definition Unit.h:903
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
uint32 GetPower(Powers power) const
Definition Unit.h:1135
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1295
Unit * DoSelectLowestHpFriendly(float range, uint32 minHPDiff=1)
Definition ScriptedCreature.cpp:517
bool HealthBelowPct(uint32 pct) const
Definition ScriptedCreature.h:368

References _isCaster, Unit::CastSpell(), UnitAI::DoMeleeAttackIfReady(), ScriptedAI::DoSelectLowestHpFriendly(), EVENT_CM_CAPTAIN_D, EVENT_CM_CAPTAIN_HC, EVENT_CM_SOLDIER_BS, EVENT_CM_SOLDIER_S, EVENT_CM_SOLDIER_WC, EVENT_DR_ACOLYTE_GH, EVENT_DR_ACOLYTE_HS, EVENT_DR_ACOLYTE_R, EVENT_JB_ACID_BREATH, EVENT_JB_SWEEP, WorldObject::GetDistance(), Unit::GetMaxPower(), Unit::GetPower(), Unit::GetVictim(), Unit::HasAura(), Unit::HasUnitState(), ScriptedAI::HealthBelowPct(), ScriptedAI::me, POWER_MANA, Random, UnitAI::SelectTarget(), SPELL_ACID_BREATH, SPELL_BARBED_SHOT, SPELL_DEVASTATE, SPELL_GREATER_HEAL, SPELL_HEROIC_STRIKE, SPELL_HOLY_SMITE, SPELL_RENEW, SPELL_SHOOT, SPELL_SWEEP, SPELL_WING_CLIP, sSpellMgr, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _isCaster

bool boss_thorim_start_npcs::_isCaster

Referenced by Reset(), and UpdateAI().

◆ _playerAttack

bool boss_thorim_start_npcs::_playerAttack

Referenced by DamageTaken(), and Reset().

◆ events

EventMap boss_thorim_start_npcs::events

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