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

Public Member Functions

 boss_uromAI (Creature *c)
 
uint8 GetPhaseByCurrentPosition ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *who) override
 
void JustSummoned (Creature *pSummon) override
 
void LeaveCombat ()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void SpellHit (Unit *, SpellInfo const *spell) override
 
void MoveInLineOfSight (Unit *) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void EnterEvadeMode (EvadeReason why) 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
 
virtual bool CanRespawn ()
 
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 SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (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.
 
virtual void JustReachedHome ()
 
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 void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
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 DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
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

InstanceScriptpInstance
 
EventMap events
 
bool lock
 
bool inCenter
 
float x
 
float y
 
float z
 
int32 releaseLockTimer
 
- 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 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 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_uromAI()

boss_urom::boss_uromAI::boss_uromAI ( Creature c)
inline
102 : ScriptedAI(c)
103 {
105 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
Definition ScriptedCreature.h:191
InstanceScript * pInstance
Definition boss_urom.cpp:107

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ AttackStart()

void boss_urom::boss_uromAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from UnitAI.

192 {
193 if (lock)
194 return;
195
196 if (me->GetDistance(1103.0f, 1049.0f, 510.0f) < 55.0f)
198 }
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1295
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
Creature * me
Definition ScriptedCreature.h:281
bool lock
Definition boss_urom.cpp:109

References ScriptedAI::AttackStart(), WorldObject::GetDistance(), lock, and ScriptedAI::me.

◆ EnterEvadeMode()

void boss_urom::boss_uromAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

372 {
373 // Block evade during outer platform transitions
374 if (lock)
375 return;
376
377 me->SetCanFly(false);
378 me->SetDisableGravity(false);
380 inCenter = false;
382 }
@ UNIT_STATE_ROOT
Definition UnitDefines.h:183
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:235
void SetCanFly(bool enable)
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition Unit.cpp:16522
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition Unit.cpp:14268
void SetDisableGravity(bool disable)
Definition Unit.cpp:16462
bool inCenter
Definition boss_urom.cpp:109

References CreatureAI::EnterEvadeMode(), inCenter, lock, ScriptedAI::me, Unit::SetCanFly(), Unit::SetControlled(), Unit::SetDisableGravity(), and UNIT_STATE_ROOT.

◆ GetPhaseByCurrentPosition()

uint8 boss_urom::boss_uromAI::GetPhaseByCurrentPosition ( )
inline
114 {
115 for (uint8 i = 0; i < 4; ++i)
116 if (me->GetDistance(cords[i][0], cords[i][1], cords[i][2]) < 20.0f)
117 return i;
118
119 return 0;
120 }
std::uint8_t uint8
Definition Define.h:109
float cords[5][4]
Definition boss_urom.cpp:78

References cords, WorldObject::GetDistance(), and ScriptedAI::me.

Referenced by JustEngagedWith(), and SpellHit().

◆ JustDied()

void boss_urom::boss_uromAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

220 {
222 if (pInstance)
223 {
225 }
226
227 // Body teleportation required only when boss is flying in the center
228 if (inCenter)
229 {
230 me->SetCanFly(false);
231 me->SetDisableGravity(false);
232 me->NearTeleportTo(x, y, z, 0.0f);
233 }
234 }
@ DONE
Definition InstanceScript.h:61
@ SAY_DEATH
Definition boss_urom.cpp:67
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition Unit.cpp:15921
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
Talk
Definition hyjal.cpp:82
@ DATA_UROM
Definition oculus.h:36
float z
Definition boss_urom.cpp:110
float x
Definition boss_urom.cpp:110
float y
Definition boss_urom.cpp:110

References DATA_UROM, DONE, inCenter, ScriptedAI::me, Unit::NearTeleportTo(), pInstance, SAY_DEATH, Unit::SetCanFly(), ZoneScript::SetData(), Unit::SetDisableGravity(), x, y, and z.

◆ JustEngagedWith()

void boss_urom::boss_uromAI::JustEngagedWith ( Unit )
inlineoverridevirtual

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

Reimplemented from CreatureAI.

145 {
146 if (lock)
147 return;
148
150 if (phase == 3)
151 {
153
154 if (pInstance)
156
158 me->SetHomePosition(cords[0][0], cords[0][1], cords[0][2], cords[0][3]);
161
162 events.RescheduleEvent(EVENT_FROSTBOMB, 7s, 11s);
163 events.RescheduleEvent(EVENT_TELEPORT_TO_CENTER, 30s, 35s);
164 events.RescheduleEvent(EVENT_TIME_BOMB, 20s, 25s);
165 }
166 else
167 {
168 lock = true;
169
170 switch (phase)
171 {
172 case 0:
176 break;
177 case 1:
181 break;
182 case 2:
186 break;
187 }
188 }
189 }
@ IN_PROGRESS
Definition InstanceScript.h:59
events
Definition boss_sartura.cpp:43
@ SAY_SUMMON_3
Definition boss_urom.cpp:63
@ SAY_AGGRO
Definition boss_urom.cpp:64
@ SAY_SUMMON_1
Definition boss_urom.cpp:61
@ SAY_SUMMON_2
Definition boss_urom.cpp:62
@ SPELL_SUMMON_MENAGERIE_2
Definition boss_urom.cpp:27
@ SPELL_SUMMON_MENAGERIE_3
Definition boss_urom.cpp:28
@ SPELL_EVOCATION
Definition boss_urom.cpp:25
@ SPELL_SUMMON_MENAGERIE_1
Definition boss_urom.cpp:26
@ EVENT_FROSTBOMB
Definition boss_urom.cpp:53
@ EVENT_TELEPORT_TO_CENTER
Definition boss_urom.cpp:54
@ EVENT_TIME_BOMB
Definition boss_urom.cpp:56
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2789
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:345
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4302
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Definition Unit.cpp:4326
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
uint8 GetPhaseByCurrentPosition()
Definition boss_urom.cpp:113

References Unit::CastSpell(), cords, DATA_UROM, EVENT_FROSTBOMB, EVENT_TELEPORT_TO_CENTER, EVENT_TIME_BOMB, Unit::FindCurrentSpellBySpellId(), GetPhaseByCurrentPosition(), IN_PROGRESS, Unit::InterruptNonMeleeSpells(), lock, ScriptedAI::me, pInstance, SAY_AGGRO, SAY_SUMMON_1, SAY_SUMMON_2, SAY_SUMMON_3, ZoneScript::SetData(), Creature::SetHomePosition(), Creature::SetInCombatWithZone(), SPELL_EVOCATION, SPELL_SUMMON_MENAGERIE_1, SPELL_SUMMON_MENAGERIE_2, and SPELL_SUMMON_MENAGERIE_3.

◆ JustSummoned()

void boss_urom::boss_uromAI::JustSummoned ( Creature pSummon)
inlineoverridevirtual

Reimplemented from CreatureAI.

201 {
202 pSummon->SetInCombatWithZone();
203 if (Unit* v = pSummon->SelectVictim())
204 if (pSummon->AI())
205 pSummon->AI()->AttackStart(v);
206 }
Unit * SelectVictim()
Definition Unit.cpp:11453
CreatureAI * AI() const
Definition Creature.h:143
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:28
Definition Unit.h:664

References Creature::AI(), UnitAI::AttackStart(), Creature::SelectVictim(), and Creature::SetInCombatWithZone().

◆ KilledUnit()

void boss_urom::boss_uromAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

237 {
239 }
@ SAY_PLAYER_KILL
Definition boss_urom.cpp:68

References SAY_PLAYER_KILL.

◆ LeaveCombat()

void boss_urom::boss_uromAI::LeaveCombat ( )
inline
209 {
212 me->CombatStop(true);
213 me->LoadCreaturesAddon(true);
214 me->SetLootRecipient(nullptr);
217 }
void EngagementOver()
Definition CreatureAI.cpp:298
bool LoadCreaturesAddon(bool reload=false)
Definition Creature.cpp:2680
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition Creature.cpp:1282
void ResetPlayerDamageReq()
Definition Creature.cpp:3772
void ClearAllThreat()
Definition ThreatManager.cpp:580
ThreatManager & GetThreatMgr()
Definition Unit.h:951
void RemoveAllAuras()
Definition Unit.cpp:5580
void CombatStop(bool includingCast=false, bool mutualPvP=true)
Definition Unit.cpp:7469

References ThreatManager::ClearAllThreat(), Unit::CombatStop(), CreatureAI::EngagementOver(), Unit::GetThreatMgr(), Creature::LoadCreaturesAddon(), ScriptedAI::me, Unit::RemoveAllAuras(), Creature::ResetPlayerDamageReq(), and Creature::SetLootRecipient().

Referenced by SpellHit(), and UpdateAI().

◆ MoveInLineOfSight()

void boss_urom::boss_uromAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

305{}

◆ Reset()

void boss_urom::boss_uromAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

123 {
124 if (pInstance)
125 {
129 else
131 }
132
134 events.Reset();
135 lock = false;
136 inCenter = false;
137 x = 0.0f;
138 y = 0.0f;
139 z = 0.0f;
141 me->ApplySpellImmune(0, IMMUNITY_ID, 49838, true);
142 }
@ NOT_STARTED
Definition InstanceScript.h:58
@ IMMUNITY_ID
Definition SharedDefines.h:1406
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:258
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition Unit.cpp:10437
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:748
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:51
@ DATA_VAROS
Definition oculus.h:35
int32 releaseLockTimer
Definition boss_urom.cpp:111

References Unit::ApplySpellImmune(), Unit::CastSpell(), DATA_UROM, DATA_VAROS, DONE, ZoneScript::GetData(), IMMUNITY_ID, inCenter, lock, ScriptedAI::me, NOT_STARTED, pInstance, releaseLockTimer, Unit::RemoveUnitFlag(), ZoneScript::SetData(), Unit::SetUnitFlag(), SPELL_EVOCATION, UNIT_FLAG_NON_ATTACKABLE, x, y, and z.

◆ SpellHit()

void boss_urom::boss_uromAI::SpellHit ( Unit ,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

242 {
243 switch (spell->Id)
244 {
246 {
247 for( uint8 i = 0; i < 4; ++i )
248 me->SummonCreature(summons[0][i], cords[0][0] + ((i % 2) ? 4.0f : -4.0f), cords[0][1] + (i < 2 ? 4.0f : -4.0f), cords[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
250 me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
252 LeaveCombat();
255 }
256 break;
258 {
259 for( uint8 i = 0; i < 4; ++i )
260 me->SummonCreature(summons[1][i], cords[1][0] + ((i % 2) ? 4.0f : -4.0f), cords[1][1] + (i < 2 ? 4.0f : -4.0f), cords[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
262 me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
264 LeaveCombat();
267 }
268 break;
270 {
271 for( uint8 i = 0; i < 4; ++i )
272 me->SummonCreature(summons[2][i], cords[2][0] + ((i % 2) ? 4.0f : -4.0f), cords[2][1] + (i < 2 ? 4.0f : -4.0f), cords[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
274 me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
276 LeaveCombat();
279 }
280 break;
281 case SPELL_TELEPORT:
284 me->StopMoving();
287 me->SetCanFly(true);
288 me->SetDisableGravity(true);
289 me->NearTeleportTo(1103.69f, 1048.76f, 512.279f, 1.16f);
290 inCenter = true;
291
294
295 //At this point we are still in casting state so we need to clear it for DoCastAOE not to fail
299 events.RescheduleEvent(EVENT_TELE_BACK, DUNGEON_MODE(9s, 7s));
300 default:
301 break;
302 }
303 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:51
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ EMOTE_ARCANE_EXPLOSION
Definition boss_urom.cpp:65
@ SAY_ARCANE_EXPLOSION
Definition boss_urom.cpp:66
@ SPELL_TELEPORT
Definition boss_urom.cpp:29
@ SPELL_EMPOWERED_ARCANE_EXPLOSION
Definition boss_urom.cpp:33
float summons[3][4]
Definition boss_urom.cpp:71
@ EVENT_TELE_BACK
Definition boss_urom.cpp:55
void MoveIdle()
Definition MotionMaster.cpp:234
void Clear(bool reset=true)
Definition MotionMaster.h:193
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:285
void ClearUnitState(uint32 f)
Definition Unit.h:737
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
void StopMoving()
Definition Unit.cpp:12997
void AddUnitState(uint32 f)
Definition Unit.h:735
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
void DestroyForVisiblePlayers()
Definition Object.cpp:2996
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition ScriptedCreature.h:392
void LeaveCombat()
Definition boss_urom.cpp:208

References Unit::AddUnitState(), Unit::CastSpell(), MotionMaster::Clear(), Unit::ClearUnitState(), cords, WorldObject::DestroyForVisiblePlayers(), UnitAI::DoCastAOE(), ScriptedAI::DUNGEON_MODE(), EMOTE_ARCANE_EXPLOSION, EVENT_TELE_BACK, Unit::GetMotionMaster(), GetPhaseByCurrentPosition(), SpellInfo::Id, inCenter, LeaveCombat(), ScriptedAI::me, MotionMaster::MoveIdle(), Unit::NearTeleportTo(), releaseLockTimer, SAY_ARCANE_EXPLOSION, Unit::SetCanFly(), Unit::SetControlled(), Unit::SetDisableGravity(), Creature::SetHomePosition(), Unit::SetUnitFlag(), SPELL_EMPOWERED_ARCANE_EXPLOSION, SPELL_EVOCATION, SPELL_SUMMON_MENAGERIE_1, SPELL_SUMMON_MENAGERIE_2, SPELL_SUMMON_MENAGERIE_3, SPELL_TELEPORT, Unit::StopMoving(), WorldObject::SummonCreature(), summons, TEMPSUMMON_TIMED_DESPAWN, UNIT_FLAG_NON_ATTACKABLE, UNIT_STATE_CASTING, and UNIT_STATE_ROOT.

◆ UpdateAI()

void boss_urom::boss_uromAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

308 {
310 {
311 if (releaseLockTimer >= 5000)
312 {
313 lock = false;
314 if (me->IsInCombat())
315 {
316 LeaveCombat();
318 }
320 }
321 else
322 releaseLockTimer += diff;
323 }
324
325 if (!UpdateVictim())
326 return;
327
328 events.Update(diff);
329
331 return;
332
334
335 switch (events.ExecuteEvent())
336 {
337 case 0:
338 break;
339 case EVENT_FROSTBOMB:
340 if (Unit* v = me->GetVictim())
341 me->CastSpell(v, SPELL_FROSTBOMB, false);
342 events.Repeat(7s, 11s);
343 break;
344 case EVENT_TIME_BOMB:
345 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
346 DoCast(target, SPELL_TIME_BOMB);
347 events.Repeat(20s, 25s);
348 break;
350 x = me->GetPositionX();
351 y = me->GetPositionY();
352 z = me->GetPositionZ();
353 me->CastSpell(me, SPELL_TELEPORT, false);
354 events.Repeat(25s, 30s);
355 events.DelayEvents(10s);
356 break;
357 case EVENT_TELE_BACK:
359 me->DisableSpline();
360 me->SetCanFly(false);
361 me->SetDisableGravity(false);
362 me->NearTeleportTo(x, y, z, 0.0f);
366 inCenter = false;
367 break;
368 }
369 }
@ SPELL_FROSTBOMB
Definition boss_urom.cpp:31
@ SPELL_TIME_BOMB
Definition boss_urom.cpp:32
bool UpdateVictim()
Definition CreatureAI.cpp:353
void MoveChase(Unit *target, std::optional< ChaseRange > dist={}, std::optional< ChaseAngle > angle={})
Force the unit to chase this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:315
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:40
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:111
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:178
void DisableSpline()
Definition Unit.cpp:755
Unit * GetVictim() const
Definition Unit.h:903
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
bool IsInCombat() const
Definition Unit.h:935
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122

References Unit::CastSpell(), Unit::DisableSpline(), UnitAI::DoCast(), UnitAI::DoMeleeAttackIfReady(), EVENT_FROSTBOMB, EVENT_TELE_BACK, EVENT_TELEPORT_TO_CENTER, EVENT_TIME_BOMB, Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVictim(), Unit::HasUnitState(), inCenter, Unit::IsInCombat(), LeaveCombat(), lock, ScriptedAI::me, MotionMaster::MoveChase(), MotionMaster::MoveIdle(), Unit::NearTeleportTo(), Random, releaseLockTimer, Unit::RemoveUnitFlag(), UnitAI::SelectTarget(), Unit::SetCanFly(), Unit::SetControlled(), Unit::SetDisableGravity(), SPELL_EVOCATION, SPELL_FROSTBOMB, SPELL_TELEPORT, SPELL_TIME_BOMB, UNIT_FLAG_NON_ATTACKABLE, UNIT_STATE_CASTING, UNIT_STATE_ROOT, CreatureAI::UpdateVictim(), x, y, and z.

Member Data Documentation

◆ events

EventMap boss_urom::boss_uromAI::events

◆ inCenter

bool boss_urom::boss_uromAI::inCenter

◆ lock

bool boss_urom::boss_uromAI::lock

◆ pInstance

InstanceScript* boss_urom::boss_uromAI::pInstance

◆ releaseLockTimer

int32 boss_urom::boss_uromAI::releaseLockTimer

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

◆ x

float boss_urom::boss_uromAI::x

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

◆ y

float boss_urom::boss_uromAI::y

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

◆ z

float boss_urom::boss_uromAI::z

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


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