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. More...
 
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() More...
 
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) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
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. More...
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
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=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, 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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
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 ()
 
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)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, 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: More...
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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
 
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)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_uromAI()

boss_urom::boss_uromAI::boss_uromAI ( Creature c)
inline
103 : ScriptedAI(c)
104 {
106 }
Definition: ScriptedCreature.h:190
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * pInstance
Definition: boss_urom.cpp:108

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ AttackStart()

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

Reimplemented from ScriptedAI.

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

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

◆ EnterEvadeMode()

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

Reimplemented from CreatureAI.

364 {
365 me->SetCanFly(false);
366 me->SetDisableGravity(false);
369 }
@ UNIT_STATE_ROOT
Definition: UnitDefines.h:159
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING....
Definition: Creature.cpp:3192
bool SetCanFly(bool enable, bool packetOnly=false) override
Add the movement flag: MOVEMENTFLAGCAN_FLY. Generaly only use by players, allowing them to fly by pre...
Definition: Creature.cpp:3277
void SetControlled(bool apply, UnitState state, Unit *source=nullptr, bool isFear=false)
Definition: Unit.cpp:17990

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

◆ GetPhaseByCurrentPosition()

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

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

Referenced by JustEngagedWith(), and SpellHit().

◆ JustDied()

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

Reimplemented from ScriptedAI.

219 {
221 if (pInstance)
222 {
224 }
225 me->SetCanFly(false);
226 me->SetDisableGravity(false);
227 me->NearTeleportTo(x, y, z, 0.0f);
228 }
@ DONE
Definition: InstanceScript.h:60
@ SAY_DEATH
Definition: boss_urom.cpp:72
@ DATA_UROM
Definition: oculus.h:36
Talk
Definition: hyjal.cpp:82
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition: Unit.cpp:19937
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
float z
Definition: boss_urom.cpp:111
float x
Definition: boss_urom.cpp:111
float y
Definition: boss_urom.cpp:111

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

◆ JustEngagedWith()

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

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

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:58
@ SAY_SUMMON_3
Definition: boss_urom.cpp:68
@ SAY_AGGRO
Definition: boss_urom.cpp:69
@ SAY_SUMMON_1
Definition: boss_urom.cpp:66
@ SAY_SUMMON_2
Definition: boss_urom.cpp:67
@ 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:58
@ EVENT_TELEPORT_TO_CENTER
Definition: boss_urom.cpp:59
@ EVENT_TIME_BOMB
Definition: boss_urom.cpp:61
phase
Definition: boss_skadi.cpp:103
events
Definition: boss_sartura.cpp:43
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition: Creature.cpp:2806
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:337
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4111
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Definition: Unit.cpp:4126
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:1168
uint8 GetPhaseByCurrentPosition()
Definition: boss_urom.cpp:114

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 ScriptedAI.

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

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

◆ KilledUnit()

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

Reimplemented from ScriptedAI.

231 {
233 }
@ SAY_PLAYER_KILL
Definition: boss_urom.cpp:73

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);
216 }
void ClearAllThreat()
Definition: ThreatMgr.cpp:417
bool LoadCreaturesAddon(bool reload=false)
Definition: Creature.cpp:2705
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition: Creature.cpp:1315
void ResetPlayerDamageReq()
Definition: Creature.cpp:3804
void CombatStop(bool includingCast=false)
Definition: Unit.cpp:10398
void RemoveAllAuras()
Definition: Unit.cpp:5290
ThreatMgr & GetThreatMgr()
Definition: Unit.h:839

References ThreatMgr::ClearAllThreat(), Unit::CombatStop(), 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.

298{}

◆ Reset()

void boss_urom::boss_uromAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

124 {
125 if (pInstance)
126 {
130 else
132 }
133
135 events.Reset();
136 lock = 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:57
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ DATA_VAROS
Definition: oculus.h:35
@ IMMUNITY_ID
Definition: SharedDefines.h:1400
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13346
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:683
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition: Unit.h:684
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52
int32 releaseLockTimer
Definition: boss_urom.cpp:112

References Unit::ApplySpellImmune(), Unit::CastSpell(), DATA_UROM, DATA_VAROS, DONE, ZoneScript::GetData(), IMMUNITY_ID, 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 ScriptedAI.

236 {
237 switch (spell->Id)
238 {
240 {
241 for( uint8 i = 0; i < 4; ++i )
242 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);
244 me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
246 LeaveCombat();
249 }
250 break;
252 {
253 for( uint8 i = 0; i < 4; ++i )
254 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);
256 me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
258 LeaveCombat();
261 }
262 break;
264 {
265 for( uint8 i = 0; i < 4; ++i )
266 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);
268 me->SetHomePosition(cords[phase + 1][0], cords[phase + 1][1], cords[phase + 1][2], cords[phase + 1][3]);
270 LeaveCombat();
273 }
274 break;
275 case SPELL_TELEPORT:
278 me->StopMoving();
281 me->SetCanFly(true);
282 me->SetDisableGravity(true);
283 me->NearTeleportTo(1103.69f, 1048.76f, 512.279f, 1.16f);
284
287
288 //At this point we are still in casting state so we need to clear it for DoCastAOE not to fail
292 events.RescheduleEvent(EVENT_TELE_BACK, DUNGEON_MODE(9000, 7000));
293 default:
294 break;
295 }
296 }
@ UNIT_STATE_CASTING
Definition: UnitDefines.h:164
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ EMOTE_ARCANE_EXPLOSION
Definition: boss_urom.cpp:70
@ SAY_ARCANE_EXPLOSION
Definition: boss_urom.cpp:71
@ SPELL_EMPOWERED_ARCANE_EXPLOSION_N
Definition: boss_urom.cpp:34
@ SPELL_EMPOWERED_ARCANE_EXPLOSION_H
Definition: boss_urom.cpp:35
@ SPELL_TELEPORT
Definition: boss_urom.cpp:29
float summons[3][4]
Definition: boss_urom.cpp:76
@ EVENT_TELE_BACK
Definition: boss_urom.cpp:60
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:248
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:388
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:2355
void DestroyForNearbyPlayers()
Definition: Object.cpp:2942
void ClearUnitState(uint32 f)
Definition: Unit.h:674
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
void StopMoving()
Definition: Unit.cpp:16606
void AddUnitState(uint32 f)
Definition: Unit.h:672
void MoveIdle()
Definition: MotionMaster.cpp:232
void Clear(bool reset=true)
Definition: MotionMaster.h:165
void LeaveCombat()
Definition: boss_urom.cpp:208

References Unit::AddUnitState(), Unit::CastSpell(), MotionMaster::Clear(), Unit::ClearUnitState(), cords, WorldObject::DestroyForNearbyPlayers(), UnitAI::DoCastAOE(), ScriptedAI::DUNGEON_MODE(), EMOTE_ARCANE_EXPLOSION, EVENT_TELE_BACK, Unit::GetMotionMaster(), GetPhaseByCurrentPosition(), SpellInfo::Id, LeaveCombat(), ScriptedAI::me, MotionMaster::MoveIdle(), Unit::NearTeleportTo(), releaseLockTimer, SAY_ARCANE_EXPLOSION, Creature::SetCanFly(), Unit::SetControlled(), Creature::SetDisableGravity(), Creature::SetHomePosition(), Unit::SetUnitFlag(), SPELL_EMPOWERED_ARCANE_EXPLOSION_H, SPELL_EMPOWERED_ARCANE_EXPLOSION_N, 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()

Reimplemented from ScriptedAI.

301 {
303 {
304 if (releaseLockTimer >= 5000)
305 {
306 lock = false;
307 if (me->IsInCombat())
308 {
309 LeaveCombat();
311 }
313 }
314 else
315 releaseLockTimer += diff;
316 }
317
318 if (!UpdateVictim())
319 return;
320
321 events.Update(diff);
322
324 return;
325
327
328 switch (events.ExecuteEvent())
329 {
330 case 0:
331 break;
332 case EVENT_FROSTBOMB:
333 if (Unit* v = me->GetVictim())
334 me->CastSpell(v, SPELL_FROSTBOMB, false);
335 events.Repeat(7s, 11s);
336 break;
337 case EVENT_TIME_BOMB:
338 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
340 events.Repeat(20s, 25s);
341 break;
343 x = me->GetPositionX();
344 y = me->GetPositionY();
345 z = me->GetPositionZ();
346 me->CastSpell(me, SPELL_TELEPORT, false);
347 events.Repeat(25s, 30s);
348 events.DelayEvents(10s);
349 break;
350 case EVENT_TELE_BACK:
352 me->DisableSpline();
353 me->SetCanFly(false);
354 me->SetDisableGravity(false);
355 me->NearTeleportTo(x, y, z, 0.0f);
359 break;
360 }
361 }
@ SPELL_TIME_BOMB_H
Definition: boss_urom.cpp:33
@ SPELL_FROSTBOMB
Definition: boss_urom.cpp:31
@ SPELL_TIME_BOMB_N
Definition: boss_urom.cpp:32
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
bool UpdateVictim()
Definition: CreatureAI.cpp:269
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
void DisableSpline()
Definition: Unit.cpp:637
Unit * GetVictim() const
Definition: Unit.h:789
bool HasUnitState(const uint32 f) const
Definition: Unit.h:673
bool IsInCombat() const
Definition: Unit.h:820
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:313

References Unit::CastSpell(), Unit::DisableSpline(), UnitAI::DoCast(), UnitAI::DoMeleeAttackIfReady(), ScriptedAI::DUNGEON_MODE(), EVENT_FROSTBOMB, EVENT_TELE_BACK, EVENT_TELEPORT_TO_CENTER, EVENT_TIME_BOMB, Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVictim(), Unit::HasUnitState(), Unit::IsInCombat(), LeaveCombat(), lock, ScriptedAI::me, MotionMaster::MoveChase(), MotionMaster::MoveIdle(), Unit::NearTeleportTo(), releaseLockTimer, Unit::RemoveUnitFlag(), UnitAI::SelectTarget(), Creature::SetCanFly(), Unit::SetControlled(), Creature::SetDisableGravity(), SPELL_EVOCATION, SPELL_FROSTBOMB, SPELL_TELEPORT, SPELL_TIME_BOMB_H, SPELL_TIME_BOMB_N, 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

◆ 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().