99 {
101 {
108 };
109
110 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end();)
111 {
113 if (!target)
114 {
115 targets.erase(itr++);
116 continue;
117 }
118
119 bool skip = false;
121 {
123 for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
124 if ((*i)->GetAmount())
125 {
126 skip = true;
127 break;
128 }
129 }
130
131 if (skip)
132 targets.erase(itr++);
133 else
134 ++itr;
135 }
136 }
std::uint8_t uint8
Definition: Define.h:109
AuraType
Definition: SpellAuraDefines.h:62
@ SPELL_AURA_MOD_FEAR
Definition: SpellAuraDefines.h:70
@ SPELL_AURA_MOD_ROOT
Definition: SpellAuraDefines.h:89
@ SPELL_AURA_TRANSFORM
Definition: SpellAuraDefines.h:119
@ SPELL_AURA_MOD_CONFUSE
Definition: SpellAuraDefines.h:68
@ SPELL_AURA_NONE
Definition: SpellAuraDefines.h:63
@ SPELL_AURA_MOD_STUN
Definition: SpellAuraDefines.h:75
Unit * ToUnit()
Definition: Object.h:209
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
Definition: Unit.h:1349
std::list< AuraEffect * > AuraEffectList
Definition: Unit.h:646