mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-18 19:25:44 +00:00
mage and paladin strategy port
This commit is contained in:
@@ -22,15 +22,6 @@ bool MediumManaTrigger::IsActive()
|
||||
|
||||
bool NoPetTrigger::IsActive()
|
||||
{
|
||||
// Guardian* gp = bot->GetGuardianPet();
|
||||
// bot->getpet
|
||||
// if (gp) {
|
||||
// bot->Yell("Guardian name: " + gp->GetName(), LANG_UNIVERSAL);
|
||||
// }
|
||||
// Minion* minion = bot->GetFirstMinion();
|
||||
// if (minion) {
|
||||
// bot->Yell("has minion: " + minion->GetName(), LANG_UNIVERSAL);
|
||||
// }
|
||||
return (bot->GetMinionGUID().IsEmpty()) &&
|
||||
(!AI_VALUE(Unit*, "pet target")) &&
|
||||
(!bot->GetGuardianPet()) &&
|
||||
@@ -351,6 +342,13 @@ bool HasAuraTrigger::IsActive()
|
||||
return botAI->HasAura(getName(), GetTarget(), false, false, -1, true);
|
||||
}
|
||||
|
||||
bool HasAuraStackTrigger::IsActive()
|
||||
{
|
||||
Aura *aura = botAI->GetAura(getName(), GetTarget(), false, true, stack);
|
||||
// sLog->outMessage("playerbot", LOG_LEVEL_DEBUG, "HasAuraStackTrigger::IsActive %s %d", getName(), aura ? aura->GetStackAmount() : -1);
|
||||
return aura;
|
||||
}
|
||||
|
||||
bool TimerTrigger::IsActive()
|
||||
{
|
||||
if (time(nullptr) != lastCheck)
|
||||
@@ -553,3 +551,8 @@ bool HasAreaDebuffTrigger::IsActive()
|
||||
{
|
||||
return AI_VALUE2(bool, "has area debuff", "self target");
|
||||
}
|
||||
|
||||
Value<Unit*>* BuffOnMainTankTrigger::GetTargetValue()
|
||||
{
|
||||
return context->GetValue<Unit*>("main tank", spell);
|
||||
}
|
||||
@@ -457,6 +457,17 @@ class HasAuraTrigger : public Trigger
|
||||
|
||||
};
|
||||
|
||||
class HasAuraStackTrigger : public Trigger {
|
||||
public:
|
||||
HasAuraStackTrigger(PlayerbotAI* ai, std::string spell, int stack, int checkInterval = 1) : Trigger(ai, spell, checkInterval),
|
||||
stack(stack) {}
|
||||
|
||||
std::string const GetTargetName() { return "self target"; }
|
||||
virtual bool IsActive();
|
||||
private:
|
||||
int stack;
|
||||
};
|
||||
|
||||
class HasNoAuraTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
@@ -720,4 +731,11 @@ class HasAreaDebuffTrigger : public Trigger {
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
class BuffOnMainTankTrigger : public BuffTrigger
|
||||
{
|
||||
public:
|
||||
BuffOnMainTankTrigger(PlayerbotAI* botAI, std::string spell, bool checkIsOwner = false) : BuffTrigger(botAI, spell, 1, checkIsOwner) {}
|
||||
public:
|
||||
virtual Value<Unit*>* GetTargetValue();
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user