162 std::list<WorldObject*> targetsCopy = targets;
171 if (targetsCopy.size() < preferedSize)
177 targets = targetsCopy;
296 decimator->SetUninteractible(
false);
303 annihilator->SetUninteractible(
false);
468 decimator->SetUninteractible(
true);
475 annihilator->SetUninteractible(
true);
656 caster->CastSpell(
GetHitUnit(), spellId,
true);
684 if (decimator->IsAIEnabled())
831 if ((lastCannonEntry ==
NPC_ANNIHILATOR && decimator) || (decimator && !annihilator))
837 else if ((lastCannonEntry ==
NPC_DECIMATOR && annihilator) || (annihilator && !decimator))
842 for (
uint8 i = 0; i < count; i++)
@ ENCOUNTER_FRAME_DISENGAGE
std::set< ObjectGuid > GuidSet
float frand(float min, float max)
#define RegisterAreaTriggerAI(ai_name)
#define RegisterSpellScript(spell_script)
@ TARGET_UNIT_SRC_AREA_ENTRY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_AREA_TRIGGER
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
T CalculatePct(T base, U pct)
@ NPC_GAROTHI_WORLDBREAKER
@ DATA_GAROTHI_WORLDBREAKER
#define RegisterAntorusTheBurningThroneCreatureAI(ai_name)
constexpr uint8 MAX_TARGETS_SIZE
@ SUMMON_GROUP_ID_SURGING_FEL
Position const AnnihilationCenterReferencePos
void AddSC_boss_garothi_worldbreaker()
@ SPELL_DECIMATION_MISSILE
@ SPELL_DECIMATION_CAST_VISUAL
@ SPELL_APOCALYPSE_DRIVE_FINAL_DAMAGE
@ SPELL_FEL_BOMBARDMENT_SELECTOR
@ SPELL_DECIMATION_WARNING
@ SPELL_FEL_BOMBARDMENT_DUMMY
@ SPELL_ANNIHILATION_SUMMON
@ SPELL_ANNIHILATION_AREA_TRIGGER
@ SPELL_SEARING_BARRAGE_DUMMY_ANNIHILATOR
@ SPELL_SURGING_FEL_AREA_TRIGGER
@ SPELL_SEARING_BARRAGE_DUMMY_DECIMATOR
@ SPELL_FEL_BOMBARDMENT_PERIODIC
@ SPELL_ANNIHILATION_SELECTOR
@ SPELL_ANNIHILATOR_CANNON_EJECT
@ SPELL_SURGING_FEL_DAMAGE
@ SPELL_DECIMATOR_CANNON_EJECT
@ SPELL_SEARING_BARRAGE_SELECTOR
@ SPELL_SEARING_BARRAGE_DECIMATOR
@ SPELL_ANNIHILATION_DAMAGE_UNSPLITTED
@ SPELL_DECIMATION_SELECTOR
@ SPELL_APOCALYPSE_DRIVE_PERIODIC_DAMAGE
@ SPELL_SEARING_BARRAGE_ANNIHILATOR
@ SPELL_FEL_BOMBARDMENT_WARNING
@ SPELL_SEARING_BARRAGE_DAMAGE_DECIMATOR
@ SPELL_ANNIHILATION_DUMMY
@ SPELL_SEARING_BARRAGE_DAMAGE_ANNIHILATOR
@ SPELL_ANNIHILATION_WARNING
static constexpr uint32 const MaxApocalypseDriveCount
@ ENCOUNTER_FRAME_INDEX_CANNONS
@ ENCOUNTER_FRAME_INDEX_BOSS
constexpr uint8 MIN_TARGETS_SIZE
@ ANIM_KIT_ID_CANNON_DESTROYED
@ SAY_ANNOUNCE_ERADICATION
@ SAY_ANNOUNCE_APOCALYPSE_DRIVE
@ SAY_ANNOUNCE_DECIMATION
@ SAY_ANNOUNCE_FEL_BOMBARDMENT
@ SAY_FINISH_APOCALYPSE_DRIVE
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectProcHandler > OnEffectProc
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void GetHomePosition(float &x, float &y, float &z, float &ori) const
void SetReactState(ReactStates st)
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
Creature * GetCreature(uint32 type)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
uint32 GetPlayersCountExceptGMs() const
float GetHeight(PhaseShift const &phaseShift, float x, float y, float z, bool vmap=true, float maxSearchDist=DEFAULT_HEIGHT_SEARCH)
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static ObjectGuid GetGUID(Object const *o)
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
Creature * GetHitCreature() const
int32 GetHitDamage() const
HookList< HitHandler > OnHit
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
void SetHitDamage(int32 damage)
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Summon(Creature const *summon)
bool operator()(WorldObject *object)
VictimCheck(Unit *caster, bool keepTank)
virtual void SetData(uint32, uint32)
bool DoSpellAttackIfReady(uint32 spellId)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual uint32 GetData(uint32) const
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
bool IsWithinMeleeRange(Unit const *obj) const
void PlayOneShotAnimKitId(uint16 animKitId)
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
void SetUninteractible(bool apply)
void SetFacingTo(float const ori, bool force=true)
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
InstanceScript * GetInstanceScript() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
PhaseShift & GetPhaseShift()
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
void HandleHit(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void HandleHit(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandlePeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleDummyEffect(SpellEffIndex)
void HandleProc(AuraEffect *, ProcEventInfo &)
void HandleHit(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void HandlePeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *spellInfo) override
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleWarningEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleHit(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleHit(SpellEffIndex)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void PreferNonTankTargetsAndResizeTargets(std::list< WorldObject * > &targets, Unit *caster)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
void RandomResize(C &container, std::size_t requestedSize)
constexpr std::size_t size()
constexpr float GetPositionX() const
constexpr float GetPositionY() const
constexpr float GetPositionZ() const
void SetCombatMovement(bool allowMovement)
Difficulty GetDifficulty() const
void OnUnitExit(Unit *unit) override
void OnUnitEnter(Unit *unit) override
at_garothi_annihilation(AreaTrigger *areatrigger)
void JustEngagedWith(Unit *who) override
uint32 GetData(uint32 type) const override
void JustDied(Unit *) override
void OnSpellCast(SpellInfo const *spell) override
void UpdateAI(uint32 diff) override
void SummonedCreatureDies(Creature *summon, Unit *) override
uint8 _apocalypseDriveCount
GuidSet _surgingFelDummyGuids
uint32 _searingBarrageSpellId
void KilledUnit(Unit *victim) override
void JustAppeared() override
std::array< uint8, MaxApocalypseDriveCount > _apocalypseDriveHealthLimit
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void SetData(uint32 type, uint32 value) override
ObjectGuid _lastSurgingFelDummyGuid
boss_garothi_worldbreaker(Creature *creature)
void InitializeAI() override
void JustSummoned(Creature *summon) override
void EnterEvadeMode(EvadeReason) override