AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
UnboundPlagueTargetSelector Class Reference

Public Member Functions

 UnboundPlagueTargetSelector (Creature *source)
 
bool operator() (WorldObject *object) const
 

Private Attributes

Creature const * _source
 

Detailed Description

Constructor & Destructor Documentation

◆ UnboundPlagueTargetSelector()

UnboundPlagueTargetSelector::UnboundPlagueTargetSelector ( Creature *  source)
inline
187: _source(source) { }
Creature const * _source
Definition boss_professor_putricide.cpp:203

Member Function Documentation

◆ operator()()

bool UnboundPlagueTargetSelector::operator() ( WorldObject *  object) const
inline
190 {
191 if (!object)
192 return false;
193 if (Player* p = object->ToPlayer())
194 {
195 if (p == _source->GetVictim() || p->GetExactDist(_source) >= 45.0f)
196 return false;
197
198 return true;
199 }
200 return false;
201 }
Player * ToPlayer()
Definition Object.h:208
Definition Player.h:1086
Unit * GetVictim() const
Definition Unit.h:904
float GetExactDist(float x, float y, float z) const
Definition Position.h:182

References _source, Position::GetExactDist(), Unit::GetVictim(), and Object::ToPlayer().

Member Data Documentation

◆ _source

Creature const* UnboundPlagueTargetSelector::_source
private

Referenced by operator()().


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