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 EnterEvadeMode (EvadeReason why) 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 SummonedCreatureDespawn (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 (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
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)
 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:13089
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
163 {
165 arm->SetHealth(arm->GetMaxHealth());
167 {
168 accessory->AddUnitTypeMask(UNIT_MASK_ACCESSORY);
169 if (!me->HandleSpellClick(accessory, 0))
170 accessory->DespawnOrUnsummon();
171 else
172 {
173 _left = accessory->GetGUID();
174 accessory->SetOrientation(M_PI);
175 accessory->CastSpell(accessory, SPELL_ARM_RESPAWN_VISUAL, true);
176 }
177 }
178 }
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:56
@ UNIT_MASK_ACCESSORY
Definition UnitDefines.h:168
@ NPC_LEFT_ARM
Definition boss_kologarn.cpp:89
@ SPELL_ARM_RESPAWN_VISUAL
Definition boss_kologarn.cpp:62
Definition Creature.h:47
Definition Unit.h:664
bool HandleSpellClick(Unit *clicker, int8 seatId=-1)
Definition Unit.cpp:15493
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2394
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210
ObjectGuid _left
Definition boss_kologarn.cpp:129

References _left, ObjectAccessor::GetCreature(), Unit::HandleSpellClick(), ScriptedAI::me, NPC_LEFT_ARM, SPELL_ARM_RESPAWN_VISUAL, WorldObject::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, and UNIT_MASK_ACCESSORY.

Referenced by Reset(), SummonedCreatureDespawn(), and UpdateAI().

◆ AttachRightArm()

void boss_kologarn::AttachRightArm ( )
inline
181 {
183 arm->SetHealth(arm->GetMaxHealth());
185 {
186 accessory->AddUnitTypeMask(UNIT_MASK_ACCESSORY);
187 if (!me->HandleSpellClick(accessory, 1))
188 accessory->DespawnOrUnsummon();
189 else
190 {
191 _right = accessory->GetGUID();
192 accessory->SetOrientation(M_PI);
193 accessory->CastSpell(accessory, SPELL_ARM_RESPAWN_VISUAL, true);
194 }
195 }
196 }
@ NPC_RIGHT_ARM
Definition boss_kologarn.cpp:90
ObjectGuid _right
Definition boss_kologarn.cpp:129

References _right, ObjectAccessor::GetCreature(), Unit::HandleSpellClick(), ScriptedAI::me, NPC_RIGHT_ARM, SPELL_ARM_RESPAWN_VISUAL, WorldObject::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, and UNIT_MASK_ACCESSORY.

Referenced by Reset(), SummonedCreatureDespawn(), and UpdateAI().

◆ AttackStart()

void boss_kologarn::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from UnitAI.

250 {
251 me->Attack(who, true);
252 }
bool Attack(Unit *victim, bool meleeAttack)
Definition Unit.cpp:7272

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.

353 {
354 if (who && who->GetEntry() == me->GetEntry() && me->GetHealth())
355 {
356 damage = std::min(damage, me->GetHealth() - 1);
357 me->LowerPlayerDamageReq(damage);
358 }
359 }
void LowerPlayerDamageReq(uint32 unDamage, bool damagedByPlayer=true)
Definition Creature.cpp:3761
uint32 GetEntry() const
Definition Object.h:117
uint32 GetHealth() const
Definition Unit.h:1108

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

◆ DoAction()

void boss_kologarn::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

224 {
225 if (param == DATA_KOLOGARN_LOOKS_ACHIEV)
226 _looksAchievement = false;
227 if (param == DATA_KOLOGARN_RUBBLE_ACHIEV)
228 {
229 // Means arm died
230 if (instance && (!_left || !_right))
232
234 }
235 }
@ 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:670
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.

◆ EnterEvadeMode()

void boss_kologarn::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

150 {
152 return;
154 {
157 }
158 Reset();
159 me->setActive(false);
160 }
@ DONE
Definition InstanceScript.h:61
@ NOT_STARTED
Definition InstanceScript.h:58
bool _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:382
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:390
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
void SaveToDB()
Definition InstanceScript.cpp:41
void setActive(bool isActiveObject)
Definition Object.cpp:1082
void Reset() override
Definition boss_kologarn.cpp:198

References CreatureAI::_EnterEvadeMode(), BOSS_KOLOGARN, DONE, InstanceScript::GetBossState(), BossAI::instance, ScriptedAI::me, NOT_STARTED, Reset(), InstanceScript::SaveToDB(), WorldObject::setActive(), and InstanceScript::SetBossState().

◆ GetData()

uint32 boss_kologarn::GetData ( uint32  param) const
inlineoverridevirtual

Reimplemented from UnitAI.

238 {
239 if (param == DATA_KOLOGARN_LOOKS_ACHIEV)
240 return _looksAchievement;
241 else if (param == DATA_KOLOGARN_RUBBLE_ACHIEV)
242 return (_rubbleAchievement >= 5);
243 else if (param == DATA_KOLOGARN_ARMS_ACHIEV)
244 return !_rubbleAchievement;
245
246 return 0;
247 }
@ 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.

279 {
280 _JustDied();
281 me->StopMoving();
282
284
285 if (instance)
286 {
287 // Open the door inside Kologarn chamber
289 door->SetGoState(GO_STATE_ACTIVE);
290 }
291
293 bridge->SetGoState(GO_STATE_READY);
294
295 // Summon Chest
296 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))
297 {
298 me->RemoveGameObject(go, false);
299 go->SetSpellId(1); // hack to make it despawn
300 go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
301 go->SetLootRecipient(me);
302 }
304 arm->DespawnOrUnsummon(3s); // visual
306 arm->DespawnOrUnsummon(3s); // visual
308 me->SetDisableGravity(true);
309 }
@ GO_STATE_READY
Definition GameObjectData.h:709
@ GO_STATE_ACTIVE
Definition GameObjectData.h:708
GameObjectFlags
Definition SharedDefines.h:1608
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ SAY_DEATH
Definition boss_kologarn.cpp:37
void _JustDied()
Definition ScriptedCreature.cpp:664
Definition GameObject.h:120
GameObject * GetGameObject(uint32 type)
Definition InstanceScript.cpp:120
void RemoveGameObject(GameObject *gameObj, bool del)
Definition Unit.cpp:6566
void StopMoving()
Definition Unit.cpp:12997
void SetDisableGravity(bool disable)
Definition Unit.cpp:16462
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:748
GameObject * FindNearestGameObject(uint32 entry, float range, bool onlySpawned=false) const
Definition Object.cpp:2508
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:2408
Talk
Definition hyjal.cpp:82
const T & RAID_MODE(const T &normal10, const T &normal25) const
Definition ScriptedCreature.h:408
@ DATA_KOLOGARN_DOORS
Definition ulduar.h:92
@ GO_KOLOGARN_BRIDGE
Definition ulduar.h:259
@ GO_KOLOGARN_CHEST
Definition ulduar.h:224
@ GO_KOLOGARN_CHEST_HERO
Definition ulduar.h:225

References BossAI::_JustDied(), _left, _right, DATA_KOLOGARN_DOORS, WorldObject::FindNearestGameObject(), ObjectAccessor::GetCreature(), InstanceScript::GetGameObject(), GO_KOLOGARN_BRIDGE, GO_KOLOGARN_CHEST, GO_KOLOGARN_CHEST_HERO, GO_STATE_ACTIVE, GO_STATE_READY, BossAI::instance, 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.

362 {
363 if (instance)
365
366 events.ScheduleEvent(EVENT_SMASH, 8s);
367 events.ScheduleEvent(EVENT_SWEEP, 17s);
368 events.ScheduleEvent(EVENT_GRIP, 15s);
369 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 10s);
370 events.ScheduleEvent(EVENT_PREPARE_BREATH, 3s);
371 //events.ScheduleEvent(EVENT_ENRAGE, x); no info
372
374 me->setActive(true);
375
376 // Close the door inside Kologarn chamber
377 if (instance)
378 {
380 {
381 door->SetGoState(GO_STATE_READY);
382 }
383 }
384 }
@ 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

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

◆ JustSummoned()

void boss_kologarn::JustSummoned ( Creature cr)
inlineoverridevirtual

Reimplemented from CreatureAI.

255 {
256 if (cr->GetEntry() != NPC_LEFT_ARM && cr->GetEntry() != NPC_RIGHT_ARM)
258 }
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.

312 {
313 if (!urand(0, 2))
314 return;
315
316 Talk(SAY_SLAY);
317 }
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
virtual void MoveInLineOfSight(Unit *)
Definition CreatureAI.cpp:180
bool IsPlayer() const
Definition Object.h:201
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.

320 {
322 return;
323
324 if (!apply)
325 {
326 // left arm
327 if (who->GetGUID() == _left)
328 {
329 _left.Clear();
330 if (me->IsInCombat())
331 {
333 events.ScheduleEvent(EVENT_RESTORE_ARM_LEFT, 50s);
334 }
335 }
336 else
337 {
338 _right.Clear();
339 if (me->IsInCombat())
340 {
342 events.ScheduleEvent(EVENT_RESTORE_ARM_RIGHT, 50s);
343 }
344 }
345
346 me->CastSpell(me, SPELL_ARM_DEAD, true);
347 if (!_right && !_left)
348 events.ScheduleEvent(EVENT_STONE_SHOUT, 5s);
349 }
350 }
@ 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
void Clear()
Definition ObjectGuid.h:138
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:1350
bool IsInCombat() const
Definition Unit.h:935

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

◆ Reset()

void boss_kologarn::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

199 {
201 _looksAchievement = true;
202
204 me->SetDisableGravity(true);
205 me->DisableRotate(true);
206
207 _Reset();
208
209 if (instance)
210 {
211 // Open the door inside Kologarn chamber
213 door->SetGoState(GO_STATE_ACTIVE);
214 }
215
218
219 // Reset breath on pull
220 breathReady = false;
221 }
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:261
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
void DisableRotate(bool apply)
Definition Unit.cpp:14498
void AttachLeftArm()
Definition boss_kologarn.cpp:162
void AttachRightArm()
Definition boss_kologarn.cpp:180

References _looksAchievement, BossAI::_Reset(), _rubbleAchievement, AttachLeftArm(), AttachRightArm(), breathReady, DATA_KOLOGARN_DOORS, Unit::DisableRotate(), InstanceScript::GetGameObject(), Unit::GetMotionMaster(), GO_STATE_ACTIVE, BossAI::instance, ScriptedAI::me, MotionMaster::MoveTargetedHome(), and Unit::SetDisableGravity().

Referenced by EnterEvadeMode().

◆ SummonedCreatureDespawn()

void boss_kologarn::SummonedCreatureDespawn ( Creature cr)
inlineoverridevirtual

◆ UpdateAI()

void boss_kologarn::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

387 {
388 if (!UpdateVictim())
389 return;
390
391 events.Update(diff);
393 return;
394
395 switch (events.ExecuteEvent())
396 {
398 breathReady = true;
399 break;
401 if (_left || _right)
402 {
403 return;
404 }
405
407 events.ScheduleEvent(EVENT_STONE_SHOUT, 2s);
408 break;
409 case EVENT_SMASH:
410 if (_left && _right)
412 else if (_left || _right)
414
415 events.DelayEvents(1s);
416 events.ScheduleEvent(EVENT_SMASH, 14s);
417 return;
418 case EVENT_SWEEP:
419 if (_left)
420 {
422 cr->CastSpell(cr, SPELL_ARM_SWEEP, false);
423
424 if (urand(0, 1))
426 }
427
428 events.DelayEvents(1s);
429 events.ScheduleEvent(EVENT_SWEEP, 17s);
430 return;
431 case EVENT_GRIP:
432 events.ScheduleEvent(EVENT_GRIP, 25s);
433 if (!_right)
434 break;
435
439 return;
441 {
442 events.ScheduleEvent(EVENT_FOCUSED_EYEBEAM, 20s);
445 return;
446 }
448 // shouldn't happen
450 return;
452 // shouldn't happen
454 return;
455 }
456
457 //Make sure our attack is ready and we aren't currently casting before checking distance
458 if (me->isAttackReady() && me->GetVictim()) // victim could die by a spell (IMPORTANT!!!) and kologarn entered evade mode
459 {
460 //If we are within range melee the target
462 {
465 return;
466 }
467 else if (Unit* tgt = me->SelectNearbyTarget())
468 {
471 return;
472 }
473
474 if (breathReady)
477 }
478 }
@ 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
@ EMOTE_EYES
Definition boss_kologarn.cpp:40
bool UpdateVictim()
Definition CreatureAI.cpp:353
Unit * SelectNearbyTarget(Unit *exclude=nullptr, float dist=NOMINAL_MELEE_RANGE) const
Definition Unit.cpp:13347
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition Unit.cpp:782
Unit * GetVictim() const
Definition Unit.h:903
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
void AttackerStateUpdate(Unit *victim, WeaponAttackType attType=BASE_ATTACK, bool extra=false, bool ignoreCasting=false)
Definition Unit.cpp:2731
bool isAttackReady(WeaponAttackType type=BASE_ATTACK) const
Definition Unit.h:888
void resetAttackTimer(WeaponAttackType type=BASE_ATTACK)
Definition Unit.cpp:761
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2499

References _left, _right, AttachLeftArm(), AttachRightArm(), Unit::AttackerStateUpdate(), breathReady, Unit::CastSpell(), EMOTE_EYES, 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

Referenced by boss_kologarn().


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