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
186: _source(source) { }
Creature const * _source
Definition boss_professor_putricide.cpp:202

Member Function Documentation

◆ operator()()

bool UnboundPlagueTargetSelector::operator() ( WorldObject object) const
inline
189 {
190 if (!object)
191 return false;
192 if (Player* p = object->ToPlayer())
193 {
194 if (p == _source->GetVictim() || p->GetExactDist(_source) >= 45.0f)
195 return false;
196
197 return true;
198 }
199 return false;
200 }
Player * ToPlayer()
Definition Object.h:202
Definition Player.h:1084
Unit * GetVictim() const
Definition Unit.h:903
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: