Nopch fix

This commit is contained in:
Shauren
2017-07-01 20:40:07 +02:00
committed by Ovahlord
parent ec04d3b2cd
commit 6ea79fd691
2 changed files with 6 additions and 2 deletions

View File

@@ -258,6 +258,11 @@ 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 ? unit->GetThreatManager().GetCurrentVictim() : nullptr), m_aura(aura)
{
}
bool DefaultTargetSelector::operator()(Unit const* target) const
{
if (!me)

View File

@@ -66,8 +66,7 @@ struct TC_GAME_API DefaultTargetSelector
// playerOnly: self explaining
// withMainTank: allow current tank to be selected
// aura: if 0: ignored, if > 0: the target shall have the aura, if < 0, the target shall NOT have the aura
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(Unit const* unit, float dist, bool playerOnly, bool withMainTank, int32 aura);
bool operator()(Unit const* target) const;
};