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()