TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::NearestGameObjectEntryInObjectRangeCheck Class Reference

#include <GridNotifiers.h>

Public Member Functions

 NearestGameObjectEntryInObjectRangeCheck (WorldObject const &obj, uint32 entry, float range)
 
bool operator() (GameObject *go)
 
float GetLastRange () const
 

Private Member Functions

 NearestGameObjectEntryInObjectRangeCheck (NearestGameObjectEntryInObjectRangeCheck const &)
 

Private Attributes

WorldObject consti_obj
 
uint32 i_entry
 
float i_range
 

Constructor & Destructor Documentation

Trinity::NearestGameObjectEntryInObjectRangeCheck::NearestGameObjectEntryInObjectRangeCheck ( WorldObject const obj,
uint32  entry,
float  range 
)
inline
695 : i_obj(obj), i_entry(entry), i_range(range) { }
float i_range
Definition: GridNotifiers.h:709
WorldObject const & i_obj
Definition: GridNotifiers.h:707
uint32 i_entry
Definition: GridNotifiers.h:708
Trinity::NearestGameObjectEntryInObjectRangeCheck::NearestGameObjectEntryInObjectRangeCheck ( NearestGameObjectEntryInObjectRangeCheck const )
private

Member Function Documentation

float Trinity::NearestGameObjectEntryInObjectRangeCheck::GetLastRange ( ) const
inline
705 { return i_range; }
float i_range
Definition: GridNotifiers.h:709
bool Trinity::NearestGameObjectEntryInObjectRangeCheck::operator() ( GameObject go)
inline
697  {
698  if (go->GetEntry() == i_entry && i_obj.IsWithinDistInMap(go, i_range))
699  {
700  i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
701  return true;
702  }
703  return false;
704  }
float i_range
Definition: GridNotifiers.h:709
WorldObject const & i_obj
Definition: GridNotifiers.h:707
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1594
uint32 GetEntry() const
Definition: Object.h:107
uint32 i_entry
Definition: GridNotifiers.h:708

+ Here is the call graph for this function:

Member Data Documentation

uint32 Trinity::NearestGameObjectEntryInObjectRangeCheck::i_entry
private
WorldObject const& Trinity::NearestGameObjectEntryInObjectRangeCheck::i_obj
private
float Trinity::NearestGameObjectEntryInObjectRangeCheck::i_range
private

The documentation for this class was generated from the following file: