diff options
author | megamage <none@none> | 2009-02-13 20:12:01 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-13 20:12:01 -0600 |
commit | 1c3f478ecc5745b880ca6610d64aa5522eb24b1b (patch) | |
tree | abbaf56201c8b40f41bf5af20eb76c370ba32182 /src/game/GridNotifiers.h | |
parent | 59be8223e4f25e28ede94f9694a2b151caffd9ed (diff) | |
parent | 29f3d67fb8d47ea25291fa040f1cfd33b53c9da6 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/GridNotifiers.h')
-rw-r--r-- | src/game/GridNotifiers.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index 740ded8e17e..8df2cad8009 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -632,6 +632,23 @@ namespace Trinity float i_range; }; + class AnyUnfriendlyNoTotemUnitInObjectRangeCheck + { + public: + 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) && !((Creature*)u)->isTotem()) + return true; + else + return false; + } + private: + WorldObject const* i_obj; + Unit const* i_funit; + float i_range; + }; + class CreatureWithDbGUIDCheck { public: |