diff options
| author | Gildor <gildor55@gmail.com> | 2020-04-12 15:28:01 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-01-01 15:05:01 +0100 |
| commit | 60e66621dae44cb832ebb0bdb5e168f9ab114ecb (patch) | |
| tree | cb6b64c580921ffca2af15e24e949415854542eb /src/server/game/Grids | |
| parent | 2aa5f4e1b2f1bc0cd956127fc53cac680c9aaf67 (diff) | |
Core/Gameobjects: Improve stealth detection (#24417)
* Core/Gameobjects: Improve stealth detection
* fix warning: private field 'i_funit' is not used
* Code cleanup
* add comment
Co-authored-by: jackpoz <giacomopoz@gmail.com>
(cherry picked from commit 862097a63351e957fd4aa6cb82fe7d9edf4d3926)
Diffstat (limited to 'src/server/game/Grids')
| -rw-r--r-- | src/server/game/Grids/Notifiers/GridNotifiers.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 9481e44299e..c7c59fca05d 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -945,7 +945,7 @@ namespace Trinity class NearestAttackableNoTotemUnitInObjectRangeCheck { public: - NearestAttackableNoTotemUnitInObjectRangeCheck(WorldObject const* obj, Unit const* funit, float range) : i_obj(obj), i_funit(funit), i_range(range) { } + NearestAttackableNoTotemUnitInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj), i_range(range) { } bool operator()(Unit* u) { @@ -961,7 +961,7 @@ namespace Trinity if (!u->isTargetableForAttack(false)) return false; - if (!i_obj->IsWithinDistInMap(u, i_range) || !i_funit->IsValidAttackTarget(u)) + if (!i_obj->IsWithinDistInMap(u, i_range) || !i_obj->IsValidAttackTarget(u)) return false; i_range = i_obj->GetDistance(*u); @@ -970,7 +970,6 @@ namespace Trinity private: WorldObject const* i_obj; - Unit const* i_funit; float i_range; }; |
