mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
27 lines
971 B
C++
27 lines
971 B
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
|
*/
|
|
|
|
#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;
|
|
} |