62#define SPELL_UNHOLY_SHADOW RAID_MODE<uint32>(28882, 57369)
63#define SPELL_METEOR RAID_MODE<uint32>(28884, 57467)
64#define SPELL_SHADOW_BOLT RAID_MODE<uint32>(57374, 57464)
65#define SPELL_VOID_ZONE RAID_MODE<uint32>(28863, 57463)
66#define SPELL_HOLY_BOLT RAID_MODE<uint32>(57376, 57465)
67#define SPELL_HOLY_WRATH RAID_MODE<uint32>(28883, 57466)
111static const Position baronPath[3] = { { 2552.427f, -2969.737f, 241.3021f },{ 2566.759f, -2972.535f, 241.3217f },{ 2584.32f, -2971.96f, 241.3489f } };
112static const Position thanePath[3] = { { 2540.095f, -2983.192f, 241.3344f },{ 2546.005f, -2999.826f, 241.3665f },{ 2542.697f, -3014.055f, 241.3371f } };
113static const Position ladyPath[3] = { { 2507.94f, -2961.444f, 242.4557f },{ 2488.763f, -2960.007f, 241.2757f },{ 2468.26f, -2947.499f, 241.2753f } };
114static const Position sirPath[3] = { { 2533.141f, -2922.14f, 241.2764f },{ 2525.254f, -2905.907f, 241.2761f },{ 2517.636f, -2897.253f, 241.2758f } };
143 uint32 minTime = 0, maxTime = 0;
150 TC_LOG_WARN(
"scripts",
"FourHorsemenAI: Checking for achievement credit but horseman {} is reporting not dead", cBoss->GetName());
153 if (!minTime || deathTime < minTime)
155 if (!maxTime || deathTime > maxTime)
160 TC_LOG_WARN(
"scripts",
"FourHorsemenAI: Checking for achievement credit but horseman with id {} is not present",
uint32(boss));
198 TC_LOG_WARN(
"scripts",
"FourHorsemenAI: Checking if movement is finished but horseman with id {} is not present",
uint32(boss));
227 if (!cBoss->IsAlive())
234 cBoss->setActive(
true);
235 cBoss->SetFarVisible(
true);
239 if (
Player* player = it->GetSource())
241 if (player->IsGameMaster())
244 if (player->IsAlive())
255 TC_LOG_WARN(
"scripts",
"FourHorsemenAI: Encounter starting but horseman with id {} is not present",
uint32(boss));
270 cBoss->DespawnOrUnsummon(0s, 15s);
272 TC_LOG_WARN(
"scripts",
"FourHorsemenAI: Encounter resetting but horseman with id {} is not present",
uint32(boss));
334 if (cBoss->IsAlive())
std::chrono::seconds Seconds
Seconds shorthand typedef.
#define TC_LOG_WARN(filterType__,...)
Milliseconds randtime(Milliseconds min, Milliseconds max)
#define RegisterSpellScript(spell_script)
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define AuraEffectApplyFn(F, I, N, M)
uint32 getMSTimeDiff(uint32 oldMSTime, uint32 newMSTime)
static const Position sirPath[3]
static const Position thanePath[3]
@ DATA_HORSEMEN_IS_TIMED_KILL
static const std::vector< Horseman > horsemen
#define SPELL_UNHOLY_SHADOW
static const Position ladyPath[3]
static const Position baronPath[3]
#define SPELL_SHADOW_BOLT
void AddSC_boss_four_horsemen()
HookList< EffectApplyHandler > AfterEffectApply
uint8 GetStackAmount() const
InstanceScript *const instance
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetCombatPulseDelay(uint32 delay)
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
void SetRespawnTime(uint32 respawn)
void SetReactState(ReactStates st)
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
virtual bool SetBossState(uint32 id, EncounterState state)
virtual ObjectGuid GetGuidData(uint32 type) const override
EncounterState GetBossState(uint32 id) const
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
PlayerList const & GetPlayers() const
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
Unit * GetCurrentVictim()
bool IsThreatListEmpty(bool includeOffline=false) const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
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)
ThreatManager & GetThreatManager()
MotionMaster * GetMotionMaster()
bool HasUnitState(const uint32 f) const
Player * SelectNearestPlayer(float range) const
std::string const & GetName() const
void OnApply(AuraEffect const *, AuraEffectHandleModes)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
@ DATA_HORSEMEN_CHECK_ACHIEVEMENT_CREDIT
#define RegisterNaxxramasCreatureAI(ai_name)
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void SetCombatMovement(bool allowMovement)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
boss_four_horsemen_baron(Creature *creature)
void BeginFighting() override
void _UpdateAI(uint32 diff) override
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
void KilledUnit(Unit *victim) override
uint32 GetData(uint32 type) const override
Creature * getHorsemanHandle(Horseman who) const
virtual void BeginFighting()=0
Position const * _initialPath
bool _ourMovementFinished
void DoAction(int32 action) override
void MovementInform(uint32 type, uint32 i) override
boss_four_horsemen_baseAI(Creature *creature, Horseman which, Position const *initialPath)
void CheckIsMovementFinished()
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
virtual void _UpdateAI(uint32)=0
void EnterEvadeMode(EvadeReason) override
void JustDied(Unit *) override
void BeginFighting() override
boss_four_horsemen_lady(Creature *creature)
void _UpdateAI(uint32 diff) override
boss_four_horsemen_sir(Creature *creature)
void _UpdateAI(uint32 diff) override
void BeginFighting() override
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
void BeginFighting() override
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
boss_four_horsemen_thane(Creature *creature)
void _UpdateAI(uint32 diff) override