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

Public Member Functions

 boss_kologarn (Creature *creature)
 
void MoveInLineOfSight (Unit *who) override
 
void AttachLeftArm ()
 
void AttachRightArm ()
 
void Reset () override
 
void DoAction (int32 param) override
 
uint32 GetData (uint32 param) const override
 
void AttackStart (Unit *who) override
 
void JustSummoned (Creature *cr) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void PassengerBoarded (Unit *who, int8, bool apply) override
 == Fields =======================================
 
void DamageTaken (Unit *who, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
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 BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- 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 (Position const *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 >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &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 IsEscortNPC (bool=true) const
 
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 SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (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.
 
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 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 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, int32 aura=0)
 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

Vehiclevehicle
 
ObjectGuid _left
 
ObjectGuid _right
 
bool _looksAchievement
 
bool breathReady
 
uint8 _rubbleAchievement
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- 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 BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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 _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
SummonList summons
 
- 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_kologarn()

boss_kologarn::boss_kologarn ( Creature creature)
inline
122 : BossAI(creature, BOSS_KOLOGARN), vehicle(me->GetVehicleKit()), breathReady(false)
123 {
124 assert(vehicle);
126 }
@ UNIT_STAND_STATE_SUBMERGED
Definition UnitDefines.h:44
Definition ScriptedCreature.h:485
Vehicle * GetVehicleKit() const
Definition Unit.h:1925
void SetStandState(uint8 state)
Definition Unit.cpp:13126
Creature * me
Definition ScriptedCreature.h:281
bool breathReady
Definition boss_kologarn.cpp:131
Vehicle * vehicle
Definition boss_kologarn.cpp:128
@ BOSS_KOLOGARN
Definition ulduar.h:36

References ScriptedAI::me, Unit::SetStandState(), UNIT_STAND_STATE_SUBMERGED, and vehicle.

Member Function Documentation

◆ AttachLeftArm()

void boss_kologarn::AttachLeftArm ( )
inline
150 {
153 }
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:56
@ NPC_LEFT_ARM
Definition boss_kologarn.cpp:89
void InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 type, uint32 summonTime)
Definition Vehicle.cpp:285
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234
ObjectGuid _left
Definition boss_kologarn.cpp:129

References _left, ObjectAccessor::GetCreature(), Vehicle::InstallAccessory(), ScriptedAI::me, NPC_LEFT_ARM, TEMPSUMMON_MANUAL_DESPAWN, and vehicle.

Referenced by UpdateAI().

◆ AttachRightArm()

void boss_kologarn::AttachRightArm ( )
inline
156 {
159 }
@ NPC_RIGHT_ARM
Definition boss_kologarn.cpp:90
ObjectGuid _right
Definition boss_kologarn.cpp:129

References _right, ObjectAccessor::GetCreature(), Vehicle::InstallAccessory(), ScriptedAI::me, NPC_RIGHT_ARM, TEMPSUMMON_MANUAL_DESPAWN, and vehicle.

Referenced by UpdateAI().

◆ AttackStart()

void boss_kologarn::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from UnitAI.

203 {
204 me->Attack(who, true);
205 }
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:7333

References Unit::Attack(), and ScriptedAI::me.

◆ DamageTaken()

void boss_kologarn::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.

292 {
293 if (who && who->GetEntry() == me->GetEntry() && me->GetHealth())
294 {
295 damage = std::min(damage, me->GetHealth() - 1);
296 me->LowerPlayerDamageReq(damage);
297 }
298 }
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true, uint8 attackerLevel=0)
Definition Creature.cpp:3872
uint32 GetEntry() const
Definition Object.h:117
uint32 GetHealth() const
Definition Unit.h:1109

References Object::GetEntry(), Unit::GetHealth(), Creature::LowerPlayerDamageReq(), and ScriptedAI::me.

◆ DoAction()

void boss_kologarn::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

177 {
178 if (param == DATA_KOLOGARN_LOOKS_ACHIEV)
179 _looksAchievement = false;
180 if (param == DATA_KOLOGARN_RUBBLE_ACHIEV)
181 {
182 // Means arm died
183 if (instance && (!_left || !_right))
185
187 }
188 }
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:110
@ DATA_KOLOGARN_LOOKS_ACHIEV
Definition boss_kologarn.cpp:115
@ ACHIEVEMENT_DISARMED_CRITERIA
Definition boss_kologarn.cpp:113
@ DATA_KOLOGARN_RUBBLE_ACHIEV
Definition boss_kologarn.cpp:116
InstanceScript *const instance
Definition ScriptedCreature.h:492
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:683
uint8 _rubbleAchievement
Definition boss_kologarn.cpp:132
bool _looksAchievement
Definition boss_kologarn.cpp:131

References _left, _looksAchievement, _right, _rubbleAchievement, ACHIEVEMENT_DISARMED_CRITERIA, ACHIEVEMENT_TIMED_TYPE_EVENT, DATA_KOLOGARN_LOOKS_ACHIEV, DATA_KOLOGARN_RUBBLE_ACHIEV, InstanceScript::DoStartTimedAchievement(), and BossAI::instance.

◆ GetData()

uint32 boss_kologarn::GetData ( uint32  param) const
inlineoverridevirtual

Reimplemented from UnitAI.

191 {
192 if (param == DATA_KOLOGARN_LOOKS_ACHIEV)
193 return _looksAchievement;
194 else if (param == DATA_KOLOGARN_RUBBLE_ACHIEV)
195 return (_rubbleAchievement >= 5);
196 else if (param == DATA_KOLOGARN_ARMS_ACHIEV)
197 return !_rubbleAchievement;
198
199 return 0;
200 }
@ DATA_KOLOGARN_ARMS_ACHIEV
Definition boss_kologarn.cpp:117

References _looksAchievement, _rubbleAchievement, DATA_KOLOGARN_ARMS_ACHIEV, DATA_KOLOGARN_LOOKS_ACHIEV, and DATA_KOLOGARN_RUBBLE_ACHIEV.

◆ JustDied()

void boss_kologarn::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

214 {
215 _JustDied();
216 me->StopMoving();
217
219
221 bridge->SetGoState(GO_STATE_READY);
222
223 // Summon Chest
224 if (GameObject* go = me->SummonGameObject(RAID_MODE(GO_KOLOGARN_CHEST, GO_KOLOGARN_CHEST_HERO), 1839.62f, -35.98f, 448.81f, 3.6f, 0, 0, 0, 0, 7 * 86400))
225 {
226 me->RemoveGameObject(go, false);
227 go->SetSpellId(1); // hack to make it despawn
228 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
229 go->SetLootRecipient(me);
230 }
232 arm->DespawnOrUnsummon(3s); // visual
234 arm->DespawnOrUnsummon(3s); // visual
236 me->SetDisableGravity(true);
237 }
@ GO_STATE_READY
Definition GameObjectData.h:709
GameObjectFlags
Definition SharedDefines.h:1606
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ SAY_DEATH
Definition boss_kologarn.cpp:37
void _JustDied()
Definition ScriptedCreature.cpp:664
Definition Creature.h:47
Definition GameObject.h:120
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:6601
void StopMoving()
Definition Unit.cpp:13034
void SetDisableGravity(bool disable)
Definition Unit.cpp:16506
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2562
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:2462
Talk
Definition hyjal.cpp:82
T const & RAID_MODE(T const &normal10, T const &normal25) const
Definition ScriptedCreature.h:408
@ GO_KOLOGARN_BRIDGE
Definition ulduar.h:276
@ GO_KOLOGARN_CHEST
Definition ulduar.h:243
@ GO_KOLOGARN_CHEST_HERO
Definition ulduar.h:244

References BossAI::_JustDied(), _left, _right, WorldObject::FindNearestGameObject(), ObjectAccessor::GetCreature(), GO_KOLOGARN_BRIDGE, GO_KOLOGARN_CHEST, GO_KOLOGARN_CHEST_HERO, GO_STATE_READY, ScriptedAI::me, ScriptedAI::RAID_MODE(), Unit::RemoveGameObject(), SAY_DEATH, Unit::SetDisableGravity(), Unit::SetUnitFlag(), Unit::StopMoving(), WorldObject::SummonGameObject(), and UNIT_FLAG_NOT_SELECTABLE.

◆ JustEngagedWith()

void boss_kologarn::JustEngagedWith ( Unit )
inlineoverridevirtual

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

Reimplemented from CreatureAI.

301 {
302 if (instance)
304
305 events.ScheduleEvent(EVENT_SMASH, 8s);
306 events.ScheduleEvent(EVENT_SWEEP, 17s);
307 events.ScheduleEvent(EVENT_GRIP, 15s);
308 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 10s);
309 events.ScheduleEvent(EVENT_PREPARE_BREATH, 3s);
310 //events.ScheduleEvent(EVENT_ENRAGE, x); no info
311
313 me->setActive(true);
314 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ SAY_AGGRO
Definition boss_kologarn.cpp:31
@ EVENT_SMASH
Definition boss_kologarn.cpp:77
@ EVENT_PREPARE_BREATH
Definition boss_kologarn.cpp:84
@ EVENT_FOCUSED_EYEBEAM
Definition boss_kologarn.cpp:82
@ EVENT_SWEEP
Definition boss_kologarn.cpp:79
@ EVENT_GRIP
Definition boss_kologarn.cpp:78
events
Definition boss_sartura.cpp:43
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:400
void setActive(bool isActiveObject)
Definition Object.cpp:1086

References BOSS_KOLOGARN, EVENT_FOCUSED_EYEBEAM, EVENT_GRIP, EVENT_PREPARE_BREATH, EVENT_SMASH, EVENT_SWEEP, IN_PROGRESS, BossAI::instance, ScriptedAI::me, SAY_AGGRO, WorldObject::setActive(), and InstanceScript::SetBossState().

◆ JustSummoned()

void boss_kologarn::JustSummoned ( Creature cr)
inlineoverridevirtual

Reimplemented from CreatureAI.

208 {
209 if (cr->GetEntry() != NPC_LEFT_ARM && cr->GetEntry() != NPC_RIGHT_ARM)
211 }
void JustSummoned(Creature *summon) override
Definition ScriptedCreature.cpp:725

References Object::GetEntry(), BossAI::JustSummoned(), NPC_LEFT_ARM, and NPC_RIGHT_ARM.

◆ KilledUnit()

void boss_kologarn::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

240 {
241 if (!urand(0, 2))
242 return;
243
244 Talk(SAY_SLAY);
245 }
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ SAY_SLAY
Definition boss_kologarn.cpp:32

References SAY_SLAY, and urand().

◆ MoveInLineOfSight()

void boss_kologarn::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

135 {
136 if (who->IsPlayer() && me->GetExactDist2d(who) < 45.0f && me->getStandState() == UNIT_STAND_STATE_SUBMERGED)
137 {
140 arm->CastSpell(arm, SPELL_ARM_RESPAWN_VISUAL, true);
142 arm->CastSpell(arm, SPELL_ARM_RESPAWN_VISUAL, true);
143 }
144
145 if (me->GetExactDist2d(who) < 30.0f)
147 }
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:35
@ SPELL_ARM_RESPAWN_VISUAL
Definition boss_kologarn.cpp:62
virtual void MoveInLineOfSight(Unit *)
Definition CreatureAI.cpp:180
bool IsPlayer() const
Definition Object.h:201
Definition Unit.h:665
uint8 getStandState() const
Definition Unit.h:1780
float GetExactDist2d(const float x, const float y) const
Definition Position.h:170

References _left, _right, ObjectAccessor::GetCreature(), Position::GetExactDist2d(), Unit::getStandState(), Object::IsPlayer(), ScriptedAI::me, CreatureAI::MoveInLineOfSight(), Unit::SetStandState(), SPELL_ARM_RESPAWN_VISUAL, UNIT_STAND_STATE_STAND, and UNIT_STAND_STATE_SUBMERGED.

◆ PassengerBoarded()

void boss_kologarn::PassengerBoarded ( Unit ,
int8  ,
bool   
)
inlineoverridevirtual

== Fields =======================================

Reimplemented from CreatureAI.

248 {
249 if (apply)
250 {
251 if (who->GetEntry() == NPC_LEFT_ARM)
252 _left = who->GetGUID();
253 else if (who->GetEntry() == NPC_RIGHT_ARM)
254 _right = who->GetGUID();
255 else
256 return;
257
258 who->SetOrientation(M_PI);
259 who->CastSpell(who, SPELL_ARM_RESPAWN_VISUAL, true);
260 return;
261 }
262
264 return;
265
266 // left arm
267 if (who->GetGUID() == _left)
268 {
269 _left.Clear();
270 if (me->IsInCombat())
271 {
273 events.ScheduleEvent(EVENT_RESTORE_ARM_LEFT, 50s);
274 }
275 }
276 else
277 {
278 _right.Clear();
279 if (me->IsInCombat())
280 {
282 events.ScheduleEvent(EVENT_RESTORE_ARM_RIGHT, 50s);
283 }
284 }
285
286 me->CastSpell(me, SPELL_ARM_DEAD, true);
287 if (!_right && !_left)
288 events.ScheduleEvent(EVENT_STONE_SHOUT, 5s);
289 }
@ SPELL_ARM_DEAD
Definition boss_kologarn.cpp:60
@ SAY_RIGHT_ARM_GONE
Definition boss_kologarn.cpp:34
@ SAY_LEFT_ARM_GONE
Definition boss_kologarn.cpp:33
@ EVENT_RESTORE_ARM_LEFT
Definition boss_kologarn.cpp:80
@ EVENT_RESTORE_ARM_RIGHT
Definition boss_kologarn.cpp:81
@ EVENT_STONE_SHOUT
Definition boss_kologarn.cpp:83
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
void Clear()
Definition ObjectGuid.h:141
bool IsAlive() const
Definition Unit.h:1793
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:1361
bool IsInCombat() const
Definition Unit.h:936

References _left, _right, BOSS_KOLOGARN, Unit::CastSpell(), ObjectGuid::Clear(), EVENT_RESTORE_ARM_LEFT, EVENT_RESTORE_ARM_RIGHT, EVENT_STONE_SHOUT, InstanceScript::GetBossState(), Object::GetEntry(), Object::GetGUID(), IN_PROGRESS, BossAI::instance, Unit::IsAlive(), Unit::IsInCombat(), ScriptedAI::me, NPC_LEFT_ARM, NPC_RIGHT_ARM, SAY_LEFT_ARM_GONE, SAY_RIGHT_ARM_GONE, Position::SetOrientation(), SPELL_ARM_DEAD, and SPELL_ARM_RESPAWN_VISUAL.

◆ Reset()

void boss_kologarn::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

162 {
164 _looksAchievement = true;
165
167 me->SetDisableGravity(true);
168 me->DisableRotate(true);
169
170 _Reset();
171
172 // Reset breath on pull
173 breathReady = false;
174 }
void _Reset()
Definition ScriptedCreature.cpp:644
void MoveTargetedHome(bool walk=false)
The unit will return this initial position (owner for pets and summoned creatures)....
Definition MotionMaster.cpp:262
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
void DisableRotate(bool apply)
Definition Unit.cpp:14535

References _looksAchievement, BossAI::_Reset(), _rubbleAchievement, breathReady, Unit::DisableRotate(), Unit::GetMotionMaster(), ScriptedAI::me, MotionMaster::MoveTargetedHome(), and Unit::SetDisableGravity().

◆ UpdateAI()

void boss_kologarn::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

317 {
318 if (!UpdateVictim())
319 return;
320
321 events.Update(diff);
323 return;
324
325 switch (events.ExecuteEvent())
326 {
328 breathReady = true;
329 break;
331 if (_left || _right)
332 {
333 return;
334 }
335
337 events.ScheduleEvent(EVENT_STONE_SHOUT, 2s);
338 break;
339 case EVENT_SMASH:
340 if (_left && _right)
342 else if (_left || _right)
344
345 events.DelayEvents(1s);
346 events.ScheduleEvent(EVENT_SMASH, 14s);
347 return;
348 case EVENT_SWEEP:
349 if (_left)
350 {
352 cr->CastSpell(cr, SPELL_ARM_SWEEP, false);
353
354 if (urand(0, 1))
356 }
357
358 events.DelayEvents(1s);
359 events.ScheduleEvent(EVENT_SWEEP, 17s);
360 return;
361 case EVENT_GRIP:
362 events.ScheduleEvent(EVENT_GRIP, 25s);
363 if (!_right)
364 break;
365
369 return;
371 {
372 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 20s);
374 return;
375 }
377 // shouldn't happen
379 return;
381 // shouldn't happen
383 return;
384 }
385
386 //Make sure our attack is ready and we aren't currently casting before checking distance
387 if (me->isAttackReady() && me->GetVictim()) // victim could die by a spell (IMPORTANT!!!) and kologarn entered evade mode
388 {
389 //If we are within range melee the target
391 {
394 return;
395 }
396 else if (Unit* tgt = me->SelectNearbyTarget())
397 {
400 return;
401 }
402
403 if (breathReady)
406 }
407 }
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ NPC_SWEEP_TRIGGER
Definition boss_kologarn.cpp:91
@ SPELL_FOCUSED_EYEBEAM_SUMMON
Definition boss_kologarn.cpp:54
@ SPELL_ARM_SWEEP
Definition boss_kologarn.cpp:65
@ SPELL_STONE_GRIP
Definition boss_kologarn.cpp:68
@ SPELL_PETRIFYING_BREATH
Definition boss_kologarn.cpp:50
@ SPELL_STONE_SHOUT
Definition boss_kologarn.cpp:51
@ SPELL_OVERHEAD_SMASH
Definition boss_kologarn.cpp:48
@ SPELL_ONEARMED_OVERHEAD_SMASH
Definition boss_kologarn.cpp:49
@ SAY_GRAB_PLAYER
Definition boss_kologarn.cpp:36
@ SAY_SHOCKWAVE
Definition boss_kologarn.cpp:35
@ EMOTE_STONE_GRIP
Definition boss_kologarn.cpp:39
bool UpdateVictim()
Definition CreatureAI.cpp:350
Unit * SelectNearbyTarget(Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const
Definition Unit.cpp:13384
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition Unit.cpp:782
Unit * GetVictim() const
Definition Unit.h:904
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
void AttackerStateUpdate(Unit *victim, WeaponAttackType attType=BASE_ATTACK, bool extra=false, bool ignoreCasting=false)
Definition Unit.cpp:2735
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition Unit.h:889
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition Unit.cpp:761
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2553
void AttachLeftArm()
Definition boss_kologarn.cpp:149
void AttachRightArm()
Definition boss_kologarn.cpp:155

References _left, _right, AttachLeftArm(), AttachRightArm(), Unit::AttackerStateUpdate(), breathReady, Unit::CastSpell(), EMOTE_STONE_GRIP, EVENT_FOCUSED_EYEBEAM, EVENT_GRIP, EVENT_PREPARE_BREATH, EVENT_RESTORE_ARM_LEFT, EVENT_RESTORE_ARM_RIGHT, EVENT_SMASH, EVENT_STONE_SHOUT, EVENT_SWEEP, WorldObject::FindNearestCreature(), Unit::GetVictim(), Unit::HasUnitState(), Unit::isAttackReady(), Unit::IsWithinMeleeRange(), ScriptedAI::me, NPC_SWEEP_TRIGGER, Unit::resetAttackTimer(), SAY_GRAB_PLAYER, SAY_SHOCKWAVE, Unit::SelectNearbyTarget(), SPELL_ARM_SWEEP, SPELL_FOCUSED_EYEBEAM_SUMMON, SPELL_ONEARMED_OVERHEAD_SMASH, SPELL_OVERHEAD_SMASH, SPELL_PETRIFYING_BREATH, SPELL_STONE_GRIP, SPELL_STONE_SHOUT, UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ _left

◆ _looksAchievement

bool boss_kologarn::_looksAchievement

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

◆ _right

◆ _rubbleAchievement

uint8 boss_kologarn::_rubbleAchievement

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

◆ breathReady

bool boss_kologarn::breathReady

Referenced by Reset(), and UpdateAI().

◆ vehicle

Vehicle* boss_kologarn::vehicle

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