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

Public Member Functions

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

Private Attributes

Unit const * _sourceObj
 
uint32 _notAura1
 
uint32 _notAura2
 

Detailed Description

Constructor & Destructor Documentation

◆ NecroticPlagueTargetCheck()

NecroticPlagueTargetCheck::NecroticPlagueTargetCheck ( Unit const *  obj,
uint32  notAura1,
uint32  notAura2 
)
inline
599: _sourceObj(obj), _notAura1(notAura1), _notAura2(notAura2) {}
uint32 _notAura1
Definition: boss_the_lich_king.cpp:614
Unit const * _sourceObj
Definition: boss_the_lich_king.cpp:613
uint32 _notAura2
Definition: boss_the_lich_king.cpp:615

Member Function Documentation

◆ operator()()

bool NecroticPlagueTargetCheck::operator() ( Unit unit) const
inline
602 {
603 if (!unit || !unit->IsPlayer() || unit == _sourceObj || _sourceObj->GetVictim() == unit || !unit->isTargetableForAttack())
604 return false;
606 return false;
607 if (!_sourceObj->IsWithinLOSInMap(unit))
608 return false;
609 return true;
610 }
@ SPELL_BOSS_HITTIN_YA_AURA
Definition: boss_the_lich_king.cpp:84
@ SPELL_PLAGUE_AVOIDANCE
Definition: boss_the_lich_king.cpp:81
bool IsPlayer() const
Definition: Object.h:197
bool IsWithinLOSInMap(WorldObject const *obj, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const
Definition: Object.cpp:1347
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5669
Unit * GetVictim() const
Definition: Unit.h:789
bool isTargetableForAttack(bool checkFakeDeath=true, Unit const *byWho=nullptr) const
Definition: Unit.cpp:13811

References _notAura1, _notAura2, _sourceObj, Unit::GetVictim(), Unit::HasAura(), Object::IsPlayer(), Unit::isTargetableForAttack(), WorldObject::IsWithinLOSInMap(), SPELL_BOSS_HITTIN_YA_AURA, and SPELL_PLAGUE_AVOIDANCE.

Member Data Documentation

◆ _notAura1

uint32 NecroticPlagueTargetCheck::_notAura1
private

Referenced by operator()().

◆ _notAura2

uint32 NecroticPlagueTargetCheck::_notAura2
private

Referenced by operator()().

◆ _sourceObj

Unit const* NecroticPlagueTargetCheck::_sourceObj
private

Referenced by operator()().