mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
[Avoid aoe] Enhance spell judge
This commit is contained in:
parent
7af4f3bb95
commit
a94f626106
@ -123,7 +123,8 @@ Aura* AreaDebuffValue::Calculate()
|
|||||||
// Unit::AuraApplicationMap& map = bot->GetAppliedAuras();
|
// Unit::AuraApplicationMap& map = bot->GetAppliedAuras();
|
||||||
Unit::AuraEffectList const& aurasPeriodicDamage = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
|
Unit::AuraEffectList const& aurasPeriodicDamage = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||||
Unit::AuraEffectList const& aurasPeriodicTriggerSpell = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
Unit::AuraEffectList const& aurasPeriodicTriggerSpell = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||||
for (const Unit::AuraEffectList& list : {aurasPeriodicDamage, aurasPeriodicTriggerSpell}) {
|
Unit::AuraEffectList const& aurasPeriodicTriggerWithValueSpell = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE);
|
||||||
|
for (const Unit::AuraEffectList& list : {aurasPeriodicDamage, aurasPeriodicTriggerSpell, aurasPeriodicTriggerWithValueSpell}) {
|
||||||
for (auto i = list.begin(); i != list.end(); ++i)
|
for (auto i = list.begin(); i != list.end(); ++i)
|
||||||
{
|
{
|
||||||
AuraEffect* aurEff = *i;
|
AuraEffect* aurEff = *i;
|
||||||
|
|||||||
@ -39,8 +39,10 @@ bool PossibleTriggersValue::AcceptUnit(Unit* unit)
|
|||||||
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 = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||||
for (auto i = auras.begin(); i != auras.end(); ++i)
|
Unit::AuraEffectList const& aurasPeriodicTriggerWithValueSpell = bot->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();
|
||||||
@ -55,6 +57,7 @@ bool PossibleTriggersValue::AcceptUnit(Unit* unit)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
// return true; // AttackersValue::IsPossibleTarget(unit, bot, range);
|
// return true; // AttackersValue::IsPossibleTarget(unit, bot, range);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user