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
659: i_unit(unit), i_focusId(focusId) {}
Unit const * i_unit
Definition: GridNotifiers.h:676
uint32 i_focusId
Definition: GridNotifiers.h:677

Member Function Documentation

◆ operator()()

bool Acore::GameObjectFocusCheck::operator() ( GameObject go) const
inline
661 {
663 return false;
664
665 if (!go->isSpawned()) // xinef: dont allow to count deactivated objects
666 return false;
667
669 return false;
670
671 float dist = (float)((go->GetGOInfo()->spellFocus.dist) / 2);
672
673 return go->IsWithinDistInMap(i_unit, dist);
674 }
@ GAMEOBJECT_TYPE_SPELL_FOCUS
Definition: SharedDefines.h:1568
bool IsWithinDistInMap(Player const *player) const
Definition: GameObject.cpp:3005
GameObjectTemplate const * GetGOInfo() const
Definition: GameObject.h:136
bool isSpawned() const
Definition: GameObject.h:189
uint32 dist
Definition: GameObjectData.h:143
uint32 type
Definition: GameObjectData.h:33
uint32 focusId
Definition: GameObjectData.h:142
struct GameObjectTemplate::@230::@239 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()().