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);
}

View File

@@ -179,13 +179,15 @@ class MirrorImageTrigger : public BoostTrigger
class FrostNovaOnTargetTrigger : public DebuffTrigger
{
public:
FrostNovaOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost nova", 1, false, 2.0f) {}
FrostNovaOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frost nova", 1, false) {}
bool IsActive() override;
};
class FrostbiteOnTargetTrigger : public DebuffTrigger
{
public:
FrostbiteOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frostbite", 1, false, 2.0f) {}
FrostbiteOnTargetTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "frostbite", 1, false) {}
bool IsActive() override;
};
#endif