79#define SPELL_UNHOLY_AURA RAID_MODE<uint32>(55606, 55608)
80#define SPELL_DEATH_PLAGUE RAID_MODE<uint32>(55604, 55645)
81#define SPELL_SHADOW_BOLT_VOLLEY RAID_MODE<uint32>(27831, 55638)
82#define SPELL_ARCANE_EXPLOSION RAID_MODE<uint32>(27989, 56407)
83#define SPELL_DRAIN_LIFE RAID_MODE<uint32>(27994, 55646)
84#define SPELL_UNHOLY_FRENZY RAID_MODE<uint32>(55648,27995)
152 Player* player = it->GetSource();
173 std::ranges::copy_n(waves.begin(), std::min(std::ranges::ssize(waves), std::ranges::ssize(
Creatures)),
Creatures.begin());
180static constexpr std::array<GothikWaveInfo, 19>
waves10 =
241static constexpr std::array<GothikWaveInfo, 18>
waves25 =
448 std::list<Creature*> triggers;
452 for (
uint32 i = 0; i < entry.Count; ++i)
460 switch (entry.CreatureId)
475 auto triggerItr = std::ranges::find(triggers, targetDBGuid, [](
Creature const* trigger) {
return trigger->
GetSpawnId(); });
476 if (triggerItr != triggers.end())
491 if (summon->IsAlive() && (!summon->IsInCombat() || summon->IsInEvadeMode()))
762 Creature *knightTarget =
nullptr, *riderTarget =
nullptr, *horseTarget =
nullptr, *gothikTarget =
nullptr;
763 for (
Creature* pTarget : potentialTargets)
765 switch (pTarget->GetEntry())
768 knightTarget = pTarget;
771 riderTarget = pTarget;
774 horseTarget = pTarget;
777 gothikTarget = pTarget;
783 Creature* target = knightTarget ? knightTarget : riderTarget ? riderTarget : horseTarget ? horseTarget : gothikTarget ? gothikTarget :
nullptr;
830 std::list<Creature*> triggers;
834 if (trigger && trigger->GetSpawnId() == targetDBGuid)
842 switch (spellInfo->
Id)
882 gothik->AI()->JustSummoned(summon);
887 gothik->AI()->SummonedCreatureDespawn(summon);
std::chrono::seconds Seconds
Seconds shorthand typedef.
std::chrono::minutes Minutes
Minutes shorthand typedef.
#define TC_LOG_INFO(filterType__, message__,...)
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
uint32 urand(uint32 min, uint32 max)
uint32 urandms(uint32 min, uint32 max)
#define RegisterSpellScript(spell_script)
@ TARGET_UNIT_SRC_AREA_ENEMY
#define SpellObjectAreaTargetSelectFn(F, I, N)
const uint32 CGUID_TRIGGER
static AreaBoundary *const livingSide
#define SPELL_DEATH_PLAGUE
#define SPELL_SHADOW_BOLT_VOLLEY
#define SPELL_ARCANE_EXPLOSION
static constexpr std::array< GothikWaveInfo, 19 > waves10
#define SPELL_UNHOLY_AURA
static bool IsOnSameSide(Position const *who, Position const *other)
static AreaBoundary *const deadSide
static Side GetSide(Position const *who)
#define SPELL_UNHOLY_FRENZY
static constexpr std::array< GothikWaveInfo, 18 > waves25
static Player * FindEligibleTarget(Creature const *me, bool isGateOpen)
bool IsWithinBoundary(Position const *pos) const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
virtual void JustReachedHome()
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
virtual void JustAppeared()
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
void GetHomePosition(float &x, float &y, float &z, float &ori) const
bool HasReactState(ReactStates state) const
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
ObjectGuid::LowType GetSpawnId() const
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
bool IsInPhase(uint8 phase) const
void CancelEvent(uint32 eventId)
void SetPhase(uint8 phase)
virtual ObjectGuid GetGuidData(uint32 type) const override
PlayerList const & GetPlayers() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Despawn(Creature const *summon)
void Summon(Creature const *summon)
bool IsThreatListEmpty(bool includeOffline=false) const
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void DoAction(int32 param)
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
void CastStop(uint32 except_spellid=0)
void RemoveAurasByType(AuraType auraType, std::function< bool(AuraApplication const *)> const &check, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
ThreatManager & GetThreatManager()
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
bool isInAccessiblePlaceFor(Creature const *c) const
void NearTeleportTo(TeleportLocation const &target, bool casting=false)
bool HasUnitState(const uint32 f) const
InstanceScript * GetInstanceScript() const
void GetCreatureListWithEntryInGrid(Container &creatureContainer, uint32 entry, float maxSearchRange=250.0f) const
bool IsValidAttackTarget(WorldObject const *target, SpellInfo const *bySpell=nullptr) const
bool CanSeeOrDetect(WorldObject const *obj, CanSeeOrDetectExtraArgs const &args={ }) const
virtual void SetData(uint32, uint32)
void FilterTargets(std::list< WorldObject * > &targets)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
#define RegisterNaxxramasCreatureAI(ai_name)
std::array< GothikWaveEntry, 3 > Creatures
constexpr GothikWaveInfo(std::initializer_list< GothikWaveEntry > waves, int64 timeToNextWave)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
constexpr float GetOrientation() const
constexpr float GetPositionZ() const
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
T const & RAID_MODE(T const &normal10, T const &normal25) const
bool HealthBelowPct(uint32 pct) const
Difficulty GetDifficulty() const
std::list< Creature * > DoFindFriendlyMissingBuff(float range, uint32 spellId)
void ResetThreatList(Unit *who=nullptr)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
virtual void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void KilledUnit(Unit *victim) override
void JustSummoned(Creature *summon) override
void EnterEvadeMode(EvadeReason why) override
boss_gothik(Creature *creature)
void DoAction(int32 action) override
void SummonedCreatureDespawn(Creature *summon) override
void JustDied(Unit *) override
void DoAction(int32 action) override
virtual void _UpdateAI(uint32 diff)
bool isOnSameSide(Unit const *who) const
void JustDied(Unit *) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
void UpdateAI(uint32 diff) override
npc_gothik_minion_baseAI(Creature *creature, uint32 deathNotify=0)
void EnterEvadeMode(EvadeReason why) override
void _UpdateAI(uint32 diff)
npc_gothik_minion_livingknight(Creature *creature)
void JustAppeared() override
void JustReachedHome() override
npc_gothik_minion_livingrider(Creature *creature)
void _UpdateAI(uint32 diff) override
npc_gothik_minion_livingtrainee(Creature *creature)
void _UpdateAI(uint32 diff)
void _UpdateAI(uint32 diff)
npc_gothik_minion_spectralhorse(Creature *creature)
npc_gothik_minion_spectralknight(Creature *creature)
void _UpdateAI(uint32 diff)
void _UpdateAI(uint32 diff) override
npc_gothik_minion_spectralrider(Creature *creature)
void JustReachedHome() override
void JustAppeared() override
npc_gothik_minion_spectraltrainee(Creature *creature)
void _UpdateAI(uint32 diff)
Creature * SelectRandomSkullPile()
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void EnterEvadeMode(EvadeReason) override
void JustSummoned(Creature *summon) override
void UpdateAI(uint32) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void JustEngagedWith(Unit *) override
void SummonedCreatureDespawn(Creature *summon) override
npc_gothik_trigger(Creature *creature)