TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BoneSpikeTargetSelector Class Reference

Public Member Functions

 BoneSpikeTargetSelector (UnitAI *ai)
 
bool operator() (Unit *unit) const
 

Private Attributes

UnitAI_ai
 

Constructor & Destructor Documentation

BoneSpikeTargetSelector::BoneSpikeTargetSelector ( UnitAI ai)
inline
104 : _ai(ai) { }
UnitAI * _ai
Definition: boss_lord_marrowgar.cpp:123

Member Function Documentation

bool BoneSpikeTargetSelector::operator() ( Unit unit) const
inline
107  {
108  if (unit->GetTypeId() != TYPEID_PLAYER)
109  return false;
110 
111  if (unit->HasAura(SPELL_IMPALED))
112  return false;
113 
114  // Check if it is one of the tanks soaking Bone Slice
115  for (uint32 i = 0; i < MAX_BONE_SPIKE_IMMUNE; ++i)
116  if (unit->GetGUID() == _ai->GetGUID(DATA_SPIKE_IMMUNE + i))
117  return false;
118 
119  return true;
120  }
virtual ObjectGuid GetGUID(int32=0) const
Definition: UnitAI.h:142
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4240
Definition: boss_lord_marrowgar.cpp:92
Definition: boss_lord_marrowgar.cpp:88
TypeID GetTypeId() const
Definition: Object.h:113
uint32_t uint32
Definition: Define.h:150
UnitAI * _ai
Definition: boss_lord_marrowgar.cpp:123
Definition: boss_lord_marrowgar.cpp:48
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: ObjectGuid.h:33

+ Here is the call graph for this function:

Member Data Documentation

UnitAI* BoneSpikeTargetSelector::_ai
private

The documentation for this class was generated from the following file: