mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-14 09:29:09 +00:00
Avoie aoe strategy
This commit is contained in:
@@ -116,4 +116,27 @@ bool HasAreaDebuffValue::Calculate()
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Aura* AreaDebuffValue::Calculate()
|
||||
{
|
||||
Unit::AuraApplicationMap& map = bot->GetAppliedAuras();
|
||||
for (Unit::AuraApplicationMap::iterator i = map.begin(); i != map.end(); ++i)
|
||||
{
|
||||
Aura *aura = i->second->GetBase();
|
||||
if (!aura)
|
||||
continue;
|
||||
|
||||
AuraObjectType type = aura->GetType();
|
||||
// bool is_area = aura->IsArea();
|
||||
bool isPositive = aura->GetSpellInfo()->IsPositive();
|
||||
if (type == DYNOBJ_AURA_TYPE && !isPositive) {
|
||||
DynamicObject* dynOwner = aura->GetDynobjOwner();
|
||||
if (!dynOwner) {
|
||||
continue;
|
||||
}
|
||||
return aura;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
Reference in New Issue
Block a user