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

#include <GridNotifiers.h>

Public Member Functions

 GameObjectFocusCheck (Unit const *unit, uint32 focusId)
 
bool operator() (GameObject *go) const
 

Private Attributes

Unit consti_unit
 
uint32 i_focusId
 

Constructor & Destructor Documentation

Trinity::GameObjectFocusCheck::GameObjectFocusCheck ( Unit const unit,
uint32  focusId 
)
inline
628 : i_unit(unit), i_focusId(focusId) { }
uint32 i_focusId
Definition: GridNotifiers.h:643
Unit const * i_unit
Definition: GridNotifiers.h:642

Member Function Documentation

bool Trinity::GameObjectFocusCheck::operator() ( GameObject go) const
inline
630  {
632  return false;
633 
634  if (go->GetGOInfo()->spellFocus.spellFocusType != i_focusId)
635  return false;
636 
637  float dist = go->GetGOInfo()->spellFocus.radius / 2.f;
638 
639  return go->IsWithinDistInMap(i_unit, dist);
640  }
Definition: SharedDefines.h:2073
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
GameObjectTemplate const * GetGOInfo() const
Definition: GameObject.h:894
uint32 i_focusId
Definition: GridNotifiers.h:643
struct GameObjectTemplate::@221::@231 spellFocus
Unit const * i_unit
Definition: GridNotifiers.h:642
uint32 type
Definition: GameObject.h:37

+ Here is the call graph for this function:

Member Data Documentation

uint32 Trinity::GameObjectFocusCheck::i_focusId
private
Unit const* Trinity::GameObjectFocusCheck::i_unit
private

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