From cb1ab363bbe5f8000fd1d793f97bedbad22828a4 Mon Sep 17 00:00:00 2001 From: Emlembow <36314674+Emlembow@users.noreply.github.com> Date: Sun, 1 Sep 2024 16:42:27 -0700 Subject: [PATCH] Fixed Tranq APL Usage --- BMHunter.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/BMHunter.lua b/BMHunter.lua index 637407d..1982b48 100644 --- a/BMHunter.lua +++ b/BMHunter.lua @@ -30,6 +30,8 @@ local MendPet = SpellBook:GetSpell(136) local Exhilaration = SpellBook:GetSpell(109304) local SurvivalOfTheFittest = SpellBook:GetSpell(264735) local TranquilizingShot = SpellBook:GetSpell(19801) +local Fetch = SpellBook:GetSpell(125050) + -- Buffs and Debuffs local FrenzyBuff = SpellBook:GetSpell(272790) @@ -380,6 +382,18 @@ DefensiveAPL:AddSpell( end):SetTarget(Player) ) +-- Tranq APL +TranqAPL:AddSpell( + TranquilizingShot:CastableIf(function(self) + local target = TranqTarget + return target:Exists() and self:IsKnownAndUsable() and not Player:IsCastingOrChanneling() + and ShouldUseTranquilizingShot() + end):SetTarget(TranqTarget):OnCast(function() + -- Reset the tranq target time after casting + tranqTargetTime = 0 + end) +) + -- Boss APL BossAPL:AddSpell( CallOfTheWild:CastableIf(function(self) @@ -393,7 +407,6 @@ ExecuteAPL:AddSpell( end):SetTarget(ExecuteTarget) ) --- Module Sync BMHunterModule:Sync(function() if Player:IsMounted() then return @@ -401,11 +414,11 @@ BMHunterModule:Sync(function() DefensiveAPL:Execute() PetAPL:Execute() - TranqAPL:Execute() if Player:IsAffectingCombat() then ExecuteAPL:Execute() InterruptAPL:Execute() + TranqAPL:Execute() -- Add this line to execute the Tranq APL if BestTarget:Exists() and BestTarget:IsBoss() then BossAPL:Execute()