387 {1945.682f, 33.34201f, 411.4408f, 5.270895f},
388 {1945.761f, -81.52171f, 411.4407f, 1.029744f},
389 {2028.822f, -65.73573f, 411.4426f, 2.460914f},
390 {2028.766f, 17.42014f, 411.4446f, 3.857178f},
394 {2036.873f, 25.42513f, 338.4984f, 3.909538f},
395 {1939.045f, -90.87457f, 338.5426f, 0.994837f},
396 {1939.148f, 42.49035f, 338.5427f, 5.235988f},
397 {2036.658f, -73.58822f, 338.4985f, 2.460914f},
401 {1928.793f, 65.03109f, 242.3763f, 0.0f},
402 {1912.324f, -155.7967f, 239.9896f, 0.0f},
474 creature->AI()->EnterEvadeMode();
479 if (
Player* player = itr->GetSource())
498 bool clockwise =
false;
499 std::list<TempSummon*> clouds;
502 for (std::list<TempSummon*>::const_iterator itr = clouds.begin(); itr != clouds.end(); ++itr)
504 (*itr)->AI()->DoAction(
int32(clockwise));
505 clockwise = !clockwise;
512 sara->SetInCombatWith(
me);
516 keeper->SetInCombatWith(
me);
683 return GetUlduarAI<boss_voice_of_yogg_saronAI>(creature);
698 std::map<ObjectGuid, ObjectGuid>::const_iterator itr =
_linkData.find(guid);
743 switch (spellInfo->
Id)
876 for (
uint8 i = 0; i < 4; ++i)
879 float radius =
frand(25.0f, 50.0f);
880 float angle =
frand(0.0f, 2.0f *
float(
M_PI));
893 voice->AI()->JustSummoned(summon);
916 return GetUlduarAI<boss_saraAI>(creature);
939 if (keepersCount == 0)
941 if (keepersCount <= 1)
943 if (keepersCount <= 2)
945 if (keepersCount <= 3)
965 creature->DisappearAndDie();
969 creature->AI()->EnterEvadeMode();
973 if (
Player* player = itr->GetSource())
1043 return GetUlduarAI<boss_yogg_saronAI>(creature);
1144 return GetUlduarAI<boss_brain_of_yogg_saronAI>(creature);
1175 return GetUlduarAI<npc_ominous_cloudAI>(creature);
1230 voice->AI()->JustSummoned(
me);
1240 return GetUlduarAI<npc_guardian_of_yogg_saronAI>(creature);
1297 return GetUlduarAI<npc_corruptor_tentacleAI>(creature);
1333 voice->AI()->JustSummoned(
me);
1342 return GetUlduarAI<npc_constrictor_tentacleAI>(creature);
1401 return GetUlduarAI<npc_crusher_tentacleAI>(creature);
1433 return GetUlduarAI<npc_influence_tentacleAI>(creature);
1450 if (!spellClickHandled)
1468 return GetUlduarAI<npc_descend_into_madnessAI>(creature);
1524 return GetUlduarAI<npc_immortal_guardianAI>(creature);
1545 if (menuId != 10333)
1577 return GetUlduarAI<npc_observation_ring_keeperAI>(creature);
1606 std::list<Creature*> wells;
1608 for (std::list<Creature*>::const_iterator itr = wells.begin(); itr != wells.end(); ++itr)
1683 std::list<Creature*> wells;
1685 for (std::list<Creature*>::const_iterator itr = wells.begin(); itr != wells.end(); ++itr)
1705 return GetUlduarAI<npc_yogg_saron_keeperAI>(creature);
1826 return GetUlduarAI<npc_yogg_saron_illusionsAI>(creature);
1889 return GetUlduarAI<npc_garonaAI>(creature);
1927 return GetUlduarAI<npc_turned_championAI>(creature);
1952 return GetUlduarAI<npc_laughing_skullAI>(creature);
2011 return sanity->GetStackAmount() <= 40;
2131 if (targets.size() != 2)
2138 ai->SetLinkBetween(targets.front()->GetGUID(), targets.back()->GetGUID());
2163 ai->RemoveLinkFrom(
GetTarget()->GetGUID());
2168 ai->RemoveLinkFrom(
GetTarget()->GetGUID());
2408 if (target->GetMap()->Is25ManRaid())
2440 if (vehicle->IsAlive())
2441 vehicle->KillSelf();
2508 float stack = std::ceil((target->
GetHealthPct() / 10) - 1);
2546 target->SetHealth(target->CountPctFromMaxHealth((
int32)
GetCaster()->GetHealthPct()));
2607 caster->GetMotionMaster()->MoveConfused();
2734 if (!damageInfo || !damageInfo->
GetDamage())
2942 return !
object->HasInArc(
static_cast<float>(
M_PI),
_caster);
3028 if (
GetCaster()->GetDistance(yogg) > 20.0f)
First const & RAND(First const &first, Second const &second, Rest const &... rest)
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
@ TEMPSUMMON_TIMED_DESPAWN
float frand(float min, float max)
uint32 urand(uint32 min, uint32 max)
bool roll_chance_i(int chance)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
@ TARGET_UNIT_SRC_AREA_ENEMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_FAILED_OUT_OF_RANGE
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define SpellCheckCastFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckAreaTargetFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ CURRENT_CHANNELED_SPELL
T CalculatePct(T base, U pct)
@ EVENT_GROUP_SUMMON_TENTACLES
@ ACHIEV_TIMED_START_EVENT
@ ACTION_TOGGLE_SHATTERED_ILLUSION
Position const ObservationRingKeepersPos[4]
@ EMOTE_BRAIN_ILLUSION_SHATTERED
@ SAY_STORMWIND_ROLEPLAY_6
@ SAY_ICECROWN_ROLEPLAY_6
@ EMOTE_YOGG_SARON_EXTINGUISH_ALL_LIFE
@ SAY_SARA_ULDUAR_SCREAM_1
@ SAY_ICECROWN_ROLEPLAY_3
@ SAY_SARA_ULDUAR_SCREAM_2
@ SAY_STORMWIND_ROLEPLAY_3
@ SAY_STORMWIND_ROLEPLAY_1
@ SAY_STORMWIND_ROLEPLAY_5
@ EMOTE_OMINOUS_CLOUD_PLAYER_TOUCH
@ EMOTE_YOGG_SARON_MADNESS
@ SAY_STORMWIND_ROLEPLAY_4
@ SAY_ICECROWN_ROLEPLAY_5
@ SAY_STORMWIND_ROLEPLAY_7
@ EMOTE_YOGG_SARON_EMPOWERING_SHADOWS
@ SAY_ICECROWN_ROLEPLAY_2
@ SAY_YOGG_SARON_DEAFENING_ROAR
@ SAY_ICECROWN_ROLEPLAY_4
@ SAY_ICECROWN_ROLEPLAY_1
@ SAY_STORMWIND_ROLEPLAY_2
@ EMOTE_YOGG_SARON_DEAFENING_ROAR
@ WHISPER_VOICE_PHASE_1_WIPE
Position const IllusionsMiscPos[2]
Position const YoggSaronSpawnPos
@ SPELL_TELEPORT_BACK_TO_MAIN_ROOM
@ SPELL_TELEPORT_PORTAL_VISUAL
@ SPELL_BRAIN_LINK_DAMAGE
@ SPELL_SPEED_OF_INVENTION
@ SPELL_LOW_SANITY_SCREEN_EFFECT
@ SPELL_DEATH_RAY_ORIGIN_VISUAL
@ SPELL_SANITY_WELL_VISUAL
@ SPELL_TENTACLE_VOID_ZONE
@ SPELL_DEATH_RAY_DAMAGE_VISUAL
@ SPELL_BRAIN_LINK_NO_DAMAGE
@ SPELL_SHADOWY_BARRIER_YOGG
@ SPELL_DEATH_RAY_PERIODIC
@ SPELL_MALADY_OF_THE_MIND_JUMP
@ SPELL_SHATTERED_ILLUSION_REMOVE
@ SPELL_PHASE_2_TRANSFORM
@ SPELL_EMPOWERING_SHADOWS
@ SPELL_RESILIENCE_OF_NATURE
@ SPELL_SARAS_FERVOR_TARGET_SELECTOR
@ SPELL_SUMMON_GUARDIAN_1
@ SPELL_LUNATIC_GAZE_DAMAGE
@ SPELL_VERTEX_COLOR_BLACK
@ SPELL_HODIRS_PROTECTIVE_GAZE
@ SPELL_SHADOWY_BARRIER_SARA
@ SPELL_DEATH_RAY_WARNING_VISUAL
@ SPELL_IMMORTAL_GUARDIAN
@ SPELL_CRUSHER_TENTACLE_SUMMON
@ SPELL_SIMPLE_TELEPORT_KEEPERS
@ SPELL_EXTINGUISH_ALL_LIFE
@ SPELL_LUNATIC_GAZE_SKULL
@ SPELL_MALADY_OF_THE_MIND
@ SPELL_FLASH_FREEZE_VISUAL
@ SPELL_SHATTERED_ILLUSION
@ SPELL_GRIM_REPRISAL_DAMAGE
@ SPELL_CONSTRICTOR_TENTACLE_SUMMON
@ SPELL_TELEPORT_TO_ICECROWN_ILLUSION
@ SPELL_PHASE_3_TRANSFORM
@ SPELL_FURY_OF_THE_STORM
@ SPELL_TELEPORT_TO_CHAMBER_ILLUSION
@ SPELL_DESTABILIZATION_MATRIX
@ SPELL_SUMMON_GUARDIAN_2
@ SPELL_TELEPORT_TO_STORMWIND_ILLUSION
@ SPELL_SARAS_ANGER_TARGET_SELECTOR
@ SPELL_BRAIN_HURT_VISUAL
@ SPELL_CORRUPTOR_TENTACLE_SUMMON
@ SPELL_PERMANENT_FEIGN_DEATH
@ SPELL_SANITY_WELL_SUMMON
@ SPELL_OMINOUS_CLOUD_VISUAL
@ SPELL_FORTITUDE_OF_FROST
@ SPELL_CONSTRICTOR_TENTACLE
@ SPELL_RIDE_YOGG_SARON_VEHICLE
@ SPELL_IN_THE_MAWS_OF_THE_OLD_GOD
@ SPELL_SARAS_BLESSING_TARGET_SELECTOR
@ SPELL_TENTACLE_VOID_ZONE_2
uint32 const IllusionSpells[MAX_ILLUSION_ROOMS]
Position const YSKeepersPos[4]
boss_sara::boss_saraAI SaraAI
@ CREATURE_GROUP_PORTALS_25
@ CREATURE_GROUP_PORTALS_10
void AddSC_boss_yogg_saron()
@ EVENT_CHAMBER_ROLEPLAY_2
@ EVENT_CHAMBER_ROLEPLAY_3
@ EVENT_MALADY_OF_THE_MIND
@ EVENT_ICECROWN_ROLEPLAY_4
@ EVENT_SUMMON_IMMORTAL_GUARDIAN
@ EVENT_ICECROWN_ROLEPLAY_6
@ EVENT_ICECROWN_ROLEPLAY_1
@ EVENT_SUMMON_CRUSHER_TENTACLE
@ EVENT_DESTABILIZATION_MATRIX
@ EVENT_CAST_RANDOM_SPELL
@ EVENT_ICECROWN_ROLEPLAY_2
@ EVENT_STORMWIND_ROLEPLAY_4
@ EVENT_STORMWIND_ROLEPLAY_7
@ EVENT_HODIRS_PROTECTIVE_GAZE
@ EVENT_ICECROWN_ROLEPLAY_3
@ EVENT_SUMMON_CORRUPTOR_TENTACLE
@ EVENT_CHAMBER_ROLEPLAY_4
@ EVENT_EXTINGUISH_ALL_LIFE
@ EVENT_STORMWIND_ROLEPLAY_6
@ EVENT_CHAMBER_ROLEPLAY_1
@ EVENT_CHAMBER_ROLEPLAY_5
@ EVENT_ICECROWN_ROLEPLAY_5
@ EVENT_STORMWIND_ROLEPLAY_5
@ EVENT_STORMWIND_ROLEPLAY_2
@ EVENT_SUMMON_CONSTRICTOR_TENTACLE
@ EVENT_SUMMON_GUARDIAN_OF_YOGG_SARON
@ EVENT_STORMWIND_ROLEPLAY_3
@ EVENT_STORMWIND_ROLEPLAY_1
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectAbsorbHandler > OnEffectAbsorb
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectProcHandler > OnEffectProc
uint8 GetStackAmount() const
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
InstanceScript *const instance
void JustSummoned(Creature *summon) override
bool HasPvECombatWithPlayers() const
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void EngagementStart(Unit *who)
static void SendSound(Creature *source, uint32 sound, ChatMsg msgType, WorldObject const *whisperTarget=nullptr, CreatureTextRange range=TEXT_RANGE_NORMAL, Team team=TEAM_OTHER, bool gmOnly=false, uint32 keyBroadcastTextId=0, SoundKitPlayType playType=SoundKitPlayType::Normal)
void SetImmuneToPC(bool apply) override
void SetReactState(ReactStates st)
void ResetPlayerDamageReq()
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void AddLootMode(uint16 lootMode)
bool IsInEvadeMode() const
Unit * GetAttacker() const
void DelayEvents(Milliseconds delay)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
bool IsInPhase(uint8 phase) const
void SetPhase(uint8 phase)
void AddEvent(BasicEvent *event, Milliseconds e_time, bool set_addtime=true)
Milliseconds CalculateTime(Milliseconds t_offset) const
bool operator()(WorldObject *object)
HighSanityTargetSelector()
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
virtual ObjectGuid GetGuidData(uint32 type) const override
void TriggerGameEvent(uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) override
bool operator()(WorldObject *object)
LunaticGazeTargetSelector(Unit *caster)
float GetHeight(PhaseShift const &phaseShift, float x, float y, float z, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH)
PlayerList const & GetPlayers() const
void MoveCirclePath(float x, float y, float z, float radius, bool clockwise, uint8 stepCount, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={})
static ObjectGuid const Empty
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static Player * ToPlayer(Object *o)
bool IsGameMaster() const
DamageInfo * GetDamageInfo() const
SanityReduction(uint8 stacks)
void RemoveSanity(SpellEffIndex)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< CastHandler > AfterCast
HookList< CheckCastHandler > OnCheckCast
Unit * GetHitUnit() const
int32 GetEffectValue() const
HookList< EffectHandler > OnEffectHitTarget
HookList< CastHandler > BeforeCast
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void SetSpellValue(SpellValueMod mod, int32 value)
StartAttackEvent(Creature *summoner, Creature *owner)
bool Execute(uint64, uint32) override
void Despawn(Creature const *summon)
void DespawnEntry(uint32 entry)
void Summon(Creature const *summon)
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
bool HealthAbovePct(int32 pct) const
float GetHealthPct() const
void SetFaction(uint32 faction) override
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
void RemoveNpcFlag(NPCFlags flags)
void SetUninteractible(bool apply)
bool SetWalk(bool enable)
uint64 CountPctFromMaxHealth(int32 pct) const
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
CombatManager & GetCombatManager()
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnT