Improve and fix unholy dk rune triggers

This commit is contained in:
Yunfan Li
2025-01-18 23:49:08 +08:00
parent 006e0a03c8
commit 265f969656
4 changed files with 48 additions and 25 deletions

View File

@@ -37,20 +37,32 @@ bool PestilenceGlyphTrigger::IsActive()
return false;
}
// Based on runeSlotTypes
bool HighBloodRuneTrigger::IsActive()
{
return !bot->GetRuneCooldown(0) && !bot->GetRuneCooldown(1);
return bot->GetRuneCooldown(0) <= 2000 && bot->GetRuneCooldown(1) <= 2000;
}
bool HighFrostRuneTrigger::IsActive()
{
return !bot->GetRuneCooldown(2) && !bot->GetRuneCooldown(3);
return bot->GetRuneCooldown(4) <= 2000 && bot->GetRuneCooldown(5) <= 2000;
}
bool HighUnholyRuneTrigger::IsActive()
{
return !bot->GetRuneCooldown(4) && !bot->GetRuneCooldown(5);
return bot->GetRuneCooldown(2) <= 2000 && bot->GetRuneCooldown(3) <= 2000;
}
bool NoRuneTrigger::IsActive()
{
for (uint32 i = 0; i < MAX_RUNES; ++i)
{
if (!bot->GetRuneCooldown(i))
return false;
}
return true;
}
bool DesolationTrigger::IsActive()
{
return bot->HasAura(66817) && BuffTrigger::IsActive();
@@ -62,5 +74,5 @@ bool DeathAndDecayCooldownTrigger::IsActive()
if (!spellId)
return true;
return bot->GetSpellCooldownDelay(spellId) >= 3000;
return bot->GetSpellCooldownDelay(spellId) >= 2000;
}