AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
DefileTargetSelector Struct Reference

Public Member Functions

 DefileTargetSelector (Creature *source)
 
bool operator() (Unit const *target) const
 

Private Attributes

Creature const * _source
 

Detailed Description

Constructor & Destructor Documentation

◆ DefileTargetSelector()

DefileTargetSelector::DefileTargetSelector ( Creature source)
inline
442: _source(source) { }
Creature const * _source
Definition: boss_the_lich_king.cpp:461

Member Function Documentation

◆ operator()()

bool DefileTargetSelector::operator() ( Unit const *  target) const
inline
444 {
445 if (!target)
446 return false;
447 if (!target->IsAlive())
448 return false;
449 if (!target->IsPlayer())
450 return false;
451 if (_source->GetExactDist(target) > 100.0f)
452 return false;
453 if (target->HasAura(SPELL_HARVEST_SOUL_VALKYR) || target->HasAura(SPELL_VALKYR_TARGET_SEARCH))
454 return false;
455 if (!_source->IsWithinLOSInMap(target))
456 return false;
457 return true;
458 }
@ SPELL_VALKYR_TARGET_SEARCH
Definition: boss_the_lich_king.cpp:144
@ SPELL_HARVEST_SOUL_VALKYR
Definition: boss_the_lich_king.cpp:145
bool IsWithinLOSInMap(WorldObject const *obj, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const
Definition: Object.cpp:1347
float GetExactDist(float x, float y, float z) const
Definition: Position.h:178

References _source, Position::GetExactDist(), Unit::HasAura(), Unit::IsAlive(), Object::IsPlayer(), WorldObject::IsWithinLOSInMap(), SPELL_HARVEST_SOUL_VALKYR, and SPELL_VALKYR_TARGET_SEARCH.

Member Data Documentation

◆ _source

Creature const* DefileTargetSelector::_source
private

Referenced by operator()().