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)
 
Unit * DoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
Player * GetPlayerAtMinimumRange (float minRange)
 
Creature * DoSpawnCreature (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
 
Player * SelectTargetFromPlayerList (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)
 
WorldObject * GetSummoner () 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
 
Unit * SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
Unit * SelectTarget (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 OnDespawn ()
 Called when the unit is about to be removed from the world (despawn, grid unload, corpse disappearing, player logging out etc.)
 
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

Vehicle * vehicle
 
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
Creature * me
 

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 AISpellInfoType * AISpellInfo
 
- 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)
 
Creature * DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummonFlyer (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
124 : BossAI(creature, BOSS_KOLOGARN), vehicle(me->GetVehicleKit()), breathReady(false)
125 {
126 assert(vehicle);
128 }
@ UNIT_STAND_STATE_SUBMERGED
Definition UnitDefines.h:44
Definition ScriptedCreature.h:496
Vehicle * GetVehicleKit() const
Definition Unit.h:1947
void SetStandState(uint8 state)
Definition Unit.cpp:12801
Creature * me
Definition ScriptedCreature.h:292
bool breathReady
Definition boss_kologarn.cpp:133
Vehicle * vehicle
Definition boss_kologarn.cpp:130
@ 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
152 {
155 }
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:57
@ NPC_LEFT_ARM
Definition boss_kologarn.cpp:91
void InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 type, uint32 summonTime)
Definition Vehicle.cpp:312
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234
ObjectGuid _left
Definition boss_kologarn.cpp:131

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
158 {
161 }
@ NPC_RIGHT_ARM
Definition boss_kologarn.cpp:92
ObjectGuid _right
Definition boss_kologarn.cpp:131

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.

206 {
207 me->Attack(who, true);
208 }
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:7110

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.

297 {
298 if (who && who->GetEntry() == me->GetEntry() && me->GetHealth())
299 {
300 damage = std::min(damage, me->GetHealth() - 1);
301 me->LowerPlayerDamageReq(damage);
302 }
303 }
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true, uint8 attackerLevel=0)
Definition Creature.cpp:3928
uint32 GetEntry() const
Definition Object.h:123
uint32 GetHealth() const
Definition Unit.h:1122

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

◆ DoAction()

void boss_kologarn::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

180 {
181 if (param == DATA_KOLOGARN_LOOKS_ACHIEV)
182 _looksAchievement = false;
183 if (param == DATA_KOLOGARN_RUBBLE_ACHIEV)
184 {
185 // Means arm died
186 if (instance && (!_left || !_right))
188
190 }
191 }
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:110
@ DATA_KOLOGARN_LOOKS_ACHIEV
Definition boss_kologarn.cpp:117
@ ACHIEVEMENT_DISARMED_CRITERIA
Definition boss_kologarn.cpp:115
@ DATA_KOLOGARN_RUBBLE_ACHIEV
Definition boss_kologarn.cpp:118
InstanceScript *const instance
Definition ScriptedCreature.h:503
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:689
uint8 _rubbleAchievement
Definition boss_kologarn.cpp:134
bool _looksAchievement
Definition boss_kologarn.cpp:133

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.

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

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.

217 {
218 _JustDied();
219 me->StopMoving();
220
222
224 bridge->SetGoState(GO_STATE_READY);
225
226 // Summon Chest
227 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))
228 {
229 me->RemoveGameObject(go, false);
230 go->SetSpellId(1); // hack to make it despawn
231 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
232 go->SetLootRecipient(me);
233 }
235 arm->DespawnOrUnsummon(3s); // visual
237 arm->DespawnOrUnsummon(3s); // visual
239 me->SetDisableGravity(true);
240 me->SetCorpseDelay(7 * DAY);
242 }
constexpr auto DAY
Definition Common.h:49
@ 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:668
Definition Creature.h:47
void SetCorpseRemoveTime(uint32 delay)
Definition Creature.cpp:3902
void SetCorpseDelay(uint32 delay)
Definition Creature.h:73
Definition GameObject.h:125
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:6384
void StopMoving()
Definition Unit.cpp:12709
void SetDisableGravity(bool disable)
Definition Unit.cpp:16208
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:754
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2574
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:2474
Talk
Definition hyjal.cpp:82
T const & RAID_MODE(T const &normal10, T const &normal25) const
Definition ScriptedCreature.h:419
@ GO_KOLOGARN_BRIDGE
Definition ulduar.h:295
@ GO_KOLOGARN_CHEST
Definition ulduar.h:259
@ GO_KOLOGARN_CHEST_HERO
Definition ulduar.h:260

References BossAI::_JustDied(), _left, _right, DAY, 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, Creature::SetCorpseDelay(), Creature::SetCorpseRemoveTime(), 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.

306 {
307 if (instance)
309
310 events.ScheduleEvent(EVENT_SMASH, 8s);
311 events.ScheduleEvent(EVENT_SWEEP, 17s);
312 events.ScheduleEvent(EVENT_GRIP, 15s);
313 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 10s);
314 events.ScheduleEvent(EVENT_PREPARE_BREATH, 3s);
315 events.ScheduleEvent(EVENT_ENRAGE, 8min);
316
318 me->setActive(true);
319 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ SAY_AGGRO
Definition boss_kologarn.cpp:31
@ EVENT_ENRAGE
Definition boss_kologarn.cpp:86
@ EVENT_SMASH
Definition boss_kologarn.cpp:78
@ EVENT_PREPARE_BREATH
Definition boss_kologarn.cpp:85
@ EVENT_FOCUSED_EYEBEAM
Definition boss_kologarn.cpp:83
@ EVENT_SWEEP
Definition boss_kologarn.cpp:80
@ EVENT_GRIP
Definition boss_kologarn.cpp:79
events
Definition boss_sartura.cpp:43
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:406
void setActive(bool isActiveObject)
Definition Object.cpp:1091

References BOSS_KOLOGARN, EVENT_ENRAGE, 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.

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

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

◆ KilledUnit()

void boss_kologarn::KilledUnit ( Unit *  )
inlineoverridevirtual

Reimplemented from CreatureAI.

245 {
246 if (!urand(0, 2))
247 return;
248
249 Talk(SAY_SLAY);
250 }
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.

137 {
138 if (who->IsPlayer() && me->GetExactDist2d(who) < 45.0f && me->getStandState() == UNIT_STAND_STATE_SUBMERGED)
139 {
142 arm->CastSpell(arm, SPELL_ARM_RESPAWN_VISUAL, true);
144 arm->CastSpell(arm, SPELL_ARM_RESPAWN_VISUAL, true);
145 }
146
147 if (me->GetExactDist2d(who) < 30.0f)
149 }
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:35
@ SPELL_ARM_RESPAWN_VISUAL
Definition boss_kologarn.cpp:63
virtual void MoveInLineOfSight(Unit *)
Definition CreatureAI.cpp:180
bool IsPlayer() const
Definition Object.h:207
Definition Unit.h:670
uint8 getStandState() const
Definition Unit.h:1796
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.

253 {
254 if (apply)
255 {
256 if (who->GetEntry() == NPC_LEFT_ARM)
257 _left = who->GetGUID();
258 else if (who->GetEntry() == NPC_RIGHT_ARM)
259 _right = who->GetGUID();
260 else
261 return;
262
263 who->SetOrientation(M_PI);
264 who->CastSpell(who, SPELL_ARM_RESPAWN_VISUAL, true);
265 return;
266 }
267
269 return;
270
271 // left arm
272 if (who->GetGUID() == _left)
273 {
274 _left.Clear();
275 if (me->IsInCombat())
276 {
278 events.ScheduleEvent(EVENT_RESTORE_ARM_LEFT, 50s);
279 }
280 }
281 else
282 {
283 _right.Clear();
284 if (me->IsInCombat())
285 {
287 events.ScheduleEvent(EVENT_RESTORE_ARM_RIGHT, 50s);
288 }
289 }
290
291 me->CastSpell(me, SPELL_ARM_DEAD, true);
292 if (!_right && !_left)
293 events.ScheduleEvent(EVENT_STONE_SHOUT, 5s);
294 }
@ SPELL_ARM_DEAD
Definition boss_kologarn.cpp:61
@ 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:81
@ EVENT_RESTORE_ARM_RIGHT
Definition boss_kologarn.cpp:82
@ EVENT_STONE_SHOUT
Definition boss_kologarn.cpp:84
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
void Clear()
Definition ObjectGuid.h:141
bool IsAlive() const
Definition Unit.h:1812
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:1378
bool IsInCombat() const
Definition Unit.h:949

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.

164 {
166 _looksAchievement = true;
167
169 me->SetDisableGravity(true);
170 me->DisableRotate(true);
171 me->SetCorpseDelay(7 * DAY);
172
173 _Reset();
174
175 // Reset breath on pull
176 breathReady = false;
177 }
void _Reset()
Definition ScriptedCreature.cpp:648
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:1774
void DisableRotate(bool apply)
Definition Unit.cpp:14217

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

◆ UpdateAI()

void boss_kologarn::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

322 {
323 if (!UpdateVictim())
324 return;
325
326 events.Update(diff);
328 return;
329
330 switch (events.ExecuteEvent())
331 {
333 breathReady = true;
334 break;
336 if (_left || _right)
337 {
338 return;
339 }
340
342 events.ScheduleEvent(EVENT_STONE_SHOUT, 2s);
343 break;
344 case EVENT_SMASH:
345 if (_left && _right)
347 else if (_left || _right)
349
350 events.DelayEvents(1s);
351 events.ScheduleEvent(EVENT_SMASH, 14s);
352 return;
353 case EVENT_SWEEP:
354 if (_left)
355 {
357 cr->CastSpell(cr, SPELL_ARM_SWEEP, false);
358
359 if (urand(0, 1))
361 }
362
363 events.DelayEvents(1s);
364 events.ScheduleEvent(EVENT_SWEEP, 17s);
365 return;
366 case EVENT_GRIP:
367 events.ScheduleEvent(EVENT_GRIP, 25s);
368 if (!_right)
369 break;
370
374 return;
376 {
377 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 20s);
379 return;
380 }
382 // shouldn't happen
384 return;
386 // shouldn't happen
388 return;
389 case EVENT_ENRAGE:
392 return;
393 }
394
395 //Make sure our attack is ready and we aren't currently casting before checking distance
396 if (me->isAttackReady() && me->GetVictim()) // victim could die by a spell (IMPORTANT!!!) and kologarn entered evade mode
397 {
398 //If we are within range melee the target
400 {
403 return;
404 }
405 else if (Unit* tgt = me->SelectNearbyTarget())
406 {
409 return;
410 }
411
412 if (breathReady)
415 }
416 }
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ NPC_SWEEP_TRIGGER
Definition boss_kologarn.cpp:93
@ SPELL_FOCUSED_EYEBEAM_SUMMON
Definition boss_kologarn.cpp:55
@ SPELL_ARM_SWEEP
Definition boss_kologarn.cpp:66
@ SPELL_STONE_GRIP
Definition boss_kologarn.cpp:69
@ 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_BERSERK
Definition boss_kologarn.cpp:52
@ 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
@ SAY_BERSERK
Definition boss_kologarn.cpp:38
bool UpdateVictim()
Definition CreatureAI.cpp:350
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:399
Unit * SelectNearbyTarget(Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const
Definition Unit.cpp:13060
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition Unit.cpp:790
Unit * GetVictim() const
Definition Unit.h:910
bool HasUnitState(const uint32 f) const
Definition Unit.h:742
void AttackerStateUpdate(Unit *victim, WeaponAttackType attType=BASE_ATTACK, bool extra=false, bool ignoreCasting=false)
Definition Unit.cpp:2767
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition Unit.h:895
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition Unit.cpp:769
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2565
void AttachLeftArm()
Definition boss_kologarn.cpp:151
void AttachRightArm()
Definition boss_kologarn.cpp:157

References _left, _right, AttachLeftArm(), AttachRightArm(), Unit::AttackerStateUpdate(), breathReady, Unit::CastSpell(), UnitAI::DoCastSelf(), EMOTE_STONE_GRIP, EVENT_ENRAGE, 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_BERSERK, SAY_GRAB_PLAYER, SAY_SHOCKWAVE, Unit::SelectNearbyTarget(), SPELL_ARM_SWEEP, SPELL_BERSERK, 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: