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

Public Member Functions

 MalleableGooSelector (Unit const *unit)
 
bool operator() (Unit const *target) const
 

Private Attributes

Unit const * me
 

Detailed Description

Constructor & Destructor Documentation

◆ MalleableGooSelector()

MalleableGooSelector::MalleableGooSelector ( Unit const *  unit)
inline
208: me(unit) { }
Unit const * me
Definition: boss_professor_putricide.cpp:221

Member Function Documentation

◆ operator()()

bool MalleableGooSelector::operator() ( Unit const *  target) const
inline
211 {
212 if (!me || !target || !target->IsPlayer())
213 return false;
214
215 if (me->IsWithinCombatRange(target, 7.0f))
216 return false;
217
218 return me->IsValidAttackTarget(target);
219 }
bool IsPlayer() const
Definition: Object.h:197
bool IsWithinCombatRange(Unit const *obj, float dist2compare) const
Definition: Unit.cpp:649
bool IsValidAttackTarget(Unit const *target, SpellInfo const *bySpell=nullptr) const
Definition: Unit.cpp:13828

References Object::IsPlayer(), Unit::IsValidAttackTarget(), Unit::IsWithinCombatRange(), and me.

Member Data Documentation

◆ me

Unit const* MalleableGooSelector::me
private

Referenced by operator()().