aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-07-01 20:40:07 +0200
committerShauren <shauren.trinity@gmail.com>2017-07-01 20:40:07 +0200
commit383b30041f6fdbc14c98cde63d1224c51b270847 (patch)
tree6abcad8f9ed00ae76c2e8ff5cc69f62a03130cc3 /src
parente2a1ccd118d129b96e09ff1a15ed0adb1d4a3897 (diff)
Nopch fix
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp5
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 50a94caa1fa..0166a3b2880 100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -259,6 +259,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)
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index 27542ebd3d1..0aaf7424c8f 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -67,8 +67,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;
};