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

#include "GridNotifiers.h"

Public Member Functions

 AnyPlayerExactPositionInGameObjectRangeCheck (GameObject const *go, float range)
 
bool operator() (Player *u)
 

Private Attributes

GameObject const * _go
 
float _range
 

Detailed Description

Constructor & Destructor Documentation

◆ AnyPlayerExactPositionInGameObjectRangeCheck()

Acore::AnyPlayerExactPositionInGameObjectRangeCheck::AnyPlayerExactPositionInGameObjectRangeCheck ( GameObject const *  go,
float  range 
)
inline
1390: _go(go), _range(range) {}
GameObject const * _go
Definition: GridNotifiers.h:1400
float _range
Definition: GridNotifiers.h:1401

Member Function Documentation

◆ operator()()

bool Acore::AnyPlayerExactPositionInGameObjectRangeCheck::operator() ( Player u)
inline
1392 {
1393 if (!_go->IsInRange(u->GetPositionX(), u->GetPositionY(), u->GetPositionZ(), _range))
1394 return false;
1395
1396 return true;
1397 }
bool IsInRange(float x, float y, float z, float radius) const
Definition: GameObject.cpp:2160
float GetPositionZ() const
Definition: Position.h:118
float GetPositionX() const
Definition: Position.h:116
float GetPositionY() const
Definition: Position.h:117

References _go, _range, Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), and GameObject::IsInRange().

Member Data Documentation

◆ _go

GameObject const* Acore::AnyPlayerExactPositionInGameObjectRangeCheck::_go
private

Referenced by operator()().

◆ _range

float Acore::AnyPlayerExactPositionInGameObjectRangeCheck::_range
private

Referenced by operator()().