mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Woopsie. Fix an oversight causing the main tank flag in SelectTarget to be inverted.
(cherry picked from commit 9bacaf15b6)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user