AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
StoneGripTargetSelector Class Reference

Public Member Functions

 StoneGripTargetSelector (Creature *me, Unit const *victim)
 
bool operator() (WorldObject *target) const
 

Private Attributes

Creature_me
 
Unit const * _victim
 

Detailed Description

Constructor & Destructor Documentation

◆ StoneGripTargetSelector()

StoneGripTargetSelector::StoneGripTargetSelector ( Creature me,
Unit const *  victim 
)
inline
703: _me(me), _victim(victim) {}
Unit const * _victim
Definition: boss_kologarn.cpp:718
Creature * _me
Definition: boss_kologarn.cpp:717

Member Function Documentation

◆ operator()()

bool StoneGripTargetSelector::operator() ( WorldObject target) const
inline
706 {
707 if (target == _victim && _me->GetThreatMgr().GetThreatListSize() > 1)
708 return true;
709
710 if (!target->IsPlayer())
711 return true;
712
713 return false;
714 }
float GetThreatListSize() const
Definition: ThreatMgr.h:222
bool IsPlayer() const
Definition: Object.h:197
ThreatMgr & GetThreatMgr()
Definition: Unit.h:839

References _me, _victim, ThreatMgr::GetThreatListSize(), Unit::GetThreatMgr(), and Object::IsPlayer().

Member Data Documentation

◆ _me

Creature* StoneGripTargetSelector::_me
private

Referenced by operator()().

◆ _victim

Unit const* StoneGripTargetSelector::_victim
private

Referenced by operator()().