mage and paladin strategy port

This commit is contained in:
Yunfan Li
2023-06-03 20:16:35 +08:00
parent 0f483047e5
commit e68a22d968
26 changed files with 414 additions and 172 deletions

View File

@@ -22,15 +22,6 @@ bool MediumManaTrigger::IsActive()
bool NoPetTrigger::IsActive()
{
// Guardian* gp = bot->GetGuardianPet();
// bot->getpet
// if (gp) {
// bot->Yell("Guardian name: " + gp->GetName(), LANG_UNIVERSAL);
// }
// Minion* minion = bot->GetFirstMinion();
// if (minion) {
// bot->Yell("has minion: " + minion->GetName(), LANG_UNIVERSAL);
// }
return (bot->GetMinionGUID().IsEmpty()) &&
(!AI_VALUE(Unit*, "pet target")) &&
(!bot->GetGuardianPet()) &&
@@ -351,6 +342,13 @@ bool HasAuraTrigger::IsActive()
return botAI->HasAura(getName(), GetTarget(), false, false, -1, true);
}
bool HasAuraStackTrigger::IsActive()
{
Aura *aura = botAI->GetAura(getName(), GetTarget(), false, true, stack);
// sLog->outMessage("playerbot", LOG_LEVEL_DEBUG, "HasAuraStackTrigger::IsActive %s %d", getName(), aura ? aura->GetStackAmount() : -1);
return aura;
}
bool TimerTrigger::IsActive()
{
if (time(nullptr) != lastCheck)
@@ -553,3 +551,8 @@ bool HasAreaDebuffTrigger::IsActive()
{
return AI_VALUE2(bool, "has area debuff", "self target");
}
Value<Unit*>* BuffOnMainTankTrigger::GetTargetValue()
{
return context->GetValue<Unit*>("main tank", spell);
}