mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
[Avoid aoe] Fix avoid unit
This commit is contained in:
parent
a4f9783997
commit
98ff69473c
@ -1613,8 +1613,10 @@ bool AvoidAoeAction::AvoidUnitWithDamageAura()
|
||||
if (!unit->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) {
|
||||
return false;
|
||||
}
|
||||
Unit::AuraEffectList const& auras = unit->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
for (auto i = auras.begin(); i != auras.end(); ++i)
|
||||
Unit::AuraEffectList const& aurasPeriodicTriggerSpell = unit->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
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;
|
||||
const SpellInfo* spellInfo = aurEff->GetSpellInfo();
|
||||
@ -1638,6 +1640,7 @@ bool AvoidAoeAction::AvoidUnitWithDamageAura()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user