Woopsie. Fix an oversight causing the main tank flag in SelectTarget to be inverted.

(cherry picked from commit 9bacaf15b6)
This commit is contained in:
treeston
2017-07-09 02:53:00 +02:00
committed by Shauren
parent 2dfafa69eb
commit 1e6480ee35

View File

@@ -327,8 +327,8 @@ void UnitAI::SortByDistance(std::list<Unit*> list, bool ascending)
list.sort(Trinity::ObjectDistanceOrderPred(me, ascending));
}
DefaultTargetSelector::DefaultTargetSelector(Unit const* unit, float dist, bool playerOnly, bool withMainTank, int32 aura)
: me(unit), m_dist(dist), m_playerOnly(playerOnly), except(withMainTank ? me->GetThreatManager().GetCurrentVictim() : nullptr), m_aura(aura)
DefaultTargetSelector::DefaultTargetSelector(Unit const* unit, float dist, bool playerOnly, bool withTank, int32 aura)
: me(unit), m_dist(dist), m_playerOnly(playerOnly), except(!withTank ? me->GetThreatManager().GetCurrentVictim() : nullptr), m_aura(aura)
{
}
@@ -340,7 +340,7 @@ bool DefaultTargetSelector::operator()(Unit const* target) const
if (!target)
return false;
if (target == except)
if (except && target == except)
return false;
if (m_playerOnly && (target->GetTypeId() != TYPEID_PLAYER))