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

Public Member Functions

 LastPhaseIceTombTargetSelector (Creature *source)
 
bool operator() (Unit const *target) const
 

Private Attributes

Creature const * _source
 

Detailed Description

Constructor & Destructor Documentation

◆ LastPhaseIceTombTargetSelector()

LastPhaseIceTombTargetSelector::LastPhaseIceTombTargetSelector ( Creature source)
inline
248: _source(source) { }
Creature const * _source
Definition: boss_sindragosa.cpp:270

Member Function Documentation

◆ operator()()

bool LastPhaseIceTombTargetSelector::operator() ( Unit const *  target) const
inline
250 {
251 if (!target)
252 return false;
253
254 if (target->GetExactDist(_source) > 80.0f)
255 return false;
256
257 if (!target->IsPlayer())
258 return false;
259
260 if (target->HasAura(SPELL_FROST_IMBUED_BLADE))
261 return false;
262
263 if (target->IsImmunedToDamageOrSchool(SPELL_SCHOOL_MASK_ALL) || target->HasAura(SPELL_ICE_TOMB_UNTARGETABLE) || target->HasAura(SPELL_ICE_TOMB_DAMAGE) || target->HasAura(SPELL_TANK_MARKER_AURA) || target->HasSpiritOfRedemptionAura())
264 return false;
265
266 return target != _source->GetVictim();
267 }
@ SPELL_ICE_TOMB_DAMAGE
Definition: boss_sindragosa.cpp:71
@ SPELL_TANK_MARKER_AURA
Definition: boss_sindragosa.cpp:54
@ SPELL_ICE_TOMB_UNTARGETABLE
Definition: boss_sindragosa.cpp:70
@ SPELL_FROST_IMBUED_BLADE
Definition: boss_sindragosa.cpp:100
@ SPELL_SCHOOL_MASK_ALL
Definition: SharedDefines.h:315
Unit * GetVictim() const
Definition: Unit.h:853

References _source, Position::GetExactDist(), Unit::GetVictim(), Unit::HasAura(), Unit::HasSpiritOfRedemptionAura(), Unit::IsImmunedToDamageOrSchool(), Object::IsPlayer(), SPELL_FROST_IMBUED_BLADE, SPELL_ICE_TOMB_DAMAGE, SPELL_ICE_TOMB_UNTARGETABLE, SPELL_SCHOOL_MASK_ALL, and SPELL_TANK_MARKER_AURA.

Member Data Documentation

◆ _source

Creature const* LastPhaseIceTombTargetSelector::_source
private

Referenced by operator()().