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

Public Member Functions

 boss_freya (Creature *pCreature)
 
void Reset () override
 
void KilledUnit (Unit *victim) override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void SpellHit (Unit *, SpellInfo const *spellInfo) override
 
void SpawnWave ()
 
void DoAction (int32 param) override
 
uint32 GetData (uint32 param) const override
 
void JustReachedHome () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
bool CheckEvadeIfOutOfCombatArea () const override
 
void MovementInform (uint32 type, uint32 pointId) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (Position const *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
void DoTeleportAll (float x, float y, float z, float o)
 
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)
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
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 IsEscortNPC (bool=true) const
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual 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 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, int32 aura=0)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

uint8 _trioDown
 
uint8 _spawnedAmount
 
uint8 _setPermutation
 
uint8 _lumberjacked
 
bool _backToNature
 
uint8 _deforestation
 
uint8 _aliveAddsCount
 
ObjectGuid _elderGUID [3]
 
- 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)
 
virtual void MoveInLineOfSight (Unit *)
 
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_freya()

boss_freya::boss_freya ( Creature pCreature)
inline
243 : BossAI(pCreature, BOSS_FREYA)
244 {
245 if (!me->IsAlive())
247 }
@ DONE
Definition InstanceScript.h:61
Definition ScriptedCreature.h:485
InstanceScript *const instance
Definition ScriptedCreature.h:492
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:400
bool IsAlive() const
Definition Unit.h:1793
Creature * me
Definition ScriptedCreature.h:281
@ BOSS_FREYA
Definition ulduar.h:38

References BOSS_FREYA, DONE, BossAI::instance, Unit::IsAlive(), ScriptedAI::me, and InstanceScript::SetBossState().

Member Function Documentation

◆ CheckEvadeIfOutOfCombatArea()

bool boss_freya::CheckEvadeIfOutOfCombatArea ( ) const
inlineoverridevirtual

Reimplemented from ScriptedAI.

655 {
656 return me->GetPositionX() < 2135.0f;
657 }
float GetPositionX() const
Definition Position.h:121

References Position::GetPositionX(), and ScriptedAI::me.

◆ DamageTaken()

void boss_freya::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.

293 {
294 if (damage >= me->GetHealth())
295 {
296 damage = 0;
298 {
300
305 me->AttackStop();
306 events.Reset();
307
309 events.Reset();
310
311 uint8 _elderCount = 0;
312 for (uint8 i = 0; i < 3; ++i)
313 {
314 if (!_elderGUID[i])
315 continue;
316
318 e->DespawnOrUnsummon();
319
320 ++_elderCount;
321 }
322
323 // Summon the chest via spell so it is a wild object not owned by Freya,
324 // otherwise it despawns with her when she teleports out. The spell is
325 // chosen by raid size and how many Elders empowered her.
326 // Order intentionally differs from TC/cMaNGOS to match AC's even/odd chest-loot grouping.
327 static constexpr uint32 summonChestSpell[2][4] =
328 {
329 // 0 Elder, 1 Elder, 2 Elder, 3 Elder
330 { 62957, 62955, 62953, 62950 }, // 10-man
331 { 62958, 62956, 62954, 62952 } // 25-man
332 };
333
334 me->CastSpell(me, summonChestSpell[me->GetMap()->Is25ManRaid() ? 1 : 0][_elderCount], true);
335
336 // Defeat credit
337 me->CastSpell(me, 65074, true); // credit
339
340 scheduler.Schedule(14s, [this](TaskContext /*context*/)
341 {
343 });
344 }
345 }
346 }
std::uint8_t uint8
Definition Define.h:109
std::uint32_t uint32
Definition Define.h:107
@ FACTION_FRIENDLY
Definition SharedDefines.h:189
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:258
@ REACT_PASSIVE
Definition Unit.h:567
@ SAY_DEATH
Definition boss_freya.cpp:173
events
Definition boss_sartura.cpp:43
SummonList summons
Definition ScriptedCreature.h:539
TaskScheduler scheduler
Definition CreatureAI.h:74
Definition Creature.h:47
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:100
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
bool Is25ManRaid() const
Definition Map.h:304
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72
Definition TaskScheduler.h:422
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
Definition TaskScheduler.h:233
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:394
void SetFaction(uint32 faction)
Definition Unit.cpp:7117
uint32 GetHealth() const
Definition Unit.h:1109
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:1361
void RemoveAllAuras()
Definition Unit.cpp:5612
void SetUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7499
Map * GetMap() const
Definition Object.h:631
Talk
Definition hyjal.cpp:82
@ SPELL_TELEPORT
Definition karazhan.cpp:36
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234
ObjectGuid _elderGUID[3]
Definition boss_freya.cpp:257

References _elderGUID, Unit::AttackStop(), BOSS_FREYA, Unit::CastSpell(), SummonList::DespawnAll(), UnitAI::DoCastSelf(), DONE, FACTION_FRIENDLY, InstanceScript::GetBossState(), ObjectAccessor::GetCreature(), Unit::GetHealth(), WorldObject::GetMap(), BossAI::instance, Map::Is25ManRaid(), ScriptedAI::me, REACT_PASSIVE, Unit::RemoveAllAuras(), SAY_DEATH, TaskScheduler::Schedule(), CreatureAI::scheduler, InstanceScript::SetBossState(), Unit::SetFaction(), Creature::SetReactState(), Unit::SetUnitFlag(), SPELL_TELEPORT, BossAI::summons, and UNIT_FLAG_NON_ATTACKABLE.

◆ DoAction()

void boss_freya::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

393 {
394 if (param == ACTION_ADD_DIED)
395 {
396 if (--_aliveAddsCount == 0)
397 events.RescheduleEvent(EVENT_FREYA_ADDS_SPAM, 5s, 0, EVENT_PHASE_ADDS);
398
399 return;
400 }
401
402 if (param == ACTION_LUMBERJACKED)
403 {
405 if (_lumberjacked == 1)
407 else if (_lumberjacked == 3)
409 return;
410 }
411
412 if (param == ACTION_TRIO_MEMBER_DOWN)
413 {
414 // Once the whole trio is down none of them can come back, so the wave
415 // is decided here and only waits out the last member's revive window
416 if (++_trioDown >= 3)
417 events.RescheduleEvent(EVENT_FREYA_TRIO_WAVE_END, 11s);
418
419 return;
420 }
421
422 if (param == ACTION_TRIO_MEMBER_REVIVED)
423 {
424 --_trioDown;
425 return;
426 }
427
429 {
430 events.ScheduleEvent(EVENT_FREYA_NATURE_BOMB, 5s);
431 events.SetPhase(EVENT_PHASE_FINAL);
432 return;
433 }
434
435 // Deforestation Achievement Counter
436 if (param == ACTION_REMOVE_10_STACK)
437 {
439 if (_deforestation >= 6)
441 // do not return
442 }
443
444 // Back to Nature achievement - the dose reduction spell has already updated the aura
446 if (!aur || aur->GetStackAmount() < 25)
447 _backToNature = false;
448 }
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition DBCEnums.h:110
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
Definition DBCEnums.h:142
@ ACTION_TRIO_MEMBER_DOWN
Definition boss_freya.cpp:214
@ ACTION_LUMBERJACKED
Definition boss_freya.cpp:216
@ ACTION_REMOVE_10_STACK
Definition boss_freya.cpp:211
@ EVENT_PHASE_FINAL
Definition boss_freya.cpp:221
@ ACTION_TRIO_MEMBER_REVIVED
Definition boss_freya.cpp:218
@ CRITERIA_LUMBERJACKED
Definition boss_freya.cpp:227
@ EVENT_PHASE_ADDS
Definition boss_freya.cpp:220
@ ACTION_ADD_DIED
Definition boss_freya.cpp:217
@ ACTION_ATTUNED_TO_NATURE_REMOVED
Definition boss_freya.cpp:215
@ EVENT_FREYA_ADDS_SPAM
Definition boss_freya.cpp:125
@ EVENT_FREYA_NATURE_BOMB
Definition boss_freya.cpp:127
@ EVENT_FREYA_TRIO_WAVE_END
Definition boss_freya.cpp:134
@ SPELL_DEFORESTATION_CREDIT
Definition boss_freya.cpp:119
@ SPELL_ATTUNED_TO_NATURE
Definition boss_freya.cpp:38
Definition SpellAuras.h:87
uint8 GetStackAmount() const
Definition SpellAuras.h:148
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition InstanceScript.cpp:674
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition InstanceScript.cpp:683
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5877
uint8 _aliveAddsCount
Definition boss_freya.cpp:255
uint8 _deforestation
Definition boss_freya.cpp:254
uint8 _lumberjacked
Definition boss_freya.cpp:252
bool _backToNature
Definition boss_freya.cpp:253
uint8 _trioDown
Definition boss_freya.cpp:249

References _aliveAddsCount, _backToNature, _deforestation, _lumberjacked, _trioDown, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_TIMED_TYPE_EVENT, ACTION_ADD_DIED, ACTION_ATTUNED_TO_NATURE_REMOVED, ACTION_LUMBERJACKED, ACTION_REMOVE_10_STACK, ACTION_TRIO_MEMBER_DOWN, ACTION_TRIO_MEMBER_REVIVED, CRITERIA_LUMBERJACKED, InstanceScript::DoStartTimedAchievement(), InstanceScript::DoUpdateAchievementCriteria(), EVENT_FREYA_ADDS_SPAM, EVENT_FREYA_NATURE_BOMB, EVENT_FREYA_TRIO_WAVE_END, EVENT_PHASE_ADDS, EVENT_PHASE_FINAL, Unit::GetAura(), Aura::GetStackAmount(), BossAI::instance, ScriptedAI::me, SPELL_ATTUNED_TO_NATURE, and SPELL_DEFORESTATION_CREDIT.

◆ GetData()

uint32 boss_freya::GetData ( uint32  param) const
inlineoverridevirtual

Reimplemented from UnitAI.

451 {
452 if (param == DATA_GET_ELDER_COUNT)
453 {
454 uint8 _count = 0;
455 for (uint8 i = 0; i < 3; ++i)
456 if (_elderGUID[i])
457 ++_count;
458
459 return _count;
460 }
461 if (param == DATA_BACK_TO_NATURE)
462 return _backToNature;
463
464 if (param == DATA_TRIO_DOWN)
465 return _trioDown;
466
467 return 0;
468 }
@ DATA_BACK_TO_NATURE
Definition boss_freya.cpp:224
@ DATA_TRIO_DOWN
Definition boss_freya.cpp:225
@ DATA_GET_ELDER_COUNT
Definition boss_freya.cpp:223

References _backToNature, _elderGUID, _trioDown, DATA_BACK_TO_NATURE, DATA_GET_ELDER_COUNT, and DATA_TRIO_DOWN.

◆ JustEngagedWith()

void boss_freya::JustEngagedWith ( Unit )
inlineoverridevirtual

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

Reimplemented from CreatureAI.

473 {
474 me->setActive(true);
478 aur->SetStackAmount(150);
479
480 events.ScheduleEvent(EVENT_FREYA_ADDS_SPAM, 10s, 0, EVENT_PHASE_ADDS);
481 events.ScheduleEvent(EVENT_FREYA_LIFEBINDER, 30s);
482 events.ScheduleEvent(EVENT_FREYA_SUNBEAM, 17s);
483 events.ScheduleEvent(EVENT_FREYA_BERSERK, 10min);
484 events.SetPhase(EVENT_PHASE_ADDS);
485
488
489 // HARD MODE CHECKS
491 if (elder && elder->IsAlive())
492 {
493 events.ScheduleEvent(EVENT_FREYA_GROUND_TREMOR, 35s);
494 _elderGUID[0] = elder->GetGUID();
495 }
496
498 if (elder && elder->IsAlive())
499 {
500 events.ScheduleEvent(EVENT_FREYA_IRON_ROOT, 20s);
501 _elderGUID[1] = elder->GetGUID();
502 }
503
505 if (elder && elder->IsAlive())
506 {
507 events.ScheduleEvent(EVENT_FREYA_UNSTABLE_SUN_BEAM, 1min);
508 _elderGUID[2] = elder->GetGUID();
509 }
510
511 if (_elderGUID[0] || _elderGUID[1] || _elderGUID[2])
512 {
514
515 static constexpr uint32 essenceChannel[3] = { SPELL_STONEBARK_ESSENCE_CHANNEL,
517 static constexpr uint32 banishState[3] = { SPELL_GREEN_BANISH_STATE_LARGE,
519
520 for (uint8 i = 0; i < 3; ++i)
521 {
523 if (!elder)
524 continue;
525
526 elder->CastSpell(elder, SPELL_FULL_HEAL, true);
529 elder->SetInCombatWithZone();
530 elder->CastSpell(me, essenceChannel[i], false);
531 if (essenceChannel[i] == SPELL_STONEBARK_ESSENCE_CHANNEL)
532 elder->CastSpell(me, SPELL_STONEBARK_ESSENCE, true);
533 elder->CastSpell(elder, banishState[i], true);
534 }
535
536 // Freya stands still while the Elders channel their essences into her.
537 // The motion stop is deferred a tick because the engaging AttackStart
538 // issues its MoveChase after JustEngagedWith returns.
539 me->SetCombatMovement(false);
540 scheduler.Schedule(1ms, [this](TaskContext /*context*/)
541 {
542 // MoveIdle replaces the default waypoint generator (path 1365540),
543 // otherwise her conservatory patrol resumes once the chase is cleared
544 me->GetMotionMaster()->Clear();
545 me->GetMotionMaster()->MoveIdle();
546 me->StopMoving();
547 if (Unit* victim = me->GetVictim())
548 me->SetFacingToObject(victim);
549 });
550
551 scheduler.Schedule(5s, [this](TaskContext /*context*/)
552 {
553 me->SetCombatMovement(true);
555
556 for (ObjectGuid const& elderGuid : _elderGUID)
557 if (Creature* drained = ObjectAccessor::GetCreature(*me, elderGuid))
558 drained->CastSpell(drained, SPELL_DRAINED_OF_POWER, false);
559 });
560 }
561 else
562 {
564 }
565 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
@ EVENT_FREYA_LIFEBINDER
Definition boss_freya.cpp:126
@ EVENT_FREYA_BERSERK
Definition boss_freya.cpp:129
@ EVENT_FREYA_SUNBEAM
Definition boss_freya.cpp:128
@ EVENT_FREYA_GROUND_TREMOR
Definition boss_freya.cpp:131
@ EVENT_FREYA_UNSTABLE_SUN_BEAM
Definition boss_freya.cpp:133
@ EVENT_FREYA_IRON_ROOT
Definition boss_freya.cpp:132
@ SAY_AGGRO_WITH_ELDER
Definition boss_freya.cpp:171
@ SAY_AGGRO
Definition boss_freya.cpp:170
@ SPELL_IRONBRANCH_ESSENCE_CHANNEL
Definition boss_freya.cpp:68
@ SPELL_GREEN_BANISH_STATE_LARGE
Definition boss_freya.cpp:72
@ SPELL_BRIGHTLEAF_ESSENCE_CHANNEL
Definition boss_freya.cpp:69
@ SPELL_WHITE_BANISH_STATE_LARGE
Definition boss_freya.cpp:73
@ SPELL_DRAINED_OF_POWER
Definition boss_freya.cpp:66
@ SPELL_STONEBARK_ESSENCE_CHANNEL
Definition boss_freya.cpp:67
@ SPELL_PURPLE_BANISH_STATE
Definition boss_freya.cpp:74
@ SPELL_FULL_HEAL
Definition boss_freya.cpp:71
@ SPELL_STONEBARK_ESSENCE
Definition boss_freya.cpp:70
@ SPELL_TOUCH_OF_EONAR
Definition boss_freya.cpp:37
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2863
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3916
void ResumeChasingVictim()
Helper to resume chasing current victim.
Definition Creature.h:438
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:120
Definition ObjectGuid.h:121
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:114
Definition Unit.h:665
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16465
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:15137
void StopMoving()
Definition Unit.cpp:13034
Unit * GetVictim() const
Definition Unit.h:904
void setActive(bool isActiveObject)
Definition Object.cpp:1086
Definition ObjectAccessor.h:61
@ DATA_ELDER_BRIGHTLEAF
Definition ulduar.h:125
@ DATA_ELDER_IRONBRANCH
Definition ulduar.h:123
@ DATA_ELDER_STONEBARK
Definition ulduar.h:124

References _elderGUID, Unit::AddAura(), BOSS_FREYA, Unit::CastSpell(), DATA_ELDER_BRIGHTLEAF, DATA_ELDER_IRONBRANCH, DATA_ELDER_STONEBARK, DONE, EVENT_FREYA_ADDS_SPAM, EVENT_FREYA_BERSERK, EVENT_FREYA_GROUND_TREMOR, EVENT_FREYA_IRON_ROOT, EVENT_FREYA_LIFEBINDER, EVENT_FREYA_SUNBEAM, EVENT_FREYA_UNSTABLE_SUN_BEAM, EVENT_PHASE_ADDS, InstanceScript::GetBossState(), InstanceScript::GetCreature(), ObjectAccessor::GetCreature(), Object::GetGUID(), Unit::GetMotionMaster(), Unit::GetVictim(), IN_PROGRESS, BossAI::instance, Unit::IsAlive(), ScriptedAI::me, REACT_PASSIVE, Creature::ResumeChasingVictim(), SAY_AGGRO, SAY_AGGRO_WITH_ELDER, TaskScheduler::Schedule(), CreatureAI::scheduler, WorldObject::setActive(), InstanceScript::SetBossState(), Creature::SetCombatMovement(), Unit::SetFacingToObject(), Creature::SetInCombatWithZone(), Creature::SetReactState(), Unit::SetUnitFlag(), SPELL_ATTUNED_TO_NATURE, SPELL_BRIGHTLEAF_ESSENCE_CHANNEL, SPELL_DRAINED_OF_POWER, SPELL_FULL_HEAL, SPELL_GREEN_BANISH_STATE_LARGE, SPELL_IRONBRANCH_ESSENCE_CHANNEL, SPELL_PURPLE_BANISH_STATE, SPELL_STONEBARK_ESSENCE, SPELL_STONEBARK_ESSENCE_CHANNEL, SPELL_TOUCH_OF_EONAR, SPELL_WHITE_BANISH_STATE_LARGE, Unit::StopMoving(), and UNIT_FLAG_NOT_SELECTABLE.

◆ JustReachedHome()

void boss_freya::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

470{ _JustReachedHome(); me->setActive(false); }
void _JustReachedHome()
Definition ScriptedCreature.h:534

References BossAI::_JustReachedHome(), ScriptedAI::me, and WorldObject::setActive().

◆ KilledUnit()

void boss_freya::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

285 {
286 if (!victim->IsPlayer() || urand(0, 2))
287 return;
288
289 Talk(SAY_SLAY);
290 }
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ SAY_SLAY
Definition boss_freya.cpp:172
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), SAY_SLAY, and urand().

◆ MovementInform()

void boss_freya::MovementInform ( uint32  type,
uint32  pointId 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

660 {
661 if (type != WAYPOINT_MOTION_TYPE)
662 return;
663
665 if (!target)
666 return;
667
668 switch (pointId)
669 {
670 case WAYPOINT_GREEN:
672 break;
673 case WAYPOINT_YELLOW:
675 break;
676 case WAYPOINT_BLUE:
678 break;
679 default:
680 break;
681 }
682 }
@ WAYPOINT_MOTION_TYPE
Definition MotionMaster.h:41
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive)
Definition ScriptedCreature.cpp:933
@ WAYPOINT_YELLOW
Definition boss_freya.cpp:230
@ WAYPOINT_GREEN
Definition boss_freya.cpp:229
@ WAYPOINT_BLUE
Definition boss_freya.cpp:231
@ NPC_CHANNEL_STALKER_FREYA
Definition boss_freya.cpp:191
@ SPELL_FREYA_DUMMY_YELLOW
Definition boss_freya.cpp:62
@ SPELL_FREYA_DUMMY_BLUE
Definition boss_freya.cpp:63
@ SPELL_FREYA_DUMMY_GREEN
Definition boss_freya.cpp:61
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:179

References UnitAI::DoCast(), GetClosestCreatureWithEntry(), ScriptedAI::me, NPC_CHANNEL_STALKER_FREYA, SPELL_FREYA_DUMMY_BLUE, SPELL_FREYA_DUMMY_GREEN, SPELL_FREYA_DUMMY_YELLOW, WAYPOINT_BLUE, WAYPOINT_GREEN, WAYPOINT_MOTION_TYPE, and WAYPOINT_YELLOW.

◆ Reset()

void boss_freya::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

260 {
261 _Reset();
262 me->SetCombatMovement(true);
263
264 for (uint8 i = 0; i < 3; ++i)
265 {
266 if (!_elderGUID[i])
267 continue;
268
270 elder->AI()->EnterEvadeMode();
271
272 _elderGUID[i].Clear();
273 }
274
275 _lumberjacked = 0;
276 _spawnedAmount = 0;
277 _trioDown = 0;
278 _setPermutation = urand(0, 5);
279 _backToNature = true;
280 _deforestation = 0;
281 _aliveAddsCount = 0;
282 }
void _Reset()
Definition ScriptedCreature.cpp:644
void Clear()
Definition ObjectGuid.h:141
uint8 _setPermutation
Definition boss_freya.cpp:251
uint8 _spawnedAmount
Definition boss_freya.cpp:250

References _aliveAddsCount, _backToNature, _deforestation, _elderGUID, _lumberjacked, BossAI::_Reset(), _setPermutation, _spawnedAmount, _trioDown, ObjectGuid::Clear(), ObjectAccessor::GetCreature(), ScriptedAI::me, Creature::SetCombatMovement(), and urand().

◆ SpawnWave()

void boss_freya::SpawnWave ( )
inline
358 {
360
361 static constexpr uint8 permTable[6][3] = {
368 };
369
370 switch (permTable[_setPermutation][_spawnedAmount % 3])
371 {
372 case GROUP_TRIO:
375 _trioDown = 0;
376 break;
380 _aliveAddsCount += 1;
381 break;
382 case GROUP_LASHERS:
384 for (uint8 i = 0; i < 10; ++i)
386
387 _aliveAddsCount += 10;
388 break;
389 }
390 }
@ GROUP_TRIO
Definition boss_freya.cpp:236
@ GROUP_LASHERS
Definition boss_freya.cpp:238
@ GROUP_CONSERVATOR
Definition boss_freya.cpp:237
@ SAY_SUMMON_CONSERVATOR
Definition boss_freya.cpp:175
@ SAY_SUMMON_TRIO
Definition boss_freya.cpp:176
@ SAY_SUMMON_LASHERS
Definition boss_freya.cpp:177
@ EMOTE_ALLIES_OF_NATURE
Definition boss_freya.cpp:179
@ SPELL_SUMMON_WAVE_1
Definition boss_freya.cpp:43
@ SPELL_SUMMON_WAVE_3
Definition boss_freya.cpp:44
@ SPELL_SUMMON_WAVE_10
Definition boss_freya.cpp:45

References _aliveAddsCount, _setPermutation, _spawnedAmount, _trioDown, UnitAI::DoCast(), EMOTE_ALLIES_OF_NATURE, GROUP_CONSERVATOR, GROUP_LASHERS, GROUP_TRIO, SAY_SUMMON_CONSERVATOR, SAY_SUMMON_LASHERS, SAY_SUMMON_TRIO, SPELL_SUMMON_WAVE_1, SPELL_SUMMON_WAVE_10, and SPELL_SUMMON_WAVE_3.

Referenced by UpdateAI().

◆ SpellHit()

void boss_freya::SpellHit ( Unit ,
SpellInfo const *  spellInfo 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

349 {
350 if (spellInfo->Id == SPELL_TELEPORT)
351 {
354 }
355 }
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2199
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ EVENT_KEEPER_TELEPORTED
Definition ulduar.h:381

References Creature::DespawnOrUnsummon(), DONE, EVENT_KEEPER_TELEPORTED, SpellInfo::Id, BossAI::instance, ScriptedAI::me, ZoneScript::SetData(), and SPELL_TELEPORT.

◆ SpellHitTarget()

void boss_freya::SpellHitTarget ( Unit target,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

568 {
569 if (spell->Id == SPELL_NATURE_BOMB_FLIGHT)
570 me->SummonCreature(NPC_NATURE_BOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
571 }
@ NPC_NATURE_BOMB
Definition boss_freya.cpp:190
@ SPELL_NATURE_BOMB_FLIGHT
Definition boss_freya.cpp:47
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2448
float GetPositionZ() const
Definition Position.h:123
float GetPositionY() const
Definition Position.h:122

References Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), SpellInfo::Id, ScriptedAI::me, NPC_NATURE_BOMB, SPELL_NATURE_BOMB_FLIGHT, and WorldObject::SummonCreature().

◆ UpdateAI()

void boss_freya::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

574 {
575 scheduler.Update(diff);
576 if (!UpdateVictim())
577 return;
578
579 events.Update(diff);
581 return;
582
583 switch (events.ExecuteEvent())
584 {
586 if (_spawnedAmount < 6)
587 SpawnWave();
589 {
591 events.ScheduleEvent(EVENT_FREYA_NATURE_BOMB, 5s);
592 events.SetPhase(EVENT_PHASE_FINAL);
593 return;
594 }
596 events.Repeat(1min);
597 break;
601 events.Repeat(45s);
602 break;
605 me->CastSpell(target, SPELL_SUNBEAM, false);
606 events.Repeat(15s, 20s);
607 break;
609 // _trioDown stays set so a member resolving on this same tick
610 // still sees the trio as wiped and does not come back
611 _deforestation = 0;
612 events.RescheduleEvent(EVENT_FREYA_ADDS_SPAM, 5s, 0, EVENT_PHASE_ADDS);
613 break;
615 {
616 uint8 _minCount = me->GetMap()->Is25ManRaid() ? urand(7, 10) : urand(3, 4);
617 Map::PlayerList const& pList = me->GetMap()->GetPlayers();
618 for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
619 {
620 if (me->GetDistance(itr->GetSource()) > 70 || !itr->GetSource()->IsAlive())
621 continue;
622
623 me->CastSpell(itr->GetSource(), SPELL_NATURE_BOMB_FLIGHT, true);
624
625 if (!(--_minCount))
626 break;
627 }
628 events.Repeat(18s);
629 break;
630 }
633 me->CastSpell(me, SPELL_BERSERK, true);
634 break;
638 events.Repeat(25s, 35s);
639 break;
643 events.Repeat(45s, 55s);
644 break;
647 events.Repeat(38s, 48s);
648 break;
649 }
650
652 }
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:117
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ EMOTE_IRON_ROOTS
Definition boss_freya.cpp:181
@ EMOTE_GROUND_TREMOR
Definition boss_freya.cpp:180
@ EMOTE_LIFEBINDERS_GIFT
Definition boss_freya.cpp:178
@ SAY_BERSERK
Definition boss_freya.cpp:174
@ SPELL_SUNBEAM
Definition boss_freya.cpp:46
@ SPELL_LIFEBINDER_TRIGGER_MISSILE
Definition boss_freya.cpp:42
@ SPELL_IRON_ROOTS_FREYA
Definition boss_freya.cpp:54
@ SPELL_UNSTABLE_SUN_BEAM_FREYA
Definition boss_freya.cpp:56
@ SPELL_BERSERK
Definition boss_freya.cpp:50
@ SPELL_GROUND_TREMOR_FREYA
Definition boss_freya.cpp:53
bool UpdateVictim()
Definition CreatureAI.cpp:350
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:335
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:286
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:112
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5050
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1418
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1299
void SpawnWave()
Definition boss_freya.cpp:357

References _deforestation, _spawnedAmount, MapRefMgr::begin(), Unit::CastCustomSpell(), Unit::CastSpell(), UnitAI::DoCastAOE(), UnitAI::DoCastSelf(), UnitAI::DoMeleeAttackIfReady(), EMOTE_GROUND_TREMOR, EMOTE_IRON_ROOTS, EMOTE_LIFEBINDERS_GIFT, MapRefMgr::end(), EVENT_FREYA_ADDS_SPAM, EVENT_FREYA_BERSERK, EVENT_FREYA_GROUND_TREMOR, EVENT_FREYA_IRON_ROOT, EVENT_FREYA_LIFEBINDER, EVENT_FREYA_NATURE_BOMB, EVENT_FREYA_SUNBEAM, EVENT_FREYA_TRIO_WAVE_END, EVENT_FREYA_UNSTABLE_SUN_BEAM, EVENT_PHASE_ADDS, EVENT_PHASE_FINAL, Unit::GetAura(), WorldObject::GetDistance(), WorldObject::GetMap(), Map::GetPlayers(), Unit::HasUnitState(), Map::Is25ManRaid(), ScriptedAI::me, Random, Unit::RemoveAura(), SAY_BERSERK, CreatureAI::scheduler, UnitAI::SelectTarget(), SpawnWave(), SPELL_ATTUNED_TO_NATURE, SPELL_BERSERK, SPELL_GROUND_TREMOR_FREYA, SPELL_IRON_ROOTS_FREYA, SPELL_LIFEBINDER_TRIGGER_MISSILE, SPELL_NATURE_BOMB_FLIGHT, SPELL_SUNBEAM, SPELL_UNSTABLE_SUN_BEAM_FREYA, SPELLVALUE_MAX_TARGETS, UNIT_STATE_CASTING, TaskScheduler::Update(), CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ _aliveAddsCount

uint8 boss_freya::_aliveAddsCount

Referenced by DoAction(), Reset(), and SpawnWave().

◆ _backToNature

bool boss_freya::_backToNature

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

◆ _deforestation

uint8 boss_freya::_deforestation

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

◆ _elderGUID

ObjectGuid boss_freya::_elderGUID[3]

◆ _lumberjacked

uint8 boss_freya::_lumberjacked

Referenced by DoAction(), and Reset().

◆ _setPermutation

uint8 boss_freya::_setPermutation

Referenced by Reset(), and SpawnWave().

◆ _spawnedAmount

uint8 boss_freya::_spawnedAmount

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

◆ _trioDown

uint8 boss_freya::_trioDown

Referenced by DoAction(), GetData(), Reset(), and SpawnWave().


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