diff options
author | Souler <soulerhyd@gmail.com> | 2011-09-29 10:53:27 +0200 |
---|---|---|
committer | Souler <soulerhyd@gmail.com> | 2011-09-29 10:53:27 +0200 |
commit | 0f9fc672d55435fdc8b7e32c21423e1ec2cbe605 (patch) | |
tree | cadc9257362ed37fc3ad7a41d7503789cd0339f1 | |
parent | b492e5e38f0a1c9f55e295c7a75bfe57fe2b7a2b (diff) |
Core/Grids: Traps shouldn't target unattackable units.
Hunter traps and Basic Campfire will no longer activate unattackable creatures.
-rwxr-xr-x | src/server/game/Grids/Notifiers/GridNotifiers.h | 3 |
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: |