From fe25ce4fa3ce306beebc4c95b22cd14052a92566 Mon Sep 17 00:00:00 2001 From: QAston Date: Sat, 17 Sep 2011 00:56:59 +0200 Subject: Core/AI: Replace many Unit::IsHostileTo with Unit::IsValidAttackTarget or Creature::canCreatureAttack. --- src/server/scripts/World/npcs_special.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/scripts/World') 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; -- cgit v1.2.3