aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSouler <soulerhyd@gmail.com>2011-09-29 10:53:27 +0200
committerSouler <soulerhyd@gmail.com>2011-09-29 10:53:27 +0200
commit0f9fc672d55435fdc8b7e32c21423e1ec2cbe605 (patch)
treecadc9257362ed37fc3ad7a41d7503789cd0339f1 /src
parentb492e5e38f0a1c9f55e295c7a75bfe57fe2b7a2b (diff)
Core/Grids: Traps shouldn't target unattackable units.
Hunter traps and Basic Campfire will no longer activate unattackable creatures.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h3
1 files changed, 3 insertions, 0 deletions
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: