Nopch fix

This commit is contained in:
Shauren authored and Ovahlord committed 2020-07-22 13:46:12 +02:00
1 parent ec04d3b2cd
commit 6ea79fd691
2 files changed
+6 -2

No files matched your search

+5
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)
+1 -2
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;
};