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

Public Member Functions

 WebTargetSelector (Unit *maexxna)
 
bool operator() (Unit const *target) const
 

Private Attributes

Unit const * _maexxna
 

Detailed Description

Constructor & Destructor Documentation

◆ WebTargetSelector()

WebTargetSelector::WebTargetSelector ( Unit maexxna)
inline
80: _maexxna(maexxna) {}
Unit const * _maexxna
Definition: boss_maexxna.cpp:93

Member Function Documentation

◆ operator()()

bool WebTargetSelector::operator() ( Unit const *  target) const
inline
82 {
83 if (!target->IsPlayer()) // never web nonplayers (pets, guardians, etc.)
84 return false;
85 if (_maexxna->GetVictim() == target) // never target tank
86 return false;
87 if (target->HasAura(SPELL_WEB_WRAP_STUN)) // never target targets that are already webbed
88 return false;
89 return true;
90 }
@ SPELL_WEB_WRAP_STUN
Definition: boss_maexxna.cpp:37
Unit * GetVictim() const
Definition: Unit.h:789

References _maexxna, Unit::GetVictim(), Unit::HasAura(), Object::IsPlayer(), and SPELL_WEB_WRAP_STUN.

Member Data Documentation

◆ _maexxna

Unit const* WebTargetSelector::_maexxna
private

Referenced by operator()().