diff options
author | megamage <none@none> | 2009-06-04 16:18:52 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-04 16:18:52 -0500 |
commit | 797fa43274af9277f7403566dd483f97c98bdcff (patch) | |
tree | 282f8773c9217460766108b27ee31bae71eb1798 /src/game/GridNotifiers.h | |
parent | 8bb75918a85263493fca49be1993d373f8d2b5fa (diff) |
[7952] Implement rogue talent 51690. Author: Lightguard
--HG--
branch : trunk
Diffstat (limited to 'src/game/GridNotifiers.h')
-rw-r--r-- | src/game/GridNotifiers.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index 25caa970c39..dd82ea2bd78 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -803,6 +803,25 @@ namespace Trinity float i_range; }; + class AnyUnfriendlyVisibleUnitInObjectRangeCheck + { + public: + AnyUnfriendlyVisibleUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) + : i_obj(obj), i_funit(funit), i_range(range) {} + + bool operator()(Unit* u) + { + return u->isAlive() + && i_obj->IsWithinDistInMap(u, i_range) + && !i_funit->IsFriendlyTo(u) + && u->isVisibleForOrDetect(i_funit, false); + } + private: + WorldObject const* i_obj; + Unit const* i_funit; + float i_range; + }; + class CreatureWithDbGUIDCheck { public: |