Trigger fixes and Warrior AI tweaks

This commit is contained in:
郑佩茹
2023-03-21 12:25:25 -06:00
parent f27ab459b1
commit aeeb37da78
11 changed files with 94 additions and 10 deletions

View File

@@ -5,6 +5,8 @@
#ifndef _PLAYERBOT_GENERICTRIGGERS_H
#define _PLAYERBOT_GENERICTRIGGERS_H
#include <utility>
#include "RangeTriggers.h"
#include "HealthTriggers.h"
@@ -133,6 +135,14 @@ class SpellCanBeCastTrigger : public SpellTrigger
bool IsActive() override;
};
class SpellNoCooldownTrigger : public SpellTrigger
{
public:
SpellNoCooldownTrigger(PlayerbotAI* botAI, std::string const spell) : SpellTrigger(botAI, spell) {}
bool IsActive() override;
};
// TODO: check other targets
class InterruptSpellTrigger : public SpellTrigger
{
@@ -349,6 +359,21 @@ class AndTrigger : public Trigger
Trigger* rs;
};
class TwoTriggers : public Trigger
{
public:
explicit TwoTriggers(PlayerbotAI* botAI, std::string name1 = "", std::string name2 = "") : Trigger(botAI)
{
this->name1 = std::move(name1);
this->name2 = std::move(name2);
}
bool IsActive() override;
std::string const getName() override;
protected:
std::string name1;
std::string name2;
};
class SnareTargetTrigger : public DebuffTrigger
{
public: