90#define SPELLHELPER_UNHOLY_FRENZY RAID_MODE<uint32>(SPELL_UNHOLY_FRENZY,27995)
158 Player* player = it->GetSource();
444 std::list<Creature*> triggers;
447 for (
uint8 i = 0; i < entry.second; ++i)
471 if (trigger && trigger->GetSpawnId() == targetDBGuid)
488 if (summon->IsAlive() && (!summon->IsInCombat() || summon->IsInEvadeMode()))
737 Creature *knightTarget =
nullptr, *riderTarget =
nullptr, *horseTarget =
nullptr, *gothikTarget =
nullptr;
738 for (
Creature* pTarget : potentialTargets)
740 switch (pTarget->GetEntry())
743 knightTarget = pTarget;
746 riderTarget = pTarget;
749 horseTarget = pTarget;
752 gothikTarget = pTarget;
758 Creature* target = knightTarget ? knightTarget : riderTarget ? riderTarget : horseTarget ? horseTarget : gothikTarget ? gothikTarget :
nullptr;
807 std::list<Creature*> triggers;
811 if (trigger && trigger->GetSpawnId() == targetDBGuid)
819 switch (spellInfo->
Id)
859 gothik->AI()->JustSummoned(summon);
864 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
std::set< GothikWaveEntry > GothikWave
@ SPELL_SHADOW_BOLT_VOLLEY
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)
const GothikWaveData waves10
#define SPELLHELPER_UNHOLY_FRENZY
static Player * FindEligibleTarget(Creature const *me, bool isGateOpen)
bool IsWithinBoundary(Position const *pos) const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
@ EVADE_REASON_NO_HOSTILES
Creature * DoSummon(uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
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)
bool IsInPhase(PhaseIndex phase) const
void CancelEvent(EventId eventId)
void SetPhase(PhaseIndex phase)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
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)
void DoMeleeAttackIfReady()
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()
void StopMoving(bool force=false)
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)
PrepareSpellScript(spell_gothik_shadow_bolt_volley)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
#define RegisterNaxxramasCreatureAI(ai_name)
float GetPositionZ() const
float GetOrientation() const
float GetPositionX() const
float GetPositionY() const
void AttackStart(Unit *) override
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)
npc_gothik_minion_livingrider(Creature *creature)
void _UpdateAI(uint32 diff)
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)
npc_gothik_minion_spectralrider(Creature *creature)
void _UpdateAI(uint32 diff)
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)