Frost mage test triggers

This commit is contained in:
Bobblybook
2024-07-23 20:35:09 +10:00
parent 4043edfba3
commit 79c7dcf4a1
2 changed files with 28 additions and 2 deletions

View File

@@ -29,3 +29,27 @@ bool FingersOfFrostSingleTrigger::IsActive()
Aura *aura = botAI->GetAura(getName(), GetTarget(), false, true, -1);
return (aura && aura->GetCharges() == 1);
}
bool FrostNovaOnTargetTrigger::IsActive()
{
Unit* target = GetTarget();
if (!target || !target->IsAlive() || !target->IsInWorld()) {
return false;
}
bool aura = botAI->HasAura("frostbite", target);
if (aura)
LOG_DEBUG("playerbots", ":: FROST NOVA ACTIVE");
return !botAI->HasAura("frost nova", target);
}
bool FrostbiteOnTargetTrigger::IsActive()
{
Unit* target = GetTarget();
if (!target || !target->IsAlive() || !target->IsInWorld()) {
return false;
}
bool aura = botAI->HasAura("frostbite", target);
if (aura)
LOG_DEBUG("playerbots", ":: FROSTBITE ACTIVE");
return botAI->HasAura("frostbite", target);
}