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

Member Function Documentation

◆ operator()()

bool UnboundPlagueTargetSelector::operator() ( WorldObject object) const
inline
187 {
188 if (!object)
189 return false;
190 if (Player* p = object->ToPlayer())
191 {
192 if (p == _source->GetVictim() || p->GetExactDist(_source) >= 45.0f)
193 return false;
194
195 return true;
196 }
197 return false;
198 }
Player * ToPlayer()
Definition: Object.h:195
float GetExactDist(float x, float y, float z) const
Definition: Position.h:178
Definition: Player.h:1046
Unit * GetVictim() const
Definition: Unit.h:1386

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

Member Data Documentation

◆ _source

Creature const* UnboundPlagueTargetSelector::_source
private

Referenced by operator()().