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

Public Member Functions

 boss_thorimAI (Creature *pCreature)
 
void DisableThorim (bool apply)
 
GameObjectGetThorimObject (uint32 entry)
 
void JustSummoned (Creature *cr) override
 
void SpawnAllNPCs ()
 
void CloseDoors ()
 
void EnterEvadeMode (EvadeReason why) override
 
void Reset () override
 
uint32 GetData (uint32 param) const override
 
void DoAction (int32 param) override
 
void KilledUnit (Unit *victim) override
 
void JustReachedHome () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void DamageTaken (Unit *who, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 
void SpawnArenaNPCs ()
 
void SpellHit (Unit *caster, SpellInfo const *spellInfo) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spellInfo) override
 
PlayerGetArenaPlayer ()
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) 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 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.
 
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 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 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=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
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)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
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 ()
 
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 *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
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 (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)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 
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)
 
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)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always 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)
 
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

bool _isArenaEmpty
 
bool _encounterFinished
 
bool _spawnCommoners
 
bool _hardMode
 
bool _isHitAllowed
 
bool _isAlly
 
uint8 _trashCounter
 
InstanceScriptm_pInstance
 
EventMap events
 
SummonList summons
 
bool _hitByLightning
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 

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
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_thorimAI()

boss_thorim::boss_thorimAI::boss_thorimAI ( Creature pCreature)
inline
339 : ScriptedAI(pCreature), summons(me)
340 {
341 m_pInstance = pCreature->GetInstanceScript();
342 if ((_encounterFinished = (!me->IsAlive())))
343 if (m_pInstance)
345 }
@ DONE
Definition: InstanceScript.h:60
@ TYPE_THORIM
Definition: ulduar.h:45
Definition: ScriptedCreature.h:192
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool IsAlive() const
Definition: Unit.h:1822
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
SummonList summons
Definition: boss_thorim.cpp:357
InstanceScript * m_pInstance
Definition: boss_thorim.cpp:355
bool _encounterFinished
Definition: boss_thorim.cpp:348

References _encounterFinished, DONE, WorldObject::GetInstanceScript(), Unit::IsAlive(), m_pInstance, ScriptedAI::me, ZoneScript::SetData(), and TYPE_THORIM.

Member Function Documentation

◆ CloseDoors()

void boss_thorim::boss_thorimAI::CloseDoors ( )
inline
429 {
430 GameObject* go;
432 {
435 }
438
441
444 }
@ GO_STATE_READY
Definition: GameObjectData.h:691
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ DATA_THORIM_FIRST_DOORS
Definition: ulduar.h:84
@ DATA_THORIM_LEVER
Definition: ulduar.h:82
@ DATA_THORIM_FENCE
Definition: ulduar.h:83
@ DATA_THORIM_SECOND_DOORS
Definition: ulduar.h:85
GameObjectFlags
Definition: SharedDefines.h:1602
Definition: GameObject.h:122
void SetGoState(GOState state)
Definition: GameObject.cpp:2477
void ReplaceAllGameObjectFlags(GameObjectFlags flags)
Definition: GameObject.h:222
GameObject * GetThorimObject(uint32 entry)
Definition: boss_thorim.cpp:378

References DATA_THORIM_FENCE, DATA_THORIM_FIRST_DOORS, DATA_THORIM_LEVER, DATA_THORIM_SECOND_DOORS, GetThorimObject(), GO_STATE_ACTIVE, GO_STATE_READY, GameObject::ReplaceAllGameObjectFlags(), and GameObject::SetGoState().

Referenced by Reset().

◆ DamageTaken()

void boss_thorim::boss_thorimAI::DamageTaken ( Unit who,
uint32 damage,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

529 {
530 if (who && _isHitAllowed && who->GetPositionZ() > 430 && who->GetTypeId() == TYPEID_PLAYER)
531 {
532 _isHitAllowed = false;
533 DisableThorim(false);
534
535 events.SetPhase(EVENT_PHASE_RING);
537 events.ScheduleEvent(EVENT_THORIM_LIGHTNING_CHARGE, 12s + 500ms, 0, EVENT_PHASE_RING);
539 events.ScheduleEvent(EVENT_THORIM_BERSERK, 5min, 0, EVENT_PHASE_RING);
540
544
546
547 // Hard Mode
548 if (!me->HasAura(62565 /*TOUCH OF DOMINION TRIGGER*/))
549 {
550 if (m_pInstance)
552
553 _hardMode = true;
556 }
557
559 if (Player* player = GetArenaPlayer())
560 me->AddThreat(player, 1000.0f);
561 }
562
563 if (damage >= me->GetHealth())
564 {
565 damage = 0;
567 {
568 _encounterFinished = true;
572 me->CombatStop();
574 events.Reset();
575 DisableThorim(true);
576
578
579 events.SetPhase(EVENT_PHASE_OUTRO);
580 events.ScheduleEvent(EVENT_THORIM_OUTRO1, 2s, 0, EVENT_PHASE_OUTRO);
581
582 GameObject* go = nullptr;
585
587 if (_hardMode)
588 chestId += 1; // hard mode offset
589
590 if ((go = me->SummonGameObject(chestId, 2134.73f, -286.32f, 419.51f, 4.65f, 0, 0, 0, 0, 0)))
591 {
593 go->SetLootRecipient(me->GetMap());
594 }
595
596 // Defeat credit
597 if (m_pInstance)
598 {
599 me->CastSpell(me, 64985, true); // credit
601 }
602 }
603 }
604 }
std::uint32_t uint32
Definition: Define.h:108
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
events
Definition: boss_sartura.cpp:43
@ EVENT_THORIM_LIGHTNING_CHARGE
Definition: boss_thorim.cpp:192
@ EVENT_THORIM_OUTRO1
Definition: boss_thorim.cpp:197
@ EVENT_THORIM_UNBALANCING_STRIKE
Definition: boss_thorim.cpp:191
@ EVENT_THORIM_CHAIN_LIGHTNING
Definition: boss_thorim.cpp:193
@ EVENT_THORIM_BERSERK
Definition: boss_thorim.cpp:194
@ ACTION_SIF_JOIN_FIGHT
Definition: boss_thorim.cpp:309
@ EVENT_PHASE_OUTRO
Definition: boss_thorim.cpp:317
@ EVENT_PHASE_RING
Definition: boss_thorim.cpp:316
const Position Middle
Definition: boss_thorim.cpp:323
@ NPC_SIF
Definition: boss_thorim.cpp:180
@ SAY_DEATH
Definition: boss_thorim.cpp:285
@ SAY_JUMPDOWN
Definition: boss_thorim.cpp:281
@ SPELL_SHEATH_OF_LIGHTNING
Definition: boss_thorim.cpp:34
@ GO_THORIM_CHEST
Definition: ulduar.h:181
@ GO_THORIM_CHEST_HERO
Definition: ulduar.h:182
Talk
Definition: boss_fathomlord_karathress.cpp:25
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
Definition: DBCEnums.h:150
@ FACTION_FRIENDLY
Definition: SharedDefines.h:201
void DoAction(int32 info, uint16 max=0)
Definition: ScriptedCreature.h:104
Definition: ScriptedCreature.h:169
void DoResetThreatList()
Definition: ScriptedCreature.cpp:438
void SetLootRecipient(Creature *creature)
Definition: GameObject.cpp:2701
TypeID GetTypeId() const
Definition: Object.h:121
Map * GetMap() const
Definition: Object.h:517
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2357
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Player.h:1056
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:10440
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4722
void SetFaction(uint32 faction)
Definition: Unit.cpp:10064
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14639
MotionMaster * GetMotionMaster()
Definition: Unit.h:2276
uint32 GetMaxHealth() const
Definition: Unit.h:1455
void SetHealth(uint32 val)
Definition: Unit.cpp:15464
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5636
uint32 GetHealth() const
Definition: Unit.h:1454
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:1169
Unit * GetVictim() const
Definition: Unit.h:1398
void RemoveAllAuras()
Definition: Unit.cpp:5259
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1495
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition: InstanceScript.cpp:611
bool Is25ManRaid() const
Definition: Map.h:453
void MoveChase(Unit *target, std::optional< ChaseRange > dist={}, std::optional< ChaseAngle > angle={})
Definition: MotionMaster.cpp:300
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=0)
Definition: MotionMaster.h:227
void DisableThorim(bool apply)
Definition: boss_thorim.cpp:361
bool _hardMode
Definition: boss_thorim.cpp:350
bool _isHitAllowed
Definition: boss_thorim.cpp:351
Player * GetArenaPlayer()
Definition: boss_thorim.cpp:641

References _encounterFinished, _hardMode, _isHitAllowed, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACTION_SIF_JOIN_FIGHT, Unit::AddThreat(), Unit::CastSpell(), Unit::CombatStop(), DATA_THORIM_FENCE, DisableThorim(), SummonList::DoAction(), DONE, ScriptedAI::DoResetThreatList(), InstanceScript::DoUpdateAchievementCriteria(), EVENT_PHASE_OUTRO, EVENT_PHASE_RING, EVENT_THORIM_BERSERK, EVENT_THORIM_CHAIN_LIGHTNING, EVENT_THORIM_LIGHTNING_CHARGE, EVENT_THORIM_OUTRO1, EVENT_THORIM_UNBALANCING_STRIKE, FACTION_FRIENDLY, GetArenaPlayer(), Unit::GetHealth(), WorldObject::GetMap(), Unit::GetMaxHealth(), Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GetThorimObject(), Object::GetTypeId(), Unit::GetVictim(), GO_STATE_ACTIVE, GO_THORIM_CHEST, GO_THORIM_CHEST_HERO, Unit::HasAura(), Map::Is25ManRaid(), m_pInstance, ScriptedAI::me, Middle, MotionMaster::MoveChase(), MotionMaster::MoveJump(), NPC_SIF, Unit::RemoveAllAuras(), Unit::RemoveAura(), GameObject::ReplaceAllGameObjectFlags(), SAY_DEATH, SAY_JUMPDOWN, ZoneScript::SetData(), Unit::SetFaction(), GameObject::SetGoState(), Unit::SetHealth(), GameObject::SetLootRecipient(), Unit::SetUnitFlag(), SPELL_SHEATH_OF_LIGHTNING, WorldObject::SummonGameObject(), summons, TYPE_THORIM, TYPEID_PLAYER, and UNIT_FLAG_NON_ATTACKABLE.

◆ DisableThorim()

void boss_thorim::boss_thorimAI::DisableThorim ( bool  apply)
inline
362 {
363 if (apply)
364 {
366 me->DisableRotate(true);
368 }
369 else
370 {
372 me->DisableRotate(false);
375 }
376 }
@ BASE_ATTACK
Definition: Unit.h:396
@ UNIT_STATE_ROOT
Definition: Unit.h:335
@ UNIT_FLAG_PACIFIED
Definition: Unit.h:465
@ UNIT_FLAG_DISABLE_MOVE
Definition: Unit.h:450
void ClearUnitState(uint32 f)
Definition: Unit.h:1411
void AddUnitState(uint32 f)
Definition: Unit.h:1409
void DisableRotate(bool apply)
Definition: Unit.cpp:18529
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition: Unit.cpp:661
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1496

References Unit::AddUnitState(), BASE_ATTACK, Unit::ClearUnitState(), Unit::DisableRotate(), ScriptedAI::me, Unit::RemoveUnitFlag(), Unit::resetAttackTimer(), Unit::SetUnitFlag(), UNIT_FLAG_DISABLE_MOVE, UNIT_FLAG_PACIFIED, and UNIT_STATE_ROOT.

Referenced by DamageTaken(), EnterEvadeMode(), JustEngagedWith(), and Reset().

◆ DoAction()

void boss_thorim::boss_thorimAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

490 {
491 if (param == ACTION_START_TRASH_DIED)
492 {
494 // activate levar
495 if (_trashCounter >= 6)
496 {
498 go->RemoveGameObjectFlag((GameObjectFlags)48);
499
500 events.ScheduleEvent(EVENT_THORIM_AGGRO, 0ms);
501 events.SetPhase(EVENT_PHASE_START);
502 events.ScheduleEvent(EVENT_THORIM_START_PHASE1, 20s);
503 _trashCounter = 0;
504 }
505 }
506 else if (param == ACTION_ALLOW_HIT)
507 _isHitAllowed = true;
508 }
@ EVENT_THORIM_START_PHASE1
Definition: boss_thorim.cpp:185
@ EVENT_THORIM_AGGRO
Definition: boss_thorim.cpp:195
@ ACTION_START_TRASH_DIED
Definition: boss_thorim.cpp:307
@ ACTION_ALLOW_HIT
Definition: boss_thorim.cpp:308
@ EVENT_PHASE_START
Definition: boss_thorim.cpp:315
uint8 _trashCounter
Definition: boss_thorim.cpp:353

References _isHitAllowed, _trashCounter, ACTION_ALLOW_HIT, ACTION_START_TRASH_DIED, DATA_THORIM_LEVER, EVENT_PHASE_START, EVENT_THORIM_AGGRO, EVENT_THORIM_START_PHASE1, and GetThorimObject().

◆ EnterEvadeMode()

void boss_thorim::boss_thorimAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

447 {
448 DisableThorim(false);
450 }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:196

References DisableThorim(), and CreatureAI::EnterEvadeMode().

◆ GetArenaPlayer()

Player * boss_thorim::boss_thorimAI::GetArenaPlayer ( )
inline
642 {
643 Map::PlayerList const& pList = me->GetMap()->GetPlayers();
644 for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
645 if (Player* p = itr->GetSource())
646 if (p->GetPositionX() > 2085 && p->GetPositionX() < 2185 && p->GetPositionY() < -214 && p->GetPositionY() > -305 && p->IsAlive() && p->GetPositionZ() < 425)
647 return p;
648 return nullptr;
649 }
Definition: LinkedList.h:139
PlayerList const & GetPlayers() const
Definition: Map.h:485
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37

References MapRefMgr::begin(), MapRefMgr::end(), WorldObject::GetMap(), Map::GetPlayers(), and ScriptedAI::me.

Referenced by DamageTaken(), and UpdateAI().

◆ GetData()

uint32 boss_thorim::boss_thorimAI::GetData ( uint32  param) const
inlineoverridevirtual

Reimplemented from UnitAI.

480 {
481 if (param == DATA_HIT_BY_LIGHTNING)
482 return !_hitByLightning;
483 if (param == DATA_LOSE_YOUR_ILLUSION)
484 return _hardMode;
485
486 return 0;
487 }
@ DATA_HIT_BY_LIGHTNING
Definition: boss_thorim.cpp:319
@ DATA_LOSE_YOUR_ILLUSION
Definition: boss_thorim.cpp:320
bool _hitByLightning
Definition: boss_thorim.cpp:359

References _hardMode, _hitByLightning, DATA_HIT_BY_LIGHTNING, and DATA_LOSE_YOUR_ILLUSION.

◆ GetThorimObject()

GameObject * boss_thorim::boss_thorimAI::GetThorimObject ( uint32  entry)
inline
379 {
380 if (m_pInstance)
382 return nullptr;
383 }
GameObject * GetGameObject(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:187
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94

References ObjectAccessor::GetGameObject(), InstanceScript::GetGuidData(), m_pInstance, and ScriptedAI::me.

Referenced by CloseDoors(), DamageTaken(), DoAction(), and UpdateAI().

◆ JustEngagedWith()

void boss_thorim::boss_thorimAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

519 {
522 me->setActive(true);
523 DisableThorim(true);
525 //me->CastSpell(me, SPELL_TOUCH_OF_DOMINION, true);
526 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
void setActive(bool isActiveObject)
Definition: Object.cpp:1085

References _encounterFinished, Unit::CastSpell(), DisableThorim(), IN_PROGRESS, m_pInstance, ScriptedAI::me, WorldObject::setActive(), ZoneScript::SetData(), SPELL_SHEATH_OF_LIGHTNING, and TYPE_THORIM.

◆ JustReachedHome()

void boss_thorim::boss_thorimAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

516{ me->setActive(false); }

References ScriptedAI::me, and WorldObject::setActive().

◆ JustSummoned()

void boss_thorim::boss_thorimAI::JustSummoned ( Creature cr)
inlineoverridevirtual

Reimplemented from ScriptedAI.

385{ summons.Summon(cr); }
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90

References SummonList::Summon(), and summons.

◆ KilledUnit()

void boss_thorim::boss_thorimAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

511 {
512 if (victim->GetTypeId() == TYPEID_PLAYER)
513 Talk(SAY_SLAY);
514 }
@ SAY_SLAY
Definition: boss_thorim.cpp:282

References Object::GetTypeId(), SAY_SLAY, and TYPEID_PLAYER.

◆ Reset()

void boss_thorim::boss_thorimAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

453 {
456
457 events.Reset();
458 events.SetPhase(0);
460
461 _trashCounter = 0;
462 _isAlly = true;
463 _isHitAllowed = false;
464 _spawnCommoners = false;
465 _hardMode = false;
466 _isArenaEmpty = false;
467 _hitByLightning = false;
468
469 if (Player* t = SelectTargetFromPlayerList(1000))
470 if (t->GetTeamId() == TEAM_HORDE)
471 _isAlly = false;
472
473 SpawnAllNPCs();
474
475 CloseDoors();
476 DisableThorim(false);
477 }
@ NOT_STARTED
Definition: InstanceScript.h:57
@ TEAM_HORDE
Definition: SharedDefines.h:761
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition: ScriptedCreature.cpp:553
bool _isArenaEmpty
Definition: boss_thorim.cpp:347
void CloseDoors()
Definition: boss_thorim.cpp:428
void SpawnAllNPCs()
Definition: boss_thorim.cpp:387
bool _spawnCommoners
Definition: boss_thorim.cpp:349
bool _isAlly
Definition: boss_thorim.cpp:352

References _encounterFinished, _hardMode, _hitByLightning, _isAlly, _isArenaEmpty, _isHitAllowed, _spawnCommoners, _trashCounter, CloseDoors(), SummonList::DespawnAll(), DisableThorim(), m_pInstance, NOT_STARTED, ScriptedAI::SelectTargetFromPlayerList(), ZoneScript::SetData(), SpawnAllNPCs(), summons, TEAM_HORDE, and TYPE_THORIM.

◆ SpawnAllNPCs()

void boss_thorim::boss_thorimAI::SpawnAllNPCs ( )
inline
388 {
389 // Jormungar Behemoth 32882
390 me->SummonCreature(NPC_JORMUNGAR_BEHEMOT, 2149.68f, -263.477f, 419.679f, 3.12102f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
391
392 // Captured Mercenary Soldier 32885
396
397 // Captured Mercenary Captain 32908
399
400 // Dark Rune Acolyte (arena) 32886
401 me->SummonCreature(NPC_DARK_RUNE_ACOLYTE_I, 2129.09f, -277.142f, 419.756f, 1.22173f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
402
403 // Iron Ring Guard 32874
404 me->SummonCreature(NPC_IRON_RING_GUARD, 2217.69f, -337.394f, 412.177f, 1.23918f);
405 me->SummonCreature(NPC_IRON_RING_GUARD, 2218.38f, -297.505f, 412.176f, 1.02974f);
406 me->SummonCreature(NPC_IRON_RING_GUARD, 2235.26f, -338.345f, 412.134f, 1.58979f);
407 me->SummonCreature(NPC_IRON_RING_GUARD, 2235.07f, -297.985f, 412.134f, 1.61336f);
408
409 // Dark Rune Acolyte (gauntlet) 33110
410 me->SummonCreature(NPC_DARK_RUNE_ACOLYTE_G, 2198.29f, -436.92f, 419.985f, 0.261799f);
411 me->SummonCreature(NPC_DARK_RUNE_ACOLYTE_G, 2227.58f, -308.303f, 412.134f, 1.59372f);
412 me->SummonCreature(NPC_DARK_RUNE_ACOLYTE_G, 2227.47f, -345.375f, 412.134f, 1.56622f);
413
414 // Iron Honor Guard 32875
415 me->SummonCreature(NPC_IRON_HONOR_GUARD, 2198.05f, -428.769f, 419.985f, 6.05629f);
416 me->SummonCreature(NPC_IRON_HONOR_GUARD, 2220.31f, -436.22f, 412.26f, 1.06465f);
417
418 // Runic Colossus 32872
419 me->SummonCreature(NPC_RUNIC_COLOSSUS, 2227.5f, -396.179f, 412.176f, 1.79769f);
420
421 // Ancient Rune Giant 32873
422 me->SummonCreature(NPC_ANCIENT_RUNE_GIANT, 2134.57f, -440.318f, 438.331f, 0.226893f);
423
424 // Sif 33196
425 me->SummonCreature(NPC_SIF, 2147.86f, -301.2f, 438.246f, 2.488f);
426 }
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_DARK_RUNE_ACOLYTE_G
Definition: boss_thorim.cpp:171
@ NPC_IRON_RING_GUARD
Definition: boss_thorim.cpp:168
@ NPC_DARK_RUNE_ACOLYTE_I
Definition: boss_thorim.cpp:154
@ NPC_CAPTURED_MERCENARY_CAPTAIN_HORDE
Definition: boss_thorim.cpp:158
@ NPC_JORMUNGAR_BEHEMOT
Definition: boss_thorim.cpp:159
@ NPC_RUNIC_COLOSSUS
Definition: boss_thorim.cpp:169
@ NPC_CAPTURED_MERCENARY_SOLDIER_HORDE
Definition: boss_thorim.cpp:156
@ NPC_ANCIENT_RUNE_GIANT
Definition: boss_thorim.cpp:170
@ NPC_IRON_HONOR_GUARD
Definition: boss_thorim.cpp:172
@ NPC_CAPTURED_MERCENARY_CAPTAIN_ALLY
Definition: boss_thorim.cpp:157
@ NPC_CAPTURED_MERCENARY_SOLDIER_ALLY
Definition: boss_thorim.cpp:155
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2343

References _isAlly, ScriptedAI::me, NPC_ANCIENT_RUNE_GIANT, NPC_CAPTURED_MERCENARY_CAPTAIN_ALLY, NPC_CAPTURED_MERCENARY_CAPTAIN_HORDE, NPC_CAPTURED_MERCENARY_SOLDIER_ALLY, NPC_CAPTURED_MERCENARY_SOLDIER_HORDE, NPC_DARK_RUNE_ACOLYTE_G, NPC_DARK_RUNE_ACOLYTE_I, NPC_IRON_HONOR_GUARD, NPC_IRON_RING_GUARD, NPC_JORMUNGAR_BEHEMOT, NPC_RUNIC_COLOSSUS, NPC_SIF, WorldObject::SummonCreature(), and TEMPSUMMON_CORPSE_TIMED_DESPAWN.

Referenced by Reset().

◆ SpawnArenaNPCs()

void boss_thorim::boss_thorimAI::SpawnArenaNPCs ( )
inline
607 {
608 Creature* cr;
609 uint8 rnd;
610 if (_spawnCommoners || urand(0, 2))
612
613 for (uint8 i = 0; i < (_spawnCommoners ? 7 : 2); ++i)
614 {
615 rnd = urand(0, 13);
618 Middle.GetPositionX() + urand(19, 24) * cos(Middle.GetAngle(cr)),
619 Middle.GetPositionY() + urand(19, 24) * std::sin(Middle.GetAngle(cr)),
620 Middle.GetPositionZ(), 20, 20);
621 }
622 }
std::uint8_t uint8
Definition: Define.h:110
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ NPC_DARK_RUNE_COMMONER
Definition: boss_thorim.cpp:165
const Position ArenaNPCs[]
Definition: boss_thorim.cpp:255
const uint32 RollTable[3]
Definition: boss_thorim.cpp:325
Definition: Creature.h:46
float GetAngle(const Position *pos) const
Definition: Position.cpp:77

References _spawnCommoners, ArenaNPCs, Position::GetAngle(), Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ScriptedAI::me, Middle, MotionMaster::MoveJump(), NPC_DARK_RUNE_COMMONER, RollTable, WorldObject::SummonCreature(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, and urand().

Referenced by UpdateAI().

◆ SpellHit()

void boss_thorim::boss_thorimAI::SpellHit ( Unit caster,
SpellInfo const *  spellInfo 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

625 {
626 if (spellInfo->Id == SPELL_LIGHTNING_ORB_CHARGER)
627 {
628 me->SetOrientation(me->GetAngle(caster));
631 events.RescheduleEvent(EVENT_THORIM_LIGHTNING_CHARGE, 10s, 0, EVENT_PHASE_RING);
632 }
633 }
@ SPELL_LIGHTNING_CHARGE_BUFF
Definition: boss_thorim.cpp:47
@ SPELL_LIGHTNING_ORB_CHARGER
Definition: boss_thorim.cpp:49
@ SPELL_LIGHTNING_CHARGE_DAMAGE
Definition: boss_thorim.cpp:46
void SetOrientation(float orientation)
Definition: Position.h:112

References Unit::CastSpell(), EVENT_PHASE_RING, EVENT_THORIM_LIGHTNING_CHARGE, Position::GetAngle(), SpellInfo::Id, ScriptedAI::me, Position::SetOrientation(), SPELL_LIGHTNING_CHARGE_BUFF, SPELL_LIGHTNING_CHARGE_DAMAGE, and SPELL_LIGHTNING_ORB_CHARGER.

◆ SpellHitTarget()

void boss_thorim::boss_thorimAI::SpellHitTarget ( Unit target,
SpellInfo const *  spellInfo 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

636 {
637 if (spellInfo->Id == SPELL_LIGHTNING_CHARGE_DAMAGE && target->GetTypeId() == TYPEID_PLAYER)
638 _hitByLightning = true;
639 }

References _hitByLightning, Object::GetTypeId(), SpellInfo::Id, SPELL_LIGHTNING_CHARGE_DAMAGE, and TYPEID_PLAYER.

◆ UpdateAI()

void boss_thorim::boss_thorimAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

652 {
654 return;
655
656 events.Update(diff);
658 return;
659
660 switch (events.ExecuteEvent())
661 {
664 events.ScheduleEvent(EVENT_THORIM_AGGRO2, 9s);
665
667 go->SetGoState(GO_STATE_READY);
668
669 break;
671 {
673
676 break;
677 }
679 {
681 events.ScheduleEvent(EVENT_THORIM_CHARGE_ORB, 14s, 0, EVENT_PHASE_START);
682 events.ScheduleEvent(EVENT_THORIM_FILL_ARENA, 0ms, 0, EVENT_PHASE_START);
683 events.ScheduleEvent(EVENT_THORIM_LIGHTNING_ORB, 5s, 0, EVENT_PHASE_START); // checked every 5 secs if there are players on arena
685
688 break;
689 }
692 events.Repeat(16s);
693 break;
696 events.Repeat(16s);
697 break;
699 {
700 if (GetArenaPlayer())
701 {
702 // Player found, repeat and return
703 events.Repeat(5s);
704 return;
705 }
706
707 // No players found
708 Talk(SAY_WIPE);
710
711 _isArenaEmpty = true;
713 break;
714 }
716 _isArenaEmpty = true;
720 break;
723 events.Repeat(10s);
724 break;
727 events.Repeat(20s);
728 break;
731 break;
733 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
734 me->CastSpell(target, SPELL_CHAIN_LIGHTNING, false);
735 events.Repeat(15s);
736 break;
738 me->CastSpell(me, SPELL_BERSERK, true);
740 break;
742 if (_hardMode)
743 {
745 events.ScheduleEvent(EVENT_THORIM_OUTRO2, 5s, 0, 3);
748 }
749 else
750 {
752 events.ScheduleEvent(EVENT_THORIM_OUTRO2, 9s, 0, 3);
753 }
754 break;
756 if (_hardMode)
757 {
759 events.ScheduleEvent(EVENT_THORIM_OUTRO3, 12s, 0, 3);
760 }
761 else
762 {
764 events.ScheduleEvent(EVENT_THORIM_OUTRO3, 10s, 0, 3);
765 }
766 break;
768 if (_hardMode)
769 {
771 }
772 else
773 {
775 }
776
777 // Defeat credit
778 if (m_pInstance)
780
781 me->DespawnOrUnsummon(8000);
782 break;
783 }
784
787 }
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:118
@ EVENT_THORIM_NOT_REACH_IN_TIME
Definition: boss_thorim.cpp:189
@ EVENT_THORIM_LIGHTNING_ORB
Definition: boss_thorim.cpp:188
@ EVENT_THORIM_FILL_ARENA
Definition: boss_thorim.cpp:190
@ EVENT_THORIM_OUTRO3
Definition: boss_thorim.cpp:199
@ EVENT_THORIM_STORMHAMMER
Definition: boss_thorim.cpp:186
@ EVENT_THORIM_OUTRO2
Definition: boss_thorim.cpp:198
@ EVENT_THORIM_CHARGE_ORB
Definition: boss_thorim.cpp:187
@ EVENT_THORIM_AGGRO2
Definition: boss_thorim.cpp:196
@ ACTION_SIF_TRANSFORM
Definition: boss_thorim.cpp:312
@ ACTION_SIF_START_DOMINION
Definition: boss_thorim.cpp:311
@ ACTION_SIF_START_TALK
Definition: boss_thorim.cpp:310
#define SPELL_CHAIN_LIGHTNING
Definition: boss_thorim.cpp:149
@ NPC_LIGHTNING_ORB
Definition: boss_thorim.cpp:175
@ SAY_AGGRO_2
Definition: boss_thorim.cpp:277
@ SAY_WIPE
Definition: boss_thorim.cpp:284
@ SAY_END_HARD_3
Definition: boss_thorim.cpp:291
@ SAY_END_NORMAL_3
Definition: boss_thorim.cpp:288
@ SAY_END_NORMAL_2
Definition: boss_thorim.cpp:287
@ SAY_END_NORMAL_1
Definition: boss_thorim.cpp:286
@ SAY_END_HARD_1
Definition: boss_thorim.cpp:289
@ SAY_AGGRO_1
Definition: boss_thorim.cpp:276
@ SAY_BERSERK
Definition: boss_thorim.cpp:283
@ SAY_END_HARD_2
Definition: boss_thorim.cpp:290
@ SPELL_UNBALANCING_STRIKE
Definition: boss_thorim.cpp:39
@ SPELL_STORMHAMMER
Definition: boss_thorim.cpp:35
@ SPELL_CHARGE_ORB
Definition: boss_thorim.cpp:42
@ SPELL_BERSERK_FRIENDS
Definition: boss_thorim.cpp:36
@ SPELL_BERSERK
Definition: boss_thorim.cpp:40
@ SPELL_LIGHTNING_PILLAR_P2
Definition: boss_thorim.cpp:48
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
bool UpdateVictim()
Definition: CreatureAI.cpp:268
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2117
Definition: Unit.h:1302
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1226
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410
void SpawnArenaNPCs()
Definition: boss_thorim.cpp:606

References _encounterFinished, _hardMode, _isArenaEmpty, ACTION_SIF_START_DOMINION, ACTION_SIF_START_TALK, ACTION_SIF_TRANSFORM, Unit::CastCustomSpell(), Unit::CastSpell(), DATA_THORIM_FENCE, Creature::DespawnOrUnsummon(), SummonList::DoAction(), UnitAI::DoMeleeAttackIfReady(), DONE, EVENT_PHASE_START, EVENT_THORIM_AGGRO, EVENT_THORIM_AGGRO2, EVENT_THORIM_BERSERK, EVENT_THORIM_CHAIN_LIGHTNING, EVENT_THORIM_CHARGE_ORB, EVENT_THORIM_FILL_ARENA, EVENT_THORIM_LIGHTNING_CHARGE, EVENT_THORIM_LIGHTNING_ORB, EVENT_THORIM_NOT_REACH_IN_TIME, EVENT_THORIM_OUTRO1, EVENT_THORIM_OUTRO2, EVENT_THORIM_OUTRO3, EVENT_THORIM_START_PHASE1, EVENT_THORIM_STORMHAMMER, EVENT_THORIM_UNBALANCING_STRIKE, GetArenaPlayer(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GetThorimObject(), Unit::GetVictim(), GO_STATE_READY, Unit::HasUnitState(), m_pInstance, ScriptedAI::me, NPC_LIGHTNING_ORB, NPC_SIF, SAY_AGGRO_1, SAY_AGGRO_2, SAY_BERSERK, SAY_END_HARD_1, SAY_END_HARD_2, SAY_END_HARD_3, SAY_END_NORMAL_1, SAY_END_NORMAL_2, SAY_END_NORMAL_3, SAY_WIPE, UnitAI::SelectTarget(), ZoneScript::SetData(), SpawnArenaNPCs(), SPELL_BERSERK, SPELL_BERSERK_FRIENDS, SPELL_CHAIN_LIGHTNING, SPELL_CHARGE_ORB, SPELL_LIGHTNING_PILLAR_P2, SPELL_STORMHAMMER, SPELL_UNBALANCING_STRIKE, SPELLVALUE_MAX_TARGETS, WorldObject::SummonCreature(), summons, TYPE_THORIM, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _encounterFinished

bool boss_thorim::boss_thorimAI::_encounterFinished

◆ _hardMode

bool boss_thorim::boss_thorimAI::_hardMode

Referenced by DamageTaken(), GetData(), Reset(), and UpdateAI().

◆ _hitByLightning

bool boss_thorim::boss_thorimAI::_hitByLightning

Referenced by GetData(), Reset(), and SpellHitTarget().

◆ _isAlly

bool boss_thorim::boss_thorimAI::_isAlly

Referenced by Reset(), and SpawnAllNPCs().

◆ _isArenaEmpty

bool boss_thorim::boss_thorimAI::_isArenaEmpty

Referenced by Reset(), and UpdateAI().

◆ _isHitAllowed

bool boss_thorim::boss_thorimAI::_isHitAllowed

Referenced by DamageTaken(), DoAction(), and Reset().

◆ _spawnCommoners

bool boss_thorim::boss_thorimAI::_spawnCommoners

Referenced by Reset(), and SpawnArenaNPCs().

◆ _trashCounter

uint8 boss_thorim::boss_thorimAI::_trashCounter

Referenced by DoAction(), and Reset().

◆ events

EventMap boss_thorim::boss_thorimAI::events

◆ m_pInstance

InstanceScript* boss_thorim::boss_thorimAI::m_pInstance

◆ summons

SummonList boss_thorim::boss_thorimAI::summons