120 auto it = list.begin(), end = list.end();
127 if ((*it)->GetVictim() != currentVictim)
129 if ((!secondThreat ||
Is25ManRaid()) && (++it != end && (*it)->IsAvailable()))
131 if ((*it)->GetVictim() != currentVictim)
132 (secondThreat ? thirdThreat : secondThreat) = *it;
133 if (!thirdThreat &&
Is25ManRaid() && (++it != end && (*it)->IsAvailable()))
137 Unit* pHatefulTarget =
nullptr;
139 pHatefulTarget = currentVictim;
140 else if (!thirdThreat)
141 pHatefulTarget = secondThreat->
GetVictim();
@ ACHIEVEMENT_TIMED_TYPE_EVENT
std::chrono::seconds Seconds
Seconds shorthand typedef.
@ ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT
@ SPELL_HATEFUL_STRIKE_PRIMER
void AddSC_boss_patchwerk()
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
@ EVADE_REASON_NO_HOSTILES
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void Repeat(Milliseconds time)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Unit * GetCurrentVictim()
std::vector< ThreatReference * > GetModifiableThreatList()
void AddThreat(float amount)
void DoMeleeAttackIfReady()
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
ThreatManager & GetThreatManager()
#define RegisterNaxxramasCreatureAI(ai_name)
bool HealthAbovePct(uint32 pct) const
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
boss_patchwerk(Creature *creature)
void JustEngagedWith(Unit *who) override
void KilledUnit(Unit *) override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override