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
246: _source(source) { }
Creature const * _source
Definition: boss_sindragosa.cpp:268

Member Function Documentation

◆ operator()()

bool LastPhaseIceTombTargetSelector::operator() ( Unit const *  target) const
inline
248 {
249 if (!target)
250 return false;
251
252 if (target->GetExactDist(_source) > 80.0f)
253 return false;
254
255 if (target->GetTypeId() != TYPEID_PLAYER)
256 return false;
257
258 if (target->HasAura(SPELL_FROST_IMBUED_BLADE))
259 return false;
260
261 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->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
262 return false;
263
264 return target != _source->GetVictim();
265 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SPELL_AURA_SPIRIT_OF_REDEMPTION
Definition: SpellAuraDefines.h:239
@ SPELL_ICE_TOMB_DAMAGE
Definition: boss_sindragosa.cpp:69
@ SPELL_TANK_MARKER_AURA
Definition: boss_sindragosa.cpp:52
@ SPELL_ICE_TOMB_UNTARGETABLE
Definition: boss_sindragosa.cpp:68
@ SPELL_FROST_IMBUED_BLADE
Definition: boss_sindragosa.cpp:98
@ SPELL_SCHOOL_MASK_ALL
Definition: SharedDefines.h:315
Unit * GetVictim() const
Definition: Unit.h:1398

References _source, Position::GetExactDist(), Object::GetTypeId(), Unit::GetVictim(), Unit::HasAura(), Unit::HasAuraType(), Unit::IsImmunedToDamageOrSchool(), SPELL_AURA_SPIRIT_OF_REDEMPTION, SPELL_FROST_IMBUED_BLADE, SPELL_ICE_TOMB_DAMAGE, SPELL_ICE_TOMB_UNTARGETABLE, SPELL_SCHOOL_MASK_ALL, SPELL_TANK_MARKER_AURA, and TYPEID_PLAYER.

Member Data Documentation

◆ _source

Creature const* LastPhaseIceTombTargetSelector::_source
private

Referenced by operator()().