[Avoid aoe] Fix avoid unit

This commit is contained in:
Yunfan Li 2024-04-20 00:30:11 +08:00
parent a4f9783997
commit 98ff69473c

View File

@ -1613,8 +1613,10 @@ bool AvoidAoeAction::AvoidUnitWithDamageAura()
if (!unit->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) { if (!unit->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) {
return false; return false;
} }
Unit::AuraEffectList const& auras = unit->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL); Unit::AuraEffectList const& aurasPeriodicTriggerSpell = unit->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
for (auto i = auras.begin(); i != auras.end(); ++i) Unit::AuraEffectList const& aurasPeriodicTriggerWithValueSpell = unit->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE);
for (const Unit::AuraEffectList& list : {aurasPeriodicTriggerSpell, aurasPeriodicTriggerWithValueSpell}) {
for (auto i = list.begin(); i != list.end(); ++i)
{ {
AuraEffect* aurEff = *i; AuraEffect* aurEff = *i;
const SpellInfo* spellInfo = aurEff->GetSpellInfo(); const SpellInfo* spellInfo = aurEff->GetSpellInfo();
@ -1638,6 +1640,7 @@ bool AvoidAoeAction::AvoidUnitWithDamageAura()
} }
} }
} }
}
return false; return false;
} }