From 0f9fc672d55435fdc8b7e32c21423e1ec2cbe605 Mon Sep 17 00:00:00 2001 From: Souler Date: Thu, 29 Sep 2011 10:53:27 +0200 Subject: Core/Grids: Traps shouldn't target unattackable units. Hunter traps and Basic Campfire will no longer activate unattackable creatures. --- src/server/game/Grids/Notifiers/GridNotifiers.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 2ed74279224..843dff0f8ff 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -808,6 +808,9 @@ namespace Trinity if (u->GetTypeId() == TYPEID_UNIT && ((Creature*)u)->isTotem()) return false; + if(!u->isTargetableForAttack(false)) + return false; + return i_obj->IsWithinDistInMap(u, i_range) && !i_funit->IsFriendlyTo(u); } private: -- cgit v1.2.3