aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-09-17 00:56:59 +0200
committerQAston <qaston@gmail.com>2011-09-17 00:56:59 +0200
commitfe25ce4fa3ce306beebc4c95b22cd14052a92566 (patch)
treee8bbe02f5b43e8d648230cb2532dd24780ff113e /src/server/scripts/World
parent580264b5a56f742e5eaf1eeb2ea3729740e36478 (diff)
Core/AI: Replace many Unit::IsHostileTo with Unit::IsValidAttackTarget or Creature::canCreatureAttack.
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/npcs_special.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index e95211412ff..392e20734a8 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -179,7 +179,7 @@ public:
if (!SpawnAssoc)
return;
- if (who->isTargetableForAttack() && me->IsHostileTo(who))
+ if (me->IsValidAttackTarget(who))
{
Player* playerTarget = who->ToPlayer();
@@ -1718,7 +1718,7 @@ public:
//Redefined for random target selection:
void MoveInLineOfSight(Unit* who)
{
- if (!me->getVictim() && who->isTargetableForAttack() && (me->IsHostileTo(who)) && who->isInAccessiblePlaceFor(me))
+ if (!me->getVictim() && me->canCreatureAttack(who))
{
if (me->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
return;