aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-05-12 12:08:47 +0200
committerShauren <shauren.trinity@gmail.com>2011-05-12 12:08:47 +0200
commit82b5f9c629224e2d1737ea525cd46dac95037e8f (patch)
treeca7e32cd5394a58b3c9592c9e6507dd577007942 /src
parent28c002f77ebe0d93eef3649e7dd3e7ac9f33b301 (diff)
Scripts: Fixed compile
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/AI/CoreAI/UnitAI.h14
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp8
2 files changed, 12 insertions, 10 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index bfc87c8db8c..71034d4c333 100755
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -62,33 +62,33 @@ struct DefaultTargetSelector : public std::unary_function<Unit* , bool>
// aura: if 0: ignored, if > 0: the target shall have the aura, if < 0, the target shall NOT have the aura
DefaultTargetSelector(Unit const* pUnit, float dist, bool playerOnly, int32 aura) : me(pUnit), m_dist(dist), m_playerOnly(playerOnly), m_aura(aura) {}
- bool operator() (Unit const* pTarget)
+ bool operator()(Unit const* target) const
{
if (!me)
return false;
- if (!pTarget)
+ if (!target)
return false;
- if (m_playerOnly && (pTarget->GetTypeId() != TYPEID_PLAYER))
+ if (m_playerOnly && (target->GetTypeId() != TYPEID_PLAYER))
return false;
- if (m_dist > 0.0f && !me->IsWithinCombatRange(pTarget, m_dist))
+ if (m_dist > 0.0f && !me->IsWithinCombatRange(target, m_dist))
return false;
- if (m_dist < 0.0f && me->IsWithinCombatRange(pTarget, -m_dist))
+ if (m_dist < 0.0f && me->IsWithinCombatRange(target, -m_dist))
return false;
if (m_aura)
{
if (m_aura > 0)
{
- if (!pTarget->HasAura(m_aura))
+ if (!target->HasAura(m_aura))
return false;
}
else
{
- if (pTarget->HasAura(-m_aura))
+ if (target->HasAura(-m_aura))
return false;
}
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
index fff19b5cbb4..f2e0bf6e503 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
@@ -244,11 +244,13 @@ const Position PosWeavers[MAX_WEAVERS] =
};
// predicate function to select not charmed target
-struct NotCharmedTargetSelector : public std::unary_function<Unit *, bool> {
+struct NotCharmedTargetSelector : public std::unary_function<Unit*, bool>
+{
NotCharmedTargetSelector() {}
- bool operator() (const Unit *pTarget) {
- return (!pTarget->isCharmed());
+ bool operator()(Unit const* target) const
+ {
+ return !target->isCharmed();
}
};