AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::NearestGameObjectCheck Class Reference

#include "GridNotifiers.h"

Public Member Functions

 NearestGameObjectCheck (WorldObject const &obj)
 
bool operator() (GameObject *go)
 

Private Member Functions

 NearestGameObjectCheck (NearestGameObjectCheck const &)
 

Private Attributes

WorldObject const & i_obj
 
float i_range
 

Detailed Description

Constructor & Destructor Documentation

◆ NearestGameObjectCheck() [1/2]

Acore::NearestGameObjectCheck::NearestGameObjectCheck ( WorldObject const &  obj)
inline
702: i_obj(obj), i_range(999) {}
float i_range
Definition: GridNotifiers.h:714
WorldObject const & i_obj
Definition: GridNotifiers.h:713

◆ NearestGameObjectCheck() [2/2]

Acore::NearestGameObjectCheck::NearestGameObjectCheck ( NearestGameObjectCheck const &  )
private

Member Function Documentation

◆ operator()()

bool Acore::NearestGameObjectCheck::operator() ( GameObject go)
inline
704 {
706 {
707 i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
708 return true;
709 }
710 return false;
711 }
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1321
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1245

References WorldObject::GetDistance(), i_obj, i_range, and WorldObject::IsWithinDistInMap().

Member Data Documentation

◆ i_obj

WorldObject const& Acore::NearestGameObjectCheck::i_obj
private

Referenced by operator()().

◆ i_range

float Acore::NearestGameObjectCheck::i_range
private

Referenced by operator()().