warlock and dk strategy port

This commit is contained in:
Yunfan Li
2023-06-03 14:01:20 +08:00
parent a44b310c0a
commit 0f483047e5
27 changed files with 562 additions and 88 deletions

View File

@@ -4,9 +4,24 @@
#include "DKTriggers.h"
#include "Playerbots.h"
#include "SharedDefines.h"
#include <string>
bool DKPresenceTrigger::IsActive()
{
Unit* target = GetTarget();
return !botAI->HasAura("blood presence", target) && !botAI->HasAura("unholy presence", target) && !botAI->HasAura("frost presence", target);
}
bool PestilenceTrigger::IsActive() {
if (!SpellTrigger::IsActive()) {
return false;
}
Aura *blood_plague = botAI->GetAura("blood plague", GetTarget(), true, true);
Aura *frost_fever = botAI->GetAura("frost fever", GetTarget(), true, true);
if ((blood_plague && blood_plague->GetDuration() <= 5000) ||
(frost_fever && frost_fever->GetDuration() <= 5000)) {
return true;
}
return false;
}