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

Public Member Functions

 boss_novosAI (Creature *creature)
 
void Reset () override
 
uint32 GetData (uint32 data) const override
 
void SetData (uint32 type, uint32) override
 
void MoveInLineOfSight (Unit *) override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *killer) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *summon) override
 
void UpdateAI (uint32 diff) override
 
bool CheckEvadeIfOutOfCombatArea () const override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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
 
void UpdateAI (uint32 diff) override
 
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.
 
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 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 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
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.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
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.
 
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 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
 
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 ==================
 
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 ()
 
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 *)
 
- 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
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
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)
 
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 (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
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)
 
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)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always 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)
 
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
 

Private Attributes

uint8 _crystalCounter
 
uint8 _stage
 
ObjectGuid _summonTargetRightGUID
 
ObjectGuid _summonTargetLeftGUID
 
bool _achievement
 

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 ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
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)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_novosAI()

boss_novos::boss_novosAI::boss_novosAI ( Creature creature)
inline
84 : BossAI(creature, DATA_NOVOS)
85 {
86 }
@ DATA_NOVOS
Definition: drak_tharon_keep.h:32
Definition: ScriptedCreature.h:456

Member Function Documentation

◆ CheckEvadeIfOutOfCombatArea()

bool boss_novos::boss_novosAI::CheckEvadeIfOutOfCombatArea ( ) const
inlineoverridevirtual

Reimplemented from ScriptedAI.

250 {
251 return !SelectTargetFromPlayerList(80.0f);
252 }
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition: ScriptedCreature.cpp:526

References ScriptedAI::SelectTargetFromPlayerList().

◆ GetData()

uint32 boss_novos::boss_novosAI::GetData ( uint32  data) const
inlineoverridevirtual

Reimplemented from UnitAI.

106 {
107 if (data == me->GetEntry())
108 return uint32(_achievement);
109 return 0;
110 }
std::uint32_t uint32
Definition: Define.h:108
Creature * me
Definition: ScriptedCreature.h:282
uint32 GetEntry() const
Definition: Object.h:109
bool _achievement
Definition: boss_novos.cpp:260

References _achievement, Object::GetEntry(), and ScriptedAI::me.

◆ JustDied()

void boss_novos::boss_novosAI::JustDied ( Unit killer)
inlineoverridevirtual

Reimplemented from BossAI.

159 {
161 BossAI::JustDied(killer);
163 }
@ DONE
Definition: InstanceScript.h:59
@ SAY_DEATH
Definition: boss_novos.cpp:26
@ DATA_NOVOS_CRYSTALS
Definition: drak_tharon_keep.h:33
Talk
Definition: boss_fathomlord_karathress.cpp:23
InstanceScript *const instance
Definition: ScriptedCreature.h:461
void JustDied(Unit *) override
Definition: ScriptedCreature.h:484
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:317

References DATA_NOVOS_CRYSTALS, DONE, BossAI::instance, BossAI::JustDied(), SAY_DEATH, and InstanceScript::SetBossState().

◆ JustEngagedWith()

void boss_novos::boss_novosAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

121 {
124
125 events.ScheduleEvent(EVENT_SUMMON_FETID_TROLL, 3s);
126 events.ScheduleEvent(EVENT_SUMMON_SHADOWCASTER, 9s);
127 events.ScheduleEvent(EVENT_SUMMON_HULKING_CORPSE, 30s);
128 events.ScheduleEvent(EVENT_SUMMON_CRYSTAL_HANDLER, 20s);
129 events.ScheduleEvent(EVENT_CHECK_PHASE, 80s);
130
134
135 for (auto itr : npcSummon)
136 {
137 uint32 summonEntry;
138 Position summonPos;
139 std::tie(summonEntry, summonPos) = itr.second;
140 if (Creature* creature = me->SummonCreature(summonEntry, summonPos))
141 switch (itr.first)
142 {
143 case ROOM_LEFT:
144 _summonTargetLeftGUID = creature->GetGUID();
145 break;
146 case ROOM_RIGHT:
147 _summonTargetRightGUID = creature->GetGUID();
148 break;
149 }
150 }
151
156 }
@ UNIT_FIELD_TARGET
Definition: UpdateFields.h:92
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ UNIT_FLAG_NOT_SELECTABLE
Definition: Unit.h:473
events
Definition: boss_sartura.cpp:43
@ ROOM_LEFT
Definition: boss_novos.cpp:66
@ EVENT_SUMMON_FETID_TROLL
Definition: boss_novos.cpp:56
@ ROOM_RIGHT
Definition: boss_novos.cpp:65
@ EVENT_CHECK_PHASE
Definition: boss_novos.cpp:62
@ EVENT_SUMMON_CRYSTAL_HANDLER
Definition: boss_novos.cpp:59
@ EVENT_SUMMON_SHADOWCASTER
Definition: boss_novos.cpp:57
@ EVENT_SUMMON_HULKING_CORPSE
Definition: boss_novos.cpp:58
@ SAY_AGGRO
Definition: boss_novos.cpp:24
std::unordered_map< uint32, std::tuple< uint32, Position > > const npcSummon
Definition: boss_novos.cpp:70
@ SPELL_ARCANE_FIELD
Definition: boss_novos.cpp:36
@ SPELL_DESPAWN_CRYSTAL_HANDLER
Definition: boss_novos.cpp:41
@ SPELL_ARCANE_BLAST
Definition: boss_novos.cpp:35
void JustEngagedWith(Unit *) override
Called for reaction when initially engaged.
Definition: ScriptedCreature.h:483
Definition: Creature.h:46
void SetGuidValue(uint16 index, ObjectGuid value)
Definition: Object.cpp:723
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:2318
static ObjectGuid const Empty
Definition: ObjectGuid.h:122
Definition: Position.h:28
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:1169
void RemoveAllAuras()
Definition: Unit.cpp:5239
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1481
ObjectGuid _summonTargetLeftGUID
Definition: boss_novos.cpp:258
ObjectGuid _summonTargetRightGUID
Definition: boss_novos.cpp:257

References _summonTargetLeftGUID, _summonTargetRightGUID, Unit::CastSpell(), ObjectGuid::Empty, EVENT_CHECK_PHASE, EVENT_SUMMON_CRYSTAL_HANDLER, EVENT_SUMMON_FETID_TROLL, EVENT_SUMMON_HULKING_CORPSE, EVENT_SUMMON_SHADOWCASTER, BossAI::JustEngagedWith(), ScriptedAI::me, npcSummon, Unit::RemoveAllAuras(), ROOM_LEFT, ROOM_RIGHT, SAY_AGGRO, Object::SetGuidValue(), Unit::SetUnitFlag(), SPELL_ARCANE_BLAST, SPELL_ARCANE_FIELD, SPELL_DESPAWN_CRYSTAL_HANDLER, WorldObject::SummonCreature(), UNIT_FIELD_TARGET, UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.

◆ JustSummoned()

void boss_novos::boss_novosAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

175 {
176 summons.Summon(summon);
179 else if (summon->GetEntry() != NPC_CRYSTAL_CHANNEL_TARGET)
180 summon->SetInCombatWithZone();
181 }
@ REACT_DEFENSIVE
Definition: Unit.h:1024
@ NPC_CRYSTAL_CHANNEL_TARGET
Definition: boss_novos.cpp:52
@ NPC_CRYSTAL_HANDLER
Definition: boss_novos.cpp:53
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
SummonList summons
Definition: ScriptedCreature.h:497
void SetInCombatWithZone()
Definition: Creature.cpp:2723
void SetReactState(ReactStates st)
Definition: Creature.h:89
bool HasUnitFlag(UnitFlags flags) const
Definition: Unit.h:1480

References Object::GetEntry(), Unit::HasUnitFlag(), ScriptedAI::me, NPC_CRYSTAL_CHANNEL_TARGET, NPC_CRYSTAL_HANDLER, REACT_DEFENSIVE, Creature::SetInCombatWithZone(), Creature::SetReactState(), SummonList::Summon(), BossAI::summons, and UNIT_FLAG_NOT_SELECTABLE.

◆ KilledUnit()

void boss_novos::boss_novosAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

166 {
167 if (events.GetNextEventTime(EVENT_KILL_TALK) == 0)
168 {
169 Talk(SAY_KILL);
170 events.ScheduleEvent(EVENT_KILL_TALK, 6s);
171 }
172 }
@ EVENT_KILL_TALK
Definition: boss_novos.cpp:61
@ SAY_KILL
Definition: boss_novos.cpp:25

References EVENT_KILL_TALK, and SAY_KILL.

◆ MoveInLineOfSight()

void boss_novos::boss_novosAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

118{ }

◆ Reset()

void boss_novos::boss_novosAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

89 {
96 _stage = 0;
97
101
102 _achievement = true;
103 }
@ UNIT_FLAG_DISABLE_MOVE
Definition: Unit.h:450
@ IN_PROGRESS
Definition: InstanceScript.h:57
@ NOT_STARTED
Definition: InstanceScript.h:56
void Reset() override
Definition: ScriptedCreature.h:482
void Clear()
Definition: ObjectGuid.h:140
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1482
uint8 _stage
Definition: boss_novos.cpp:256
uint8 _crystalCounter
Definition: boss_novos.cpp:255

References _achievement, _crystalCounter, _stage, _summonTargetLeftGUID, _summonTargetRightGUID, ObjectGuid::Clear(), DATA_NOVOS_CRYSTALS, IN_PROGRESS, BossAI::instance, ScriptedAI::me, NOT_STARTED, Unit::RemoveUnitFlag(), BossAI::Reset(), InstanceScript::SetBossState(), Unit::SetUnitFlag(), UNIT_FLAG_DISABLE_MOVE, UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.

◆ SetData()

void boss_novos::boss_novosAI::SetData ( uint32  type,
uint32   
)
inlineoverridevirtual

Reimplemented from UnitAI.

113 {
114 if (type == me->GetEntry())
115 _achievement = false;
116 }

References _achievement, Object::GetEntry(), and ScriptedAI::me.

◆ UpdateAI()

void boss_novos::boss_novosAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

184 {
185 if (!UpdateVictim())
186 return;
187
188 events.Update(diff);
189 switch (events.ExecuteEvent())
190 {
193 trigger->CastSpell(trigger, SPELL_SUMMON_FETID_TROLL_CORPSE, true, nullptr, nullptr, me->GetGUID());
194 events.ScheduleEvent(EVENT_SUMMON_FETID_TROLL, 3s);
195 break;
198 trigger->CastSpell(trigger, SPELL_SUMMON_HULKING_CORPSE, true, nullptr, nullptr, me->GetGUID());
199 events.ScheduleEvent(EVENT_SUMMON_HULKING_CORPSE, 30s);
200 break;
203 trigger->CastSpell(trigger, SPELL_SUMMON_RISEN_SHADOWCASTER, true, nullptr, nullptr, me->GetGUID());
204 events.ScheduleEvent(EVENT_SUMMON_SHADOWCASTER, 10s);
205 break;
207 if (_crystalCounter++ < 4)
208 {
212 target->CastSpell(target, SPELL_SUMMON_CRYSTAL_HANDLER, true, nullptr, nullptr, me->GetGUID());
213 _stage = _stage ? 0 : 1;
214 events.ScheduleEvent(EVENT_SUMMON_CRYSTAL_HANDLER, 20s);
215 }
216 break;
219 {
220 events.ScheduleEvent(EVENT_CHECK_PHASE, 2s);
221 break;
222 }
223 events.Reset();
224 events.ScheduleEvent(EVENT_CAST_OFFENSIVE_SPELL, 3s);
225 events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 10s);
229 break;
232 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
234
235 events.ScheduleEvent(EVENT_CAST_OFFENSIVE_SPELL, 500ms);
236 break;
239 {
241 events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 15s);
242 break;
243 }
244 events.ScheduleEvent(EVENT_SPELL_SUMMON_MINIONS, 500ms);
245 break;
246 }
247 }
static First const & RAND(First const &first, Second const &second, Rest const &... rest)
Definition: CreatureAIImpl.h:30
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ EVENT_SPELL_SUMMON_MINIONS
Definition: boss_novos.cpp:63
@ EVENT_CAST_OFFENSIVE_SPELL
Definition: boss_novos.cpp:60
@ EMOTE_SUMMONING_ADDS
Definition: boss_novos.cpp:29
@ SAY_SUMMONING_ADDS
Definition: boss_novos.cpp:27
@ SPELL_FROSTBOLT
Definition: boss_novos.cpp:46
@ SPELL_SUMMON_CRYSTAL_HANDLER
Definition: boss_novos.cpp:40
@ SPELL_SUMMON_FETID_TROLL_CORPSE
Definition: boss_novos.cpp:37
@ SPELL_BLIZZARD
Definition: boss_novos.cpp:45
@ SPELL_BEAM_CHANNEL
Definition: boss_novos.cpp:34
@ SPELL_TOUCH_OF_MISERY
Definition: boss_novos.cpp:47
@ SPELL_SUMMON_RISEN_SHADOWCASTER
Definition: boss_novos.cpp:39
@ SPELL_SUMMON_MINIONS
Definition: boss_novos.cpp:43
@ SPELL_SUMMON_HULKING_CORPSE
Definition: boss_novos.cpp:38
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:111
bool UpdateVictim()
Definition: CreatureAI.cpp:269
Creature * GetCreatureWithEntry(uint32 entry) const
Definition: ScriptedCreature.cpp:128
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Definition: Unit.h:1290
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4069
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5610
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398

References _crystalCounter, _stage, _summonTargetLeftGUID, _summonTargetRightGUID, Unit::CastSpell(), EMOTE_SUMMONING_ADDS, EVENT_CAST_OFFENSIVE_SPELL, EVENT_CHECK_PHASE, EVENT_SPELL_SUMMON_MINIONS, EVENT_SUMMON_CRYSTAL_HANDLER, EVENT_SUMMON_FETID_TROLL, EVENT_SUMMON_HULKING_CORPSE, EVENT_SUMMON_SHADOWCASTER, ObjectAccessor::GetCreature(), SummonList::GetCreatureWithEntry(), Object::GetGUID(), Unit::HasAura(), Unit::HasUnitState(), Unit::InterruptNonMeleeSpells(), ScriptedAI::me, NPC_CRYSTAL_CHANNEL_TARGET, RAND(), Unit::RemoveUnitFlag(), SAY_SUMMONING_ADDS, UnitAI::SelectTarget(), SPELL_BEAM_CHANNEL, SPELL_BLIZZARD, SPELL_FROSTBOLT, SPELL_SUMMON_CRYSTAL_HANDLER, SPELL_SUMMON_FETID_TROLL_CORPSE, SPELL_SUMMON_HULKING_CORPSE, SPELL_SUMMON_MINIONS, SPELL_SUMMON_RISEN_SHADOWCASTER, SPELL_TOUCH_OF_MISERY, BossAI::summons, UNIT_FLAG_NON_ATTACKABLE, UNIT_FLAG_NOT_SELECTABLE, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _achievement

bool boss_novos::boss_novosAI::_achievement
private

Referenced by GetData(), Reset(), and SetData().

◆ _crystalCounter

uint8 boss_novos::boss_novosAI::_crystalCounter
private

Referenced by Reset(), and UpdateAI().

◆ _stage

uint8 boss_novos::boss_novosAI::_stage
private

Referenced by Reset(), and UpdateAI().

◆ _summonTargetLeftGUID

ObjectGuid boss_novos::boss_novosAI::_summonTargetLeftGUID
private

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

◆ _summonTargetRightGUID

ObjectGuid boss_novos::boss_novosAI::_summonTargetRightGUID
private

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