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

Member Function Documentation

◆ operator()()

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

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

Member Data Documentation

◆ _source

Creature const* UnboundPlagueTargetSelector::_source
private

Referenced by operator()().