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)
 
Unit * DoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
Player * GetPlayerAtMinimumRange (float minRange)
 
Creature * DoSpawnCreature (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
 
Player * SelectTargetFromPlayerList (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)
 
WorldObject * GetSummoner () 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
 
Unit * SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
Unit * SelectTarget (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 OnDespawn ()
 Called when the unit is about to be removed from the world (despawn, grid unload, corpse disappearing, player logging out etc.)
 
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
 
uint8 _currentSetId
 
uint8 _currentTrioDown
 
uint8 _trioWaveEndSetId
 
ObjectGuid _elderGUID [3]
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creature * me
 

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 AISpellInfoType * AISpellInfo
 
- 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)
 
Creature * DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummonFlyer (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:1796
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.

686 {
687 return me->GetPositionX() < 2135.0f;
688 }
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.

299 {
300 if (damage >= me->GetHealth())
301 {
302 damage = 0;
304 {
306
311 me->AttackStop();
312 events.Reset();
313
315 events.Reset();
316
317 uint8 _elderCount = 0;
318 for (uint8 i = 0; i < 3; ++i)
319 {
320 if (!_elderGUID[i])
321 continue;
322
324 e->DespawnOrUnsummon();
325
326 ++_elderCount;
327 }
328
329 // Summon the chest via spell so it is a wild object not owned by Freya,
330 // otherwise it despawns with her when she teleports out. The spell is
331 // chosen by raid size and how many Elders empowered her.
332 // Order intentionally differs from TC/cMaNGOS to match AC's even/odd chest-loot grouping.
333 static constexpr uint32 summonChestSpell[2][4] =
334 {
335 // 0 Elder, 1 Elder, 2 Elder, 3 Elder
336 { 62957, 62955, 62953, 62950 }, // 10-man
337 { 62958, 62956, 62954, 62952 } // 25-man
338 };
339
340 me->CastSpell(me, summonChestSpell[me->GetMap()->Is25ManRaid() ? 1 : 0][_elderCount], true);
341
342 // Defeat credit
343 me->CastSpell(me, 65074, true); // credit
345
346 scheduler.Schedule(14s, [this](TaskContext /*context*/)
347 {
349 });
350 }
351 }
352 }
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:171
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:399
void SetFaction(uint32 faction)
Definition Unit.cpp:6850
uint32 GetHealth() const
Definition Unit.h:1114
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:1372
void RemoveAllAuras()
Definition Unit.cpp:5359
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:7240
Map * GetMap() const
Definition Object.h:637
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:260

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.

405 {
406 if (param == ACTION_ADD_DIED)
407 {
408 if (--_aliveAddsCount == 0)
409 events.RescheduleEvent(EVENT_FREYA_ADDS_SPAM, 5s, 0, EVENT_PHASE_ADDS);
410
411 return;
412 }
413
414 if (param == ACTION_LUMBERJACKED)
415 {
417 if (_lumberjacked == 1)
419 else if (_lumberjacked == 3)
421 return;
422 }
423
424 if (param == ACTION_TRIO_MEMBER_DOWN)
425 {
426 // A full wipe must reset Deforestation even if the set is stale;
427 // only the wave acceleration is gated to the current set below.
428 if (++_trioDown >= 3)
429 events.RescheduleEvent(EVENT_FREYA_TRIO_WAVE_END, 11s);
430 return;
431 }
432
434 {
435 if (++_currentTrioDown >= 3)
437 return;
438 }
439
440 if (param == ACTION_TRIO_MEMBER_REVIVED)
441 {
442 --_trioDown;
443 return;
444 }
445
447 {
449 return;
450 }
451
453 {
454 events.ScheduleEvent(EVENT_FREYA_NATURE_BOMB, 5s);
455 events.SetPhase(EVENT_PHASE_FINAL);
456 return;
457 }
458
459 // Deforestation Achievement Counter
460 if (param == ACTION_REMOVE_10_STACK)
461 {
463 if (_deforestation >= 6)
465 // do not return
466 }
467
468 // Back to Nature achievement - the dose reduction spell has already updated the aura
470 if (!aur || aur->GetStackAmount() < 25)
471 _backToNature = false;
472 }
@ 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:211
@ ACTION_LUMBERJACKED
Definition boss_freya.cpp:215
@ ACTION_TRIO_MEMBER_REVIVED_CURRENT
Definition boss_freya.cpp:214
@ ACTION_TRIO_MEMBER_DOWN_CURRENT
Definition boss_freya.cpp:213
@ ACTION_REMOVE_10_STACK
Definition boss_freya.cpp:208
@ EVENT_PHASE_FINAL
Definition boss_freya.cpp:220
@ ACTION_TRIO_MEMBER_REVIVED
Definition boss_freya.cpp:217
@ CRITERIA_LUMBERJACKED
Definition boss_freya.cpp:227
@ EVENT_PHASE_ADDS
Definition boss_freya.cpp:219
@ ACTION_ADD_DIED
Definition boss_freya.cpp:216
@ ACTION_ATTUNED_TO_NATURE_REMOVED
Definition boss_freya.cpp:212
@ 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:88
uint8 GetStackAmount() const
Definition SpellAuras.h:149
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:5624
uint8 _aliveAddsCount
Definition boss_freya.cpp:255
uint8 _deforestation
Definition boss_freya.cpp:254
uint8 _lumberjacked
Definition boss_freya.cpp:252
uint8 _currentTrioDown
Definition boss_freya.cpp:257
bool _backToNature
Definition boss_freya.cpp:253
uint8 _currentSetId
Definition boss_freya.cpp:256
uint8 _trioWaveEndSetId
Definition boss_freya.cpp:258
uint8 _trioDown
Definition boss_freya.cpp:249

References _aliveAddsCount, _backToNature, _currentSetId, _currentTrioDown, _deforestation, _lumberjacked, _trioDown, _trioWaveEndSetId, 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_DOWN_CURRENT, ACTION_TRIO_MEMBER_REVIVED, ACTION_TRIO_MEMBER_REVIVED_CURRENT, 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.

475 {
476 if (param == DATA_GET_ELDER_COUNT)
477 {
478 uint8 _count = 0;
479 for (uint8 i = 0; i < 3; ++i)
480 if (_elderGUID[i])
481 ++_count;
482
483 return _count;
484 }
485 if (param == DATA_BACK_TO_NATURE)
486 return _backToNature;
487
488 if (param == DATA_TRIO_DOWN)
489 return _trioDown;
490
491 if (param == DATA_CURRENT_SET_ID)
492 return _currentSetId;
493
494 return 0;
495 }
@ DATA_BACK_TO_NATURE
Definition boss_freya.cpp:223
@ DATA_TRIO_DOWN
Definition boss_freya.cpp:224
@ DATA_CURRENT_SET_ID
Definition boss_freya.cpp:225
@ DATA_GET_ELDER_COUNT
Definition boss_freya.cpp:222

References _backToNature, _currentSetId, _elderGUID, _trioDown, DATA_BACK_TO_NATURE, DATA_CURRENT_SET_ID, 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.

500 {
501 me->setActive(true);
505 aur->SetStackAmount(150);
506
507 events.ScheduleEvent(EVENT_FREYA_ADDS_SPAM, 10s, 0, EVENT_PHASE_ADDS);
508 events.ScheduleEvent(EVENT_FREYA_LIFEBINDER, 30s);
509 events.ScheduleEvent(EVENT_FREYA_SUNBEAM, 17s);
510 events.ScheduleEvent(EVENT_FREYA_BERSERK, 10min);
511 events.SetPhase(EVENT_PHASE_ADDS);
512
515
516 // HARD MODE CHECKS
518 if (elder && elder->IsAlive())
519 {
520 events.ScheduleEvent(EVENT_FREYA_GROUND_TREMOR, 35s);
521 _elderGUID[0] = elder->GetGUID();
522 }
523
525 if (elder && elder->IsAlive())
526 {
527 events.ScheduleEvent(EVENT_FREYA_IRON_ROOT, 20s);
528 _elderGUID[1] = elder->GetGUID();
529 }
530
532 if (elder && elder->IsAlive())
533 {
534 events.ScheduleEvent(EVENT_FREYA_UNSTABLE_SUN_BEAM, 1min);
535 _elderGUID[2] = elder->GetGUID();
536 }
537
538 if (_elderGUID[0] || _elderGUID[1] || _elderGUID[2])
539 {
541
542 static constexpr uint32 essenceChannel[3] = { SPELL_STONEBARK_ESSENCE_CHANNEL,
544 static constexpr uint32 banishState[3] = { SPELL_GREEN_BANISH_STATE_LARGE,
546
547 for (uint8 i = 0; i < 3; ++i)
548 {
550 if (!elder)
551 continue;
552
553 elder->CastSpell(elder, SPELL_FULL_HEAL, true);
556 elder->SetInCombatWithZone();
557 elder->CastSpell(me, essenceChannel[i], false);
558 if (essenceChannel[i] == SPELL_STONEBARK_ESSENCE_CHANNEL)
559 elder->CastSpell(me, SPELL_STONEBARK_ESSENCE, true);
560 elder->CastSpell(elder, banishState[i], true);
561 }
562
563 // Freya stands still while the Elders channel their essences into her.
564 // The motion stop is deferred a tick because the engaging AttackStart
565 // issues its MoveChase after JustEngagedWith returns.
566 me->SetCombatMovement(false);
567 scheduler.Schedule(1ms, [this](TaskContext /*context*/)
568 {
569 // MoveIdle replaces the default waypoint generator (path 1365540),
570 // otherwise her conservatory patrol resumes once the chase is cleared
571 me->GetMotionMaster()->Clear();
572 me->GetMotionMaster()->MoveIdle();
573 me->StopMoving();
574 if (Unit* victim = me->GetVictim())
575 me->SetFacingToObject(victim);
576 });
577
578 scheduler.Schedule(5s, [this](TaskContext /*context*/)
579 {
580 me->SetCombatMovement(true);
582
583 for (ObjectGuid const& elderGuid : _elderGUID)
584 if (Creature* drained = ObjectAccessor::GetCreature(*me, elderGuid))
585 drained->CastSpell(drained, SPELL_DRAINED_OF_POWER, false);
586 });
587 }
588 else
589 {
591 }
592 }
@ 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:169
@ SAY_AGGRO
Definition boss_freya.cpp:168
@ 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:2882
void SetCombatMovement(bool allowMovement)
Definition Creature.cpp:3970
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:120
Definition Unit.h:665
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16078
MotionMaster * GetMotionMaster()
Definition Unit.h:1761
Aura * AddAura(uint32 spellId, Unit *target)
Definition Unit.cpp:14747
void StopMoving()
Definition Unit.cpp:12639
Unit * GetVictim() const
Definition Unit.h:904
void setActive(bool isActiveObject)
Definition Object.cpp:1091
Definition ObjectAccessor.h:61
@ DATA_ELDER_BRIGHTLEAF
Definition ulduar.h:127
@ DATA_ELDER_IRONBRANCH
Definition ulduar.h:125
@ DATA_ELDER_STONEBARK
Definition ulduar.h:126

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.

497{ _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.

291 {
292 if (!victim->IsPlayer() || urand(0, 2))
293 return;
294
295 Talk(SAY_SLAY);
296 }
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ SAY_SLAY
Definition boss_freya.cpp:170
bool IsPlayer() const
Definition Object.h:207

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

◆ MovementInform()

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

Reimplemented from CreatureAI.

691 {
692 if (type != WAYPOINT_MOTION_TYPE)
693 return;
694
696 if (!target)
697 return;
698
699 switch (pointId)
700 {
701 case WAYPOINT_GREEN:
703 break;
704 case WAYPOINT_YELLOW:
706 break;
707 case WAYPOINT_BLUE:
709 break;
710 default:
711 break;
712 }
713 }
@ 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:189
@ 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.

263 {
264 _Reset();
265 me->SetCombatMovement(true);
266
267 for (uint8 i = 0; i < 3; ++i)
268 {
269 if (!_elderGUID[i])
270 continue;
271
273 elder->AI()->EnterEvadeMode();
274
275 _elderGUID[i].Clear();
276 }
277
278 _lumberjacked = 0;
279 _spawnedAmount = 0;
280 _trioDown = 0;
281 _setPermutation = 0;
282 _backToNature = true;
283 _deforestation = 0;
284 _aliveAddsCount = 0;
285 _currentSetId = 0;
288 }
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, _currentSetId, _currentTrioDown, _deforestation, _elderGUID, _lumberjacked, BossAI::_Reset(), _setPermutation, _spawnedAmount, _trioDown, _trioWaveEndSetId, ObjectGuid::Clear(), ObjectAccessor::GetCreature(), ScriptedAI::me, and Creature::SetCombatMovement().

◆ SpawnWave()

void boss_freya::SpawnWave ( )
inline
364 {
368
369 if (_spawnedAmount % 3 == 0)
370 _setPermutation = urand(0, 5);
371
372 static constexpr uint8 permTable[6][3] = {
379 };
380
381 switch (permTable[_setPermutation][_spawnedAmount % 3])
382 {
383 case GROUP_TRIO:
386 _aliveAddsCount = 0;
387 _trioDown = 0;
388 break;
392 _aliveAddsCount = 1;
393 break;
394 case GROUP_LASHERS:
396 for (uint8 i = 0; i < 10; ++i)
398
399 _aliveAddsCount = 10;
400 break;
401 }
402 }
@ 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:173
@ SAY_SUMMON_TRIO
Definition boss_freya.cpp:174
@ SAY_SUMMON_LASHERS
Definition boss_freya.cpp:175
@ EMOTE_ALLIES_OF_NATURE
Definition boss_freya.cpp:177
@ 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, _currentSetId, _currentTrioDown, _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, SPELL_SUMMON_WAVE_3, and urand().

Referenced by UpdateAI().

◆ SpellHit()

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

Reimplemented from CreatureAI.

355 {
356 if (spellInfo->Id == SPELL_TELEPORT)
357 {
360 }
361 }
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2216
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ EVENT_KEEPER_TELEPORTED
Definition ulduar.h:430

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.

595 {
596 if (spell->Id == SPELL_NATURE_BOMB_FLIGHT)
597 me->SummonCreature(NPC_NATURE_BOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
598 }
@ NPC_NATURE_BOMB
Definition boss_freya.cpp:188
@ 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:2453
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.

601 {
602 scheduler.Update(diff);
603 if (!UpdateVictim())
604 return;
605
606 events.Update(diff);
608 return;
609
610 switch (events.ExecuteEvent())
611 {
613 if (_spawnedAmount < 6)
614 SpawnWave();
616 {
618 events.ScheduleEvent(EVENT_FREYA_NATURE_BOMB, 5s);
619 events.SetPhase(EVENT_PHASE_FINAL);
620 return;
621 }
623 events.Repeat(1min);
624 break;
628 events.Repeat(45s);
629 break;
632 me->CastSpell(target, SPELL_SUNBEAM, false);
633 events.Repeat(15s, 20s);
634 break;
636 // _trioDown stays set so a member resolving on this same tick
637 // still sees the trio as wiped and does not come back
638 _deforestation = 0;
639 // The 1-min fallback may have moved the set on during the 11s revive
640 // window; only the current set's trio wipe may accelerate the next wave
642 break;
643 events.RescheduleEvent(EVENT_FREYA_ADDS_SPAM, 5s, 0, EVENT_PHASE_ADDS);
644 break;
646 {
647 uint8 _minCount = me->GetMap()->Is25ManRaid() ? urand(7, 10) : urand(3, 4);
648 Map::PlayerList const& pList = me->GetMap()->GetPlayers();
649 for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
650 {
651 if (me->GetDistance(itr->GetSource()) > 70 || !itr->GetSource()->IsAlive())
652 continue;
653
654 me->CastSpell(itr->GetSource(), SPELL_NATURE_BOMB_FLIGHT, true);
655
656 if (!(--_minCount))
657 break;
658 }
659 events.Repeat(18s);
660 break;
661 }
664 me->CastSpell(me, SPELL_BERSERK, true);
665 break;
669 events.Repeat(25s, 35s);
670 break;
674 events.Repeat(45s, 55s);
675 break;
678 events.Repeat(38s, 48s);
679 break;
680 }
681
683 }
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:125
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ EMOTE_IRON_ROOTS
Definition boss_freya.cpp:179
@ EMOTE_GROUND_TREMOR
Definition boss_freya.cpp:178
@ EMOTE_LIFEBINDERS_GIFT
Definition boss_freya.cpp:176
@ SAY_BERSERK
Definition boss_freya.cpp:172
@ 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:4797
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:1429
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1304
void SpawnWave()
Definition boss_freya.cpp:363

References _currentSetId, _deforestation, _spawnedAmount, _trioWaveEndSetId, 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().

◆ _currentSetId

uint8 boss_freya::_currentSetId

◆ _currentTrioDown

uint8 boss_freya::_currentTrioDown

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

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

◆ _trioWaveEndSetId

uint8 boss_freya::_trioWaveEndSetId

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


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