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();
438 std::list<Creature*> triggers;
441 for (
uint8 i = 0; i < entry.second; ++i)
465 if (trigger && trigger->GetSpawnId() == targetDBGuid)
482 if (summon->IsAlive() && (!summon->IsInCombat() || summon->IsInEvadeMode()))
751 Creature *knightTarget =
nullptr, *riderTarget =
nullptr, *horseTarget =
nullptr, *gothikTarget =
nullptr;
752 for (
Creature* pTarget : potentialTargets)
754 switch (pTarget->GetEntry())
757 knightTarget = pTarget;
760 riderTarget = pTarget;
763 horseTarget = pTarget;
766 gothikTarget = pTarget;
772 Creature* target = knightTarget ? knightTarget : riderTarget ? riderTarget : horseTarget ? horseTarget : gothikTarget ? gothikTarget :
nullptr;
819 std::list<Creature*> triggers;
823 if (trigger && trigger->GetSpawnId() == targetDBGuid)
831 switch (spellInfo->
Id)
871 gothik->AI()->JustSummoned(summon);
876 gothik->AI()->SummonedCreatureDespawn(summon);
std::chrono::seconds Seconds
Seconds shorthand typedef.
std::chrono::minutes Minutes
Minutes shorthand typedef.
#define TC_LOG_INFO(filterType__,...)
@ 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)
std::vector< GothikWaveInfo > GothikWaveData
const uint32 CGUID_TRIGGER
static AreaBoundary *const livingSide
#define SPELL_DEATH_PLAGUE
#define SPELL_SHADOW_BOLT_VOLLEY
#define SPELL_ARCANE_EXPLOSION
std::set< GothikWaveEntry > GothikWave
#define SPELL_UNHOLY_AURA
static bool IsOnSameSide(Position const *who, Position const *other)
std::pair< uint32, uint8 > GothikWaveEntry
static AreaBoundary *const deadSide
const GothikWaveData waves25
std::pair< GothikWave, uint8 > GothikWaveInfo
static Side GetSide(Position const *who)
#define SPELL_UNHOLY_FRENZY
const GothikWaveData waves10
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)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
virtual void JustAppeared()
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
void SetCombatPulseDelay(uint32 delay)
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)
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
virtual void DoAction(int32)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
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(Position const &pos, 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, bool implicitDetect=false, bool distanceCheck=false, bool checkAlert=false) const
virtual void SetData(uint32, uint32)
void FilterTargets(std::list< WorldObject * > &targets)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
constexpr std::size_t size()
#define RegisterNaxxramasCreatureAI(ai_name)
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)