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

Public Member Functions

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

Private Attributes

Creature const * _source
 

Detailed Description

Constructor & Destructor Documentation

◆ BoneStormMoveTargetSelector()

BoneStormMoveTargetSelector::BoneStormMoveTargetSelector ( Creature source)
inline
78: _source(source) { }
Creature const * _source
Definition: boss_lord_marrowgar.cpp:97

Member Function Documentation

◆ operator()()

bool BoneStormMoveTargetSelector::operator() ( Unit const *  target) const
inline
80 {
81 if (!target)
82 return false;
83
84 if (target->GetExactDist(_source) > 175.0f)
85 return false;
86
87 if (!target->IsPlayer())
88 return false;
89
90 if (target->GetPositionX() > -337.0f)
91 return false;
92
93 return target != _source->GetVictim();
94 }
Unit * GetVictim() const
Definition: Unit.h:789

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

Member Data Documentation

◆ _source

Creature const* BoneStormMoveTargetSelector::_source
private

Referenced by operator()().