fix(Core/Scripts): Sepethrea should prioritize players that don't hav… (#16412)

* fix(Core/Scripts): Sepethrea should prioritize players that don't have Dragon's breath aura

* oops
This commit is contained in:
Angelo Venturini
2023-05-31 23:26:26 -03:00
committed by GitHub
parent 8a807161ed
commit d4150b8e08

View File

@@ -54,6 +54,24 @@ struct boss_nethermancer_sepethrea : public BossAI
});
}
bool CanAIAttack(Unit const* target) const override
{
if (me->GetThreatMgr().GetThreatListSize() > 1)
{
ThreatContainer::StorageType::const_iterator lastRef = me->GetThreatMgr().GetOnlineContainer().GetThreatList().end();
--lastRef;
if (Unit* lastTarget = (*lastRef)->getTarget())
{
if (lastTarget != target)
{
return !target->HasAura(SPELL_DRAGONS_BREATH);
}
}
}
return true;
}
void JustEngagedWith(Unit* /*who*/) override
{
_JustEngagedWith();