From 17e0c43d20a644aa65df9364762952679ee1f7c6 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 12 Mar 2009 17:10:23 -0600 Subject: *Fix a typo of that last rev. --HG-- branch : trunk --- src/game/GridNotifiers.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index ba487dec55f..daa8296674a 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -600,14 +600,13 @@ namespace Trinity AnyUnfriendlyNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) {} bool operator()(Unit* u) { - if(u->isAlive() && i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u)) - { - if (u->GetTypeId()==TYPEID_UNIT && !((Creature*)u)->isTotem()) - return false; - return true; - } - else + if(!u->isAlive()) return false; + + if(u->GetTypeId()==TYPEID_UNIT && ((Creature*)u)->isTotem()) + return false; + + return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u); } private: WorldObject const* i_obj; -- cgit v1.2.3