major class spells

This commit is contained in:
Yunfan Li
2023-09-02 22:37:11 +08:00
parent 5f5faf00cd
commit 14b94e20fb
42 changed files with 203 additions and 67 deletions

View File

@@ -239,6 +239,15 @@ bool SpellNoCooldownTrigger::IsActive()
return !bot->HasSpellCooldown(spellId);
}
bool SpellCooldownTrigger::IsActive()
{
uint32 spellId = AI_VALUE2(uint32, "spell id", name);
if (!spellId)
return false;
return bot->HasSpellCooldown(spellId);
}
RandomTrigger::RandomTrigger(PlayerbotAI* botAI, std::string const name, int32 probability) : Trigger(botAI, name), probability(probability), lastCheck(getMSTime())
{
}