diff options
| author | QAston <qaston@gmail.com> | 2011-09-17 00:56:59 +0200 |
|---|---|---|
| committer | QAston <qaston@gmail.com> | 2011-09-17 00:56:59 +0200 |
| commit | fe25ce4fa3ce306beebc4c95b22cd14052a92566 (patch) | |
| tree | e8bbe02f5b43e8d648230cb2532dd24780ff113e /src/server/game/Grids/Notifiers | |
| parent | 580264b5a56f742e5eaf1eeb2ea3729740e36478 (diff) | |
Core/AI: Replace many Unit::IsHostileTo with Unit::IsValidAttackTarget or Creature::canCreatureAttack.
Diffstat (limited to 'src/server/game/Grids/Notifiers')
| -rwxr-xr-x | src/server/game/Grids/Notifiers/GridNotifiers.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 27e8706fa37..ec93c3c5580 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -902,12 +902,10 @@ namespace Trinity bool operator()(Unit* u) { // Check contains checks for: live, non-selectable, non-attackable flags, flight check and GM check, ignore totems - if (!u->isTargetableForAttack()) - return false; if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem()) return false; - if ((i_targetForPlayer ? !i_funit->IsFriendlyTo(u) : i_funit->IsHostileTo(u))&& i_obj->IsWithinDistInMap(u, i_range)) + if (i_funit->IsValidAttackTarget(u) && i_obj->IsWithinDistInMap(u, i_range)) return true; return false; |
