[Avoid aoe] Fix possible triggers

This commit is contained in:
Yunfan Li
2024-04-20 00:22:56 +08:00
parent a94f626106
commit a4f9783997
2 changed files with 3 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ class NearestTriggersValue : public NearestUnitsValue
class NearestTotemsValue : public NearestUnitsValue
{
public:
NearestTotemsValue(PlayerbotAI* botAI, float range = 30.0f) : NearestUnitsValue(botAI, "nearest npcs", range, true) { }
NearestTotemsValue(PlayerbotAI* botAI, float range = 30.0f) : NearestUnitsValue(botAI, "nearest totems", range, true) { }
protected:
void FindUnits(std::list<Unit*>& targets) override;

View File

@@ -39,8 +39,8 @@ bool PossibleTriggersValue::AcceptUnit(Unit* unit)
if (!unit->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)) {
return false;
}
Unit::AuraEffectList const& aurasPeriodicTriggerSpell = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
Unit::AuraEffectList const& aurasPeriodicTriggerWithValueSpell = bot->GetAuraEffectsByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE);
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)
{
@@ -59,6 +59,4 @@ bool PossibleTriggersValue::AcceptUnit(Unit* unit)
}
}
return false;
// return true; // AttackersValue::IsPossibleTarget(unit, bot, range);
}