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
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:1931
void SetStandState(uint8 state)
Definition Unit.cpp:12731
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:57
@ NPC_LEFT_ARM
Definition boss_kologarn.cpp:89
void InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 type, uint32 summonTime)
Definition Vehicle.cpp:299
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.

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

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.

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

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

◆ DoAction()

void boss_kologarn::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

178 {
179 if (param == DATA_KOLOGARN_LOOKS_ACHIEV)
180 _looksAchievement = false;
181 if (param == DATA_KOLOGARN_RUBBLE_ACHIEV)
182 {
183 // Means arm died
184 if (instance && (!_left || !_right))
186
188 }
189 }
@ 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.

192 {
193 if (param == DATA_KOLOGARN_LOOKS_ACHIEV)
194 return _looksAchievement;
195 else if (param == DATA_KOLOGARN_RUBBLE_ACHIEV)
196 return (_rubbleAchievement >= 5);
197 else if (param == DATA_KOLOGARN_ARMS_ACHIEV)
198 return !_rubbleAchievement;
199
200 return 0;
201 }
@ 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.

215 {
216 _JustDied();
217 me->StopMoving();
218
220
222 bridge->SetGoState(GO_STATE_READY);
223
224 // Summon Chest
225 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))
226 {
227 me->RemoveGameObject(go, false);
228 go->SetSpellId(1); // hack to make it despawn
229 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
230 go->SetLootRecipient(me);
231 }
233 arm->DespawnOrUnsummon(3s); // visual
235 arm->DespawnOrUnsummon(3s); // visual
237 me->SetDisableGravity(true);
238 me->SetCorpseDelay(7 * DAY);
240 }
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:664
Definition Creature.h:47
void SetCorpseRemoveTime(uint32 delay)
Definition Creature.cpp:3900
void SetCorpseDelay(uint32 delay)
Definition Creature.h:74
Definition GameObject.h:120
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:6348
void StopMoving()
Definition Unit.cpp:12639
void SetDisableGravity(bool disable)
Definition Unit.cpp:16119
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:2567
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:2467
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:296
@ GO_KOLOGARN_CHEST
Definition ulduar.h:260
@ GO_KOLOGARN_CHEST_HERO
Definition ulduar.h:261

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.

304 {
305 if (instance)
307
308 events.ScheduleEvent(EVENT_SMASH, 8s);
309 events.ScheduleEvent(EVENT_SWEEP, 17s);
310 events.ScheduleEvent(EVENT_GRIP, 15s);
311 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 10s);
312 events.ScheduleEvent(EVENT_PREPARE_BREATH, 3s);
313 //events.ScheduleEvent(EVENT_ENRAGE, x); no info
314
316 me->setActive(true);
317 }
@ 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:1091

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.

209 {
210 if (cr->GetEntry() != NPC_LEFT_ARM && cr->GetEntry() != NPC_RIGHT_ARM)
212 }
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.

243 {
244 if (!urand(0, 2))
245 return;
246
247 Talk(SAY_SLAY);
248 }
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:207
Definition Unit.h:665
uint8 getStandState() const
Definition Unit.h:1783
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.

251 {
252 if (apply)
253 {
254 if (who->GetEntry() == NPC_LEFT_ARM)
255 _left = who->GetGUID();
256 else if (who->GetEntry() == NPC_RIGHT_ARM)
257 _right = who->GetGUID();
258 else
259 return;
260
261 who->SetOrientation(M_PI);
262 who->CastSpell(who, SPELL_ARM_RESPAWN_VISUAL, true);
263 return;
264 }
265
267 return;
268
269 // left arm
270 if (who->GetGUID() == _left)
271 {
272 _left.Clear();
273 if (me->IsInCombat())
274 {
276 events.ScheduleEvent(EVENT_RESTORE_ARM_LEFT, 50s);
277 }
278 }
279 else
280 {
281 _right.Clear();
282 if (me->IsInCombat())
283 {
285 events.ScheduleEvent(EVENT_RESTORE_ARM_RIGHT, 50s);
286 }
287 }
288
289 me->CastSpell(me, SPELL_ARM_DEAD, true);
290 if (!_right && !_left)
291 events.ScheduleEvent(EVENT_STONE_SHOUT, 5s);
292 }
@ 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:1796
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:1372
bool IsInCombat() const
Definition Unit.h:941

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 me->SetCorpseDelay(7 * DAY);
170
171 _Reset();
172
173 // Reset breath on pull
174 breathReady = false;
175 }
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:1761
void DisableRotate(bool apply)
Definition Unit.cpp:14145

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.

320 {
321 if (!UpdateVictim())
322 return;
323
324 events.Update(diff);
326 return;
327
328 switch (events.ExecuteEvent())
329 {
331 breathReady = true;
332 break;
334 if (_left || _right)
335 {
336 return;
337 }
338
340 events.ScheduleEvent(EVENT_STONE_SHOUT, 2s);
341 break;
342 case EVENT_SMASH:
343 if (_left && _right)
345 else if (_left || _right)
347
348 events.DelayEvents(1s);
349 events.ScheduleEvent(EVENT_SMASH, 14s);
350 return;
351 case EVENT_SWEEP:
352 if (_left)
353 {
355 cr->CastSpell(cr, SPELL_ARM_SWEEP, false);
356
357 if (urand(0, 1))
359 }
360
361 events.DelayEvents(1s);
362 events.ScheduleEvent(EVENT_SWEEP, 17s);
363 return;
364 case EVENT_GRIP:
365 events.ScheduleEvent(EVENT_GRIP, 25s);
366 if (!_right)
367 break;
368
372 return;
374 {
375 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 20s);
377 return;
378 }
380 // shouldn't happen
382 return;
384 // shouldn't happen
386 return;
387 }
388
389 //Make sure our attack is ready and we aren't currently casting before checking distance
390 if (me->isAttackReady() && me->GetVictim()) // victim could die by a spell (IMPORTANT!!!) and kologarn entered evade mode
391 {
392 //If we are within range melee the target
394 {
397 return;
398 }
399 else if (Unit* tgt = me->SelectNearbyTarget())
400 {
403 return;
404 }
405
406 if (breathReady)
409 }
410 }
@ 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:12989
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition Unit.cpp:790
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:2760
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition Unit.h:889
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition Unit.cpp:769
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2558
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: