mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-25 14:36:22 +00:00
major class spells
This commit is contained in:
@@ -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())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -143,6 +143,15 @@ class SpellNoCooldownTrigger : public SpellTrigger
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class SpellCooldownTrigger : public SpellTrigger
|
||||
{
|
||||
public:
|
||||
SpellCooldownTrigger(PlayerbotAI* botAI, std::string const spell) : SpellTrigger(botAI, spell) { }
|
||||
|
||||
std::string const GetTargetName() override { return "self target"; }
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
// TODO: check other targets
|
||||
class InterruptSpellTrigger : public SpellTrigger
|
||||
{
|
||||
@@ -470,7 +479,6 @@ class HasAuraTrigger : public Trigger
|
||||
|
||||
std::string const GetTargetName() override { return "self target"; }
|
||||
bool IsActive() override;
|
||||
|
||||
};
|
||||
|
||||
class HasAuraStackTrigger : public Trigger {
|
||||
@@ -750,7 +758,7 @@ class HasAreaDebuffTrigger : public Trigger {
|
||||
class BuffOnMainTankTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
BuffOnMainTankTrigger(PlayerbotAI* botAI, std::string spell, bool checkIsOwner = false) : BuffTrigger(botAI, spell, 1, checkIsOwner) {}
|
||||
BuffOnMainTankTrigger(PlayerbotAI* botAI, std::string spell, bool checkIsOwner = false, int checkInterval = 1) : BuffTrigger(botAI, spell, checkInterval, checkIsOwner) {}
|
||||
public:
|
||||
virtual Value<Unit*>* GetTargetValue();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user