diff --git a/src/strategy/warlock/DpsWarlockStrategy.cpp b/src/strategy/warlock/DpsWarlockStrategy.cpp index e9b7fea5..ba3ae1f1 100644 --- a/src/strategy/warlock/DpsWarlockStrategy.cpp +++ b/src/strategy/warlock/DpsWarlockStrategy.cpp @@ -71,6 +71,8 @@ void DpsWarlockStrategy::InitTriggers(std::vector& triggers) 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( new TriggerNode("metamorphosis", NextAction::array(0, new NextAction("metamorphosis", 20.0f), NULL))); } @@ -78,9 +80,9 @@ void DpsWarlockStrategy::InitTriggers(std::vector& triggers) void DpsAoeWarlockStrategy::InitTriggers(std::vector& triggers) { triggers.push_back( - new TriggerNode("medium aoe", NextAction::array(0, new NextAction("seed of corruption", 39.0f), - new NextAction("seed of corruption on attacker", 38.0f), - new NextAction("rain of fire", 37.0f), nullptr))); + new TriggerNode("medium aoe", NextAction::array(0, new NextAction("seed of corruption", 33.0f), + new NextAction("seed of corruption on attacker", 32.0f), + new NextAction("rain of fire", 31.0f), nullptr))); triggers.push_back(new TriggerNode("corruption on attacker", NextAction::array(0, new NextAction("corruption on attacker", 27.0f), nullptr))); triggers.push_back( diff --git a/src/strategy/warlock/WarlockActions.cpp b/src/strategy/warlock/WarlockActions.cpp index 627b042a..6be8826b 100644 --- a/src/strategy/warlock/WarlockActions.cpp +++ b/src/strategy/warlock/WarlockActions.cpp @@ -18,7 +18,7 @@ Value* CastFearOnCcAction::GetTargetValue() { return context->GetValueCastSpell("fear", GetTarget()); } -bool CastFearOnCcAction::isPossible() { return botAI->CanCastSpell("fear", GetTarget()); } +bool CastFearOnCcAction::isPossible() { return true; } bool CastFearOnCcAction::isUseful() { return true; } diff --git a/src/strategy/warlock/WarlockAiObjectContext.cpp b/src/strategy/warlock/WarlockAiObjectContext.cpp index 909e874d..74dde632 100644 --- a/src/strategy/warlock/WarlockAiObjectContext.cpp +++ b/src/strategy/warlock/WarlockAiObjectContext.cpp @@ -6,6 +6,7 @@ #include "WarlockAiObjectContext.h" #include "DpsWarlockStrategy.h" +#include "GenericTriggers.h" #include "GenericWarlockNonCombatStrategy.h" #include "NamedObjectContext.h" #include "Playerbots.h" @@ -98,6 +99,7 @@ public: creators["unstable affliction on attacker"] = &WarlockTriggerFactoryInternal::unstable_affliction_on_attacker; creators["haunt"] = &WarlockTriggerFactoryInternal::haunt; creators["decimation"] = &WarlockTriggerFactoryInternal::decimation; + creators["life tap glyph buff"] = &WarlockTriggerFactoryInternal::life_tap_glyph_buff; creators["molten core"] = &WarlockTriggerFactoryInternal::molten_core; creators["metamorphosis"] = &WarlockTriggerFactoryInternal::metamorphosis; } @@ -131,6 +133,7 @@ private: } static Trigger* haunt(PlayerbotAI* ai) { return new HauntTrigger(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* metamorphosis(PlayerbotAI* ai) { return new MetamorphosisTrigger(ai); } }; diff --git a/src/strategy/warlock/WarlockTriggers.cpp b/src/strategy/warlock/WarlockTriggers.cpp index 6192dfc7..1ba37ca2 100644 --- a/src/strategy/warlock/WarlockTriggers.cpp +++ b/src/strategy/warlock/WarlockTriggers.cpp @@ -5,6 +5,7 @@ #include "WarlockTriggers.h" +#include "GenericTriggers.h" #include "Playerbots.h" bool DemonArmorTrigger::IsActive() @@ -44,4 +45,13 @@ bool DecimationTrigger::IsActive() { Aura* aura = botAI->GetAura(getName(), GetTarget(), false, true); return aura && aura->GetDuration() > 3000; +} + +bool LifeTapGlyphBuffTrigger::IsActive() +{ + // Check life tap glyph first + if (!botAI->HasAura(63320, bot)) + return false; + + return BuffTrigger::IsActive(); } \ No newline at end of file diff --git a/src/strategy/warlock/WarlockTriggers.h b/src/strategy/warlock/WarlockTriggers.h index 38514d04..6c908ed7 100644 --- a/src/strategy/warlock/WarlockTriggers.h +++ b/src/strategy/warlock/WarlockTriggers.h @@ -163,6 +163,13 @@ public: bool IsActive() override; }; +class LifeTapGlyphBuffTrigger : public BuffTrigger +{ +public: + LifeTapGlyphBuffTrigger(PlayerbotAI* ai) : BuffTrigger(ai, "life tap") {} + bool IsActive() override; +}; + class MoltenCoreTrigger : public HasAuraTrigger { public: