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

#include <GridNotifiers.h>

Public Member Functions

 NearestGameObjectTypeInObjectRangeCheck (WorldObject const &obj, GameobjectTypes type, float range)
 
bool operator() (GameObject *go)
 
float GetLastRange () const
 

Private Member Functions

 NearestGameObjectTypeInObjectRangeCheck (NearestGameObjectTypeInObjectRangeCheck const &)
 

Private Attributes

WorldObject consti_obj
 
GameobjectTypes i_type
 
float i_range
 

Constructor & Destructor Documentation

Trinity::NearestGameObjectTypeInObjectRangeCheck::NearestGameObjectTypeInObjectRangeCheck ( WorldObject const obj,
GameobjectTypes  type,
float  range 
)
inline
719 : i_obj(obj), i_type(type), i_range(range) { }
float i_range
Definition: GridNotifiers.h:733
WorldObject const & i_obj
Definition: GridNotifiers.h:731
GameobjectTypes i_type
Definition: GridNotifiers.h:732
Trinity::NearestGameObjectTypeInObjectRangeCheck::NearestGameObjectTypeInObjectRangeCheck ( NearestGameObjectTypeInObjectRangeCheck const )
private

Member Function Documentation

float Trinity::NearestGameObjectTypeInObjectRangeCheck::GetLastRange ( ) const
inline
729 { return i_range; }
float i_range
Definition: GridNotifiers.h:733
bool Trinity::NearestGameObjectTypeInObjectRangeCheck::operator() ( GameObject go)
inline
721  {
722  if (go->GetGoType() == i_type && i_obj.IsWithinDistInMap(go, i_range))
723  {
724  i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
725  return true;
726  }
727  return false;
728  }
float i_range
Definition: GridNotifiers.h:733
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
WorldObject const & i_obj
Definition: GridNotifiers.h:731
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1594
GameobjectTypes GetGoType() const
Definition: GameObject.h:964
GameobjectTypes i_type
Definition: GridNotifiers.h:732

+ Here is the call graph for this function:

Member Data Documentation

WorldObject const& Trinity::NearestGameObjectTypeInObjectRangeCheck::i_obj
private
float Trinity::NearestGameObjectTypeInObjectRangeCheck::i_range
private
GameobjectTypes Trinity::NearestGameObjectTypeInObjectRangeCheck::i_type
private

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