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

Public Member Functions

 NecroticPlagueTargetCheck (Unit const *obj, uint32 notAura1=0, uint32 notAura2=0)
 
bool operator() (Unit *unit) const
 

Private Attributes

Unit const_sourceObj
 
uint32 _notAura1
 
uint32 _notAura2
 

Constructor & Destructor Documentation

NecroticPlagueTargetCheck::NecroticPlagueTargetCheck ( Unit const obj,
uint32  notAura1 = 0,
uint32  notAura2 = 0 
)
inline
359  : _sourceObj(obj), _notAura1(notAura1), _notAura2(notAura2)
360  {
361  }
Unit const * _sourceObj
Definition: boss_the_lich_king.cpp:373
uint32 _notAura2
Definition: boss_the_lich_king.cpp:375
uint32 _notAura1
Definition: boss_the_lich_king.cpp:374

Member Function Documentation

bool NecroticPlagueTargetCheck::operator() ( Unit unit) const
inline
364  {
365  if (!unit || unit == _sourceObj || !unit->isTargetableForAttack() || unit->GetTypeId() != TYPEID_PLAYER || unit->HasAura(SPELL_PLAGUE_AVOIDANCE))
366  return false;
367  if ((_notAura1 && unit->HasAura(_notAura1)) || (_notAura2 && unit->HasAura(_notAura2)))
368  return false;
369  return true;
370  }
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4240
Unit const * _sourceObj
Definition: boss_the_lich_king.cpp:373
uint32 _notAura2
Definition: boss_the_lich_king.cpp:375
TypeID GetTypeId() const
Definition: Object.h:113
Definition: boss_the_lich_king.cpp:76
uint32 _notAura1
Definition: boss_the_lich_king.cpp:374
Definition: ObjectGuid.h:33
bool isTargetableForAttack(bool checkFakeDeath=true) const
Definition: Unit.cpp:9987

+ Here is the call graph for this function:

Member Data Documentation

uint32 NecroticPlagueTargetCheck::_notAura1
private
uint32 NecroticPlagueTargetCheck::_notAura2
private
Unit const* NecroticPlagueTargetCheck::_sourceObj
private

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