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

Member Function Documentation

◆ operator()()

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

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()().