mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-23 21:46:24 +00:00
[Class spell] Improve warrior, dk, paladin
This commit is contained in:
@@ -64,6 +64,11 @@ bool AlmostFullManaTrigger::IsActive()
|
||||
return AI_VALUE2(bool, "has mana", "self target") && AI_VALUE2(uint8, "mana", "self target") > 85;
|
||||
}
|
||||
|
||||
bool EnoughManaTrigger::IsActive()
|
||||
{
|
||||
return AI_VALUE2(bool, "has mana", "self target") && AI_VALUE2(uint8, "mana", "self target") > 65;
|
||||
}
|
||||
|
||||
bool RageAvailable::IsActive()
|
||||
{
|
||||
return AI_VALUE2(uint8, "rage", "self target") >= amount;
|
||||
|
||||
@@ -30,6 +30,14 @@ class HighManaTrigger : public Trigger
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class EnoughManaTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
EnoughManaTrigger(PlayerbotAI* botAI) : Trigger(botAI, "enough mana") { }
|
||||
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class AlmostFullManaTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -45,6 +45,7 @@ class TriggerContext : public NamedObjectContext<Trigger>
|
||||
creators["medium mana"] = &TriggerContext::MediumMana;
|
||||
creators["high mana"] = &TriggerContext::HighMana;
|
||||
creators["almost full mana"] = &TriggerContext::AlmostFullMana;
|
||||
creators["enough mana"] = &TriggerContext::EnoughMana;
|
||||
|
||||
creators["party member critical health"] = &TriggerContext::PartyMemberCriticalHealth;
|
||||
creators["party member low health"] = &TriggerContext::PartyMemberLowHealth;
|
||||
@@ -253,6 +254,7 @@ class TriggerContext : public NamedObjectContext<Trigger>
|
||||
static Trigger* MediumMana(PlayerbotAI* botAI) { return new MediumManaTrigger(botAI); }
|
||||
static Trigger* HighMana(PlayerbotAI* botAI) { return new HighManaTrigger(botAI); }
|
||||
static Trigger* AlmostFullMana(PlayerbotAI* botAI) { return new AlmostFullManaTrigger(botAI); }
|
||||
static Trigger* EnoughMana(PlayerbotAI* botAI) { return new EnoughManaTrigger(botAI); }
|
||||
static Trigger* LightRageAvailable(PlayerbotAI* botAI) { return new LightRageAvailableTrigger(botAI); }
|
||||
static Trigger* MediumRageAvailable(PlayerbotAI* botAI) { return new MediumRageAvailableTrigger(botAI); }
|
||||
static Trigger* HighRageAvailable(PlayerbotAI* botAI) { return new HighRageAvailableTrigger(botAI); }
|
||||
|
||||
Reference in New Issue
Block a user