mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-12-01 21:12:50 +08:00
Improvement on warlock life tap glyph
This commit is contained in:
@@ -71,6 +71,8 @@ void DpsWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
|
|
||||||
triggers.push_back(new TriggerNode("decimation", NextAction::array(0, new NextAction("soul fire", 16.0f), NULL)));
|
triggers.push_back(new TriggerNode("decimation", NextAction::array(0, new NextAction("soul fire", 16.0f), NULL)));
|
||||||
|
|
||||||
|
triggers.push_back(new TriggerNode("life tap glyph buff", NextAction::array(0, new NextAction("life tap", 28.0f), NULL)));
|
||||||
|
|
||||||
triggers.push_back(
|
triggers.push_back(
|
||||||
new TriggerNode("metamorphosis", NextAction::array(0, new NextAction("metamorphosis", 20.0f), NULL)));
|
new TriggerNode("metamorphosis", NextAction::array(0, new NextAction("metamorphosis", 20.0f), NULL)));
|
||||||
}
|
}
|
||||||
@@ -78,9 +80,9 @@ void DpsWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
void DpsAoeWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void DpsAoeWarlockStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
{
|
{
|
||||||
triggers.push_back(
|
triggers.push_back(
|
||||||
new TriggerNode("medium aoe", NextAction::array(0, new NextAction("seed of corruption", 39.0f),
|
new TriggerNode("medium aoe", NextAction::array(0, new NextAction("seed of corruption", 33.0f),
|
||||||
new NextAction("seed of corruption on attacker", 38.0f),
|
new NextAction("seed of corruption on attacker", 32.0f),
|
||||||
new NextAction("rain of fire", 37.0f), nullptr)));
|
new NextAction("rain of fire", 31.0f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("corruption on attacker",
|
triggers.push_back(new TriggerNode("corruption on attacker",
|
||||||
NextAction::array(0, new NextAction("corruption on attacker", 27.0f), nullptr)));
|
NextAction::array(0, new NextAction("corruption on attacker", 27.0f), nullptr)));
|
||||||
triggers.push_back(
|
triggers.push_back(
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Value<Unit*>* CastFearOnCcAction::GetTargetValue() { return context->GetValue<Un
|
|||||||
|
|
||||||
bool CastFearOnCcAction::Execute(Event event) { return botAI->CastSpell("fear", GetTarget()); }
|
bool CastFearOnCcAction::Execute(Event event) { return botAI->CastSpell("fear", GetTarget()); }
|
||||||
|
|
||||||
bool CastFearOnCcAction::isPossible() { return botAI->CanCastSpell("fear", GetTarget()); }
|
bool CastFearOnCcAction::isPossible() { return true; }
|
||||||
|
|
||||||
bool CastFearOnCcAction::isUseful() { return true; }
|
bool CastFearOnCcAction::isUseful() { return true; }
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "WarlockAiObjectContext.h"
|
#include "WarlockAiObjectContext.h"
|
||||||
|
|
||||||
#include "DpsWarlockStrategy.h"
|
#include "DpsWarlockStrategy.h"
|
||||||
|
#include "GenericTriggers.h"
|
||||||
#include "GenericWarlockNonCombatStrategy.h"
|
#include "GenericWarlockNonCombatStrategy.h"
|
||||||
#include "NamedObjectContext.h"
|
#include "NamedObjectContext.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
@@ -98,6 +99,7 @@ public:
|
|||||||
creators["unstable affliction on attacker"] = &WarlockTriggerFactoryInternal::unstable_affliction_on_attacker;
|
creators["unstable affliction on attacker"] = &WarlockTriggerFactoryInternal::unstable_affliction_on_attacker;
|
||||||
creators["haunt"] = &WarlockTriggerFactoryInternal::haunt;
|
creators["haunt"] = &WarlockTriggerFactoryInternal::haunt;
|
||||||
creators["decimation"] = &WarlockTriggerFactoryInternal::decimation;
|
creators["decimation"] = &WarlockTriggerFactoryInternal::decimation;
|
||||||
|
creators["life tap glyph buff"] = &WarlockTriggerFactoryInternal::life_tap_glyph_buff;
|
||||||
creators["molten core"] = &WarlockTriggerFactoryInternal::molten_core;
|
creators["molten core"] = &WarlockTriggerFactoryInternal::molten_core;
|
||||||
creators["metamorphosis"] = &WarlockTriggerFactoryInternal::metamorphosis;
|
creators["metamorphosis"] = &WarlockTriggerFactoryInternal::metamorphosis;
|
||||||
}
|
}
|
||||||
@@ -131,6 +133,7 @@ private:
|
|||||||
}
|
}
|
||||||
static Trigger* haunt(PlayerbotAI* ai) { return new HauntTrigger(ai); }
|
static Trigger* haunt(PlayerbotAI* ai) { return new HauntTrigger(ai); }
|
||||||
static Trigger* decimation(PlayerbotAI* ai) { return new DecimationTrigger(ai); }
|
static Trigger* decimation(PlayerbotAI* ai) { return new DecimationTrigger(ai); }
|
||||||
|
static Trigger* life_tap_glyph_buff(PlayerbotAI* ai) { return new LifeTapGlyphBuffTrigger(ai); }
|
||||||
static Trigger* molten_core(PlayerbotAI* ai) { return new MoltenCoreTrigger(ai); }
|
static Trigger* molten_core(PlayerbotAI* ai) { return new MoltenCoreTrigger(ai); }
|
||||||
static Trigger* metamorphosis(PlayerbotAI* ai) { return new MetamorphosisTrigger(ai); }
|
static Trigger* metamorphosis(PlayerbotAI* ai) { return new MetamorphosisTrigger(ai); }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "WarlockTriggers.h"
|
#include "WarlockTriggers.h"
|
||||||
|
|
||||||
|
#include "GenericTriggers.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
|
|
||||||
bool DemonArmorTrigger::IsActive()
|
bool DemonArmorTrigger::IsActive()
|
||||||
@@ -44,4 +45,13 @@ bool DecimationTrigger::IsActive()
|
|||||||
{
|
{
|
||||||
Aura* aura = botAI->GetAura(getName(), GetTarget(), false, true);
|
Aura* aura = botAI->GetAura(getName(), GetTarget(), false, true);
|
||||||
return aura && aura->GetDuration() > 3000;
|
return aura && aura->GetDuration() > 3000;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool LifeTapGlyphBuffTrigger::IsActive()
|
||||||
|
{
|
||||||
|
// Check life tap glyph first
|
||||||
|
if (!botAI->HasAura(63320, bot))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return BuffTrigger::IsActive();
|
||||||
}
|
}
|
||||||
@@ -163,6 +163,13 @@ public:
|
|||||||
bool IsActive() override;
|
bool IsActive() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LifeTapGlyphBuffTrigger : public BuffTrigger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LifeTapGlyphBuffTrigger(PlayerbotAI* ai) : BuffTrigger(ai, "life tap") {}
|
||||||
|
bool IsActive() override;
|
||||||
|
};
|
||||||
|
|
||||||
class MoltenCoreTrigger : public HasAuraTrigger
|
class MoltenCoreTrigger : public HasAuraTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user