mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Nopch fix
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user