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

#include "GridNotifiers.h"

Public Member Functions

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

Private Attributes

Unit const * i_unit
 
uint32 i_focusId
 

Detailed Description

Constructor & Destructor Documentation

◆ GameObjectFocusCheck()

Acore::GameObjectFocusCheck::GameObjectFocusCheck ( Unit const *  unit,
uint32  focusId 
)
inline
656: i_unit(unit), i_focusId(focusId) {}
Unit const * i_unit
Definition: GridNotifiers.h:673
uint32 i_focusId
Definition: GridNotifiers.h:674

Member Function Documentation

◆ operator()()

bool Acore::GameObjectFocusCheck::operator() ( GameObject go) const
inline
658 {
660 return false;
661
662 if (!go->isSpawned()) // xinef: dont allow to count deactivated objects
663 return false;
664
666 return false;
667
668 float dist = (float)((go->GetGOInfo()->spellFocus.dist) / 2);
669
670 return go->IsWithinDistInMap(i_unit, dist);
671 }
@ GAMEOBJECT_TYPE_SPELL_FOCUS
Definition: SharedDefines.h:1540
bool IsWithinDistInMap(Player const *player) const
Definition: GameObject.cpp:3048
GameObjectTemplate const * GetGOInfo() const
Definition: GameObject.h:138
bool isSpawned() const
Definition: GameObject.h:191
uint32 dist
Definition: GameObjectData.h:144
uint32 type
Definition: GameObjectData.h:34
uint32 focusId
Definition: GameObjectData.h:143
struct GameObjectTemplate::@215::@224 spellFocus

References GameObjectTemplate::dist, GameObjectTemplate::focusId, GAMEOBJECT_TYPE_SPELL_FOCUS, GameObject::GetGOInfo(), i_focusId, i_unit, GameObject::isSpawned(), GameObject::IsWithinDistInMap(), GameObjectTemplate::spellFocus, and GameObjectTemplate::type.

Member Data Documentation

◆ i_focusId

uint32 Acore::GameObjectFocusCheck::i_focusId
private

Referenced by operator()().

◆ i_unit

Unit const* Acore::GameObjectFocusCheck::i_unit
private

Referenced by operator()().