Skip to content

Commit

Permalink
Update All Cata
Browse files Browse the repository at this point in the history
  • Loading branch information
doadin committed Jan 9, 2025
1 parent dc0a5bb commit 3cabae7
Show file tree
Hide file tree
Showing 3 changed files with 567 additions and 112 deletions.
246 changes: 210 additions & 36 deletions Specialization/Cata/BeastMastery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,64 +65,208 @@ local FocusPerc

local BeastMastery = {}

local time_to_die


local function ClearCDs()
MaxDps:GlowCooldown(classtable.HuntersMark, false)
local function GetTotemDuration(name)
for index=1,MAX_TOTEMS do
local arg1, totemName, startTime, duration, icon = GetTotemInfo(index)
local est_dur = math.floor(startTime+duration-GetTime())
if (totemName == name and est_dur and est_dur > 0) then return est_dur else return 0 end
end
end

function BeastMastery:callaction()
if (MaxDps:CheckSpellUsable(classtable.HuntersMark, 'HuntersMark')) and not debuff[classtable.HuntersMark].up and (ttd >= 21) and cooldown[classtable.HuntersMark].ready then
MaxDps:GlowCooldown(classtable.HuntersMark, cooldown[classtable.HuntersMark].ready)

function BeastMastery:precombat()
if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'AspectoftheHawk')) and (not buff[classtable.AspectBuff].up and false and assigned_aspect.aspect_of_the_hawk) and cooldown[classtable.AspectoftheHawk].ready and not UnitAffectingCombat('player') then
if not setSpell then setSpell = classtable.AspectoftheHawk end
end
--if (MaxDps:CheckSpellUsable(classtable.TolvirPotion, 'TolvirPotion')) and (not UnitAffectingCombat('player') or MaxDps:Bloodlust() or ttd <= 60) and cooldown[classtable.TolvirPotion].ready then
-- if not setSpell then setSpell = classtable.TolvirPotion end
--end
--if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'AspectoftheHawk')) and cooldown[classtable.AspectoftheHawk].ready then
-- if not setSpell then setSpell = classtable.AspectoftheHawk end
--end
--if (MaxDps:CheckSpellUsable(classtable.AspectoftheFox, 'AspectoftheFox')) and cooldown[classtable.AspectoftheFox].ready then
-- if not setSpell then setSpell = classtable.AspectoftheFox end
--end
--if (MaxDps:CheckSpellUsable(classtable.AutoShot, 'AutoShot')) and cooldown[classtable.AutoShot].ready then
-- if not setSpell then setSpell = classtable.AutoShot end
--end
if (MaxDps:CheckSpellUsable(classtable.ExplosiveTrap, 'ExplosiveTrap')) and (targets >0) and cooldown[classtable.ExplosiveTrap].ready then
if not setSpell then setSpell = classtable.ExplosiveTrap end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheFox, 'AspectoftheFox')) and (not buff[classtable.AspectBuff].up and false and assigned_aspect.aspect_of_the_fox) and cooldown[classtable.AspectoftheFox].ready and not UnitAffectingCombat('player') then
if not setSpell then setSpell = classtable.AspectoftheFox end
end
if (MaxDps:CheckSpellUsable(classtable.FocusFire, 'FocusFire')) and cooldown[classtable.FocusFire].ready then
if not setSpell then setSpell = classtable.FocusFire end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheCheetah, 'AspectoftheCheetah')) and (not buff[classtable.AspectBuff].up and false and assigned_aspect.aspect_of_the_cheetah) and cooldown[classtable.AspectoftheCheetah].ready and not UnitAffectingCombat('player') then
if not setSpell then setSpell = classtable.AspectoftheCheetah end
end
if (MaxDps:CheckSpellUsable(classtable.SerpentSting, 'SerpentSting')) and (not debuff[classtable.SerpentStingDeBuff].up) and cooldown[classtable.SerpentSting].ready then
if not setSpell then setSpell = classtable.SerpentSting end
if (MaxDps:CheckSpellUsable(classtable.AspectofthePack, 'AspectofthePack')) and (not buff[classtable.AspectBuff].up and false and assigned_aspect.aspect_of_the_pack) and cooldown[classtable.AspectofthePack].ready and not UnitAffectingCombat('player') then
if not setSpell then setSpell = classtable.AspectofthePack end
end
if (MaxDps:CheckSpellUsable(classtable.BestialWrath, 'BestialWrath')) and (Focus >60) and cooldown[classtable.BestialWrath].ready then
if (MaxDps:CheckSpellUsable(classtable.AspectoftheWild, 'AspectoftheWild')) and (not buff[classtable.AspectBuff].up and false and assigned_aspect.aspect_of_the_wild) and cooldown[classtable.AspectoftheWild].ready and not UnitAffectingCombat('player') then
if not setSpell then setSpell = classtable.AspectoftheWild end
end
if (MaxDps:CheckSpellUsable(classtable.HuntersMark, 'HuntersMark')) and (not debuff[classtable.HuntersMarkDeBuff].up) and cooldown[classtable.HuntersMark].ready and not UnitAffectingCombat('player') then
if not setSpell then setSpell = classtable.HuntersMark end
end
if (MaxDps:CheckSpellUsable(classtable.Misdirection, 'Misdirection')) and (false) and cooldown[classtable.Misdirection].ready and not UnitAffectingCombat('player') then
if not setSpell then setSpell = classtable.Misdirection end
end
end
function BeastMastery:init()
time_to_die = ( debuff[classtable.TrainingDummyDeBuff].up and 300 ) or ttd
end
function BeastMastery:aoe()
if (MaxDps:CheckSpellUsable(classtable.Misdirection, 'Misdirection')) and (false and UnitExists('pet')) and cooldown[classtable.Misdirection].ready then
if not setSpell then setSpell = classtable.Misdirection end
end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'AspectoftheHawk')) and (false and assigned_aspect.aspect_of_the_hawk and not (GetUnitSpeed('player') >0)) and cooldown[classtable.AspectoftheHawk].ready then
if not setSpell then setSpell = classtable.AspectoftheHawk end
end
if (MaxDps:CheckSpellUsable(classtable.BestialWrath, 'BestialWrath')) and (Focus >80) and cooldown[classtable.BestialWrath].ready then
if not setSpell then setSpell = classtable.BestialWrath end
end
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'MultiShot')) and (targets >5) and cooldown[classtable.MultiShot].ready then
if (MaxDps:CheckSpellUsable(classtable.RapidFire, 'RapidFire')) and (cooldown[classtable.CalloftheWild].ready) and cooldown[classtable.RapidFire].ready then
if not setSpell then setSpell = classtable.RapidFire end
end
if (MaxDps:CheckSpellUsable(classtable.CalloftheWild, 'CalloftheWild')) and (cooldown[classtable.RapidFire].ready and not false) and cooldown[classtable.CalloftheWild].ready then
if not setSpell then setSpell = classtable.CalloftheWild end
end
if (MaxDps:CheckSpellUsable(classtable.TrapLauncher, 'TrapLauncher')) and (cooldown[classtable.ExplosiveTrap].ready and not false) and cooldown[classtable.TrapLauncher].ready then
if not setSpell then setSpell = classtable.TrapLauncher end
end
if (MaxDps:CheckSpellUsable(classtable.ExplosiveTrap, 'ExplosiveTrap')) and cooldown[classtable.ExplosiveTrap].ready then
if not setSpell then setSpell = classtable.ExplosiveTrap end
end
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'MultiShot')) and cooldown[classtable.MultiShot].ready then
if not setSpell then setSpell = classtable.MultiShot end
end
if (MaxDps:CheckSpellUsable(classtable.CobraShot, 'CobraShot')) and (targets >5) and cooldown[classtable.CobraShot].ready then
if (MaxDps:CheckSpellUsable(classtable.KillShot, 'KillShot')) and (targetHP <20) and cooldown[classtable.KillShot].ready then
if not setSpell then setSpell = classtable.KillShot end
end
if (MaxDps:CheckSpellUsable(classtable.CobraShot, 'CobraShot')) and (( not (GetUnitSpeed('player') >0) or buff[classtable.AspectoftheFoxBuff].up ) and UnitLevel('player') >80) and cooldown[classtable.CobraShot].ready then
if not setSpell then setSpell = classtable.CobraShot end
end
if (MaxDps:CheckSpellUsable(classtable.SteadyShot, 'SteadyShot')) and (( not (GetUnitSpeed('player') >0) or buff[classtable.AspectoftheFoxBuff].up ) and UnitLevel('player') <81) and cooldown[classtable.SteadyShot].ready then
if not setSpell then setSpell = classtable.SteadyShot end
end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheFox, 'AspectoftheFox')) and ((GetUnitSpeed('player') >0) and false and false) and cooldown[classtable.AspectoftheFox].ready then
if not setSpell then setSpell = classtable.AspectoftheFox end
end
end
function BeastMastery:cleave()
if (MaxDps:CheckSpellUsable(classtable.Misdirection, 'Misdirection')) and (false) and cooldown[classtable.Misdirection].ready then
if not setSpell then setSpell = classtable.Misdirection end
end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'AspectoftheHawk')) and (false and assigned_aspect.aspect_of_the_hawk and not (GetUnitSpeed('player') >0)) and cooldown[classtable.AspectoftheHawk].ready then
if not setSpell then setSpell = classtable.AspectoftheHawk end
end
if (MaxDps:CheckSpellUsable(classtable.BestialWrath, 'BestialWrath')) and (Focus >80 and debuff[classtable.SerpentStingDeBuff].remains >12) and cooldown[classtable.BestialWrath].ready then
if not setSpell then setSpell = classtable.BestialWrath end
end
if (MaxDps:CheckSpellUsable(classtable.RapidFire, 'RapidFire')) and (cooldown[classtable.CalloftheWild].ready) and cooldown[classtable.RapidFire].ready then
if not setSpell then setSpell = classtable.RapidFire end
end
if (MaxDps:CheckSpellUsable(classtable.CalloftheWild, 'CalloftheWild')) and (cooldown[classtable.RapidFire].ready and not false) and cooldown[classtable.CalloftheWild].ready then
if not setSpell then setSpell = classtable.CalloftheWild end
end
if (MaxDps:CheckSpellUsable(classtable.Fervor, 'Fervor')) and (Focus <50) and cooldown[classtable.Fervor].ready then
if not setSpell then setSpell = classtable.Fervor end
end
if (MaxDps:CheckSpellUsable(classtable.SerpentSting, 'SerpentSting')) and (not debuff[classtable.SerpentStingDeBuff].up) and cooldown[classtable.SerpentSting].ready then
if not setSpell then setSpell = classtable.SerpentSting end
end
if (MaxDps:CheckSpellUsable(classtable.ArcaneShot, 'ArcaneShot')) and (buff[classtable.TheBeastWithinBuff].up) and cooldown[classtable.ArcaneShot].ready then
if not setSpell then setSpell = classtable.ArcaneShot end
end
if (MaxDps:CheckSpellUsable(classtable.CobraShot, 'CobraShot')) and (cooldown[classtable.BestialWrath].remains == 0 and UnitLevel('player') >80) and cooldown[classtable.CobraShot].ready then
if not setSpell then setSpell = classtable.CobraShot end
end
if (MaxDps:CheckSpellUsable(classtable.KillShot, 'KillShot')) and cooldown[classtable.KillShot].ready then
if (MaxDps:CheckSpellUsable(classtable.SteadyShot, 'SteadyShot')) and (cooldown[classtable.BestialWrath].remains == 0 and UnitLevel('player') <81) and cooldown[classtable.SteadyShot].ready then
if not setSpell then setSpell = classtable.SteadyShot end
end
if (MaxDps:CheckSpellUsable(classtable.KillCommandif, 'KillCommandif')) and cooldown[classtable.KillCommandif].ready then
if not setSpell then setSpell = classtable.KillCommandif end
end
if (MaxDps:CheckSpellUsable(classtable.KillShot, 'KillShot')) and (targetHP <20) and cooldown[classtable.KillShot].ready then
if not setSpell then setSpell = classtable.KillShot end
end
if (MaxDps:CheckSpellUsable(classtable.RapidFire, 'RapidFire')) and (not MaxDps:Bloodlust() and not buff[classtable.BeastWithinBuff].up) and cooldown[classtable.RapidFire].ready then
if (MaxDps:CheckSpellUsable(classtable.FocusFire, 'FocusFire')) and (not buff[classtable.FocusFireBuff].up and buff[classtable.FrenzyEffectBuff].count == 5) and cooldown[classtable.FocusFire].ready then
if not setSpell then setSpell = classtable.FocusFire end
end
if (MaxDps:CheckSpellUsable(classtable.ArcaneShot, 'ArcaneShot')) and (Focus >65) and cooldown[classtable.ArcaneShot].ready then
if not setSpell then setSpell = classtable.ArcaneShot end
end
if (MaxDps:CheckSpellUsable(classtable.CobraShot, 'CobraShot')) and (( not (GetUnitSpeed('player') >0) or buff[classtable.AspectoftheFoxBuff].up ) and UnitLevel('player') >80) and cooldown[classtable.CobraShot].ready then
if not setSpell then setSpell = classtable.CobraShot end
end
if (MaxDps:CheckSpellUsable(classtable.SteadyShot, 'SteadyShot')) and (( not (GetUnitSpeed('player') >0) or buff[classtable.AspectoftheFoxBuff].up ) and UnitLevel('player') <81) and cooldown[classtable.SteadyShot].ready then
if not setSpell then setSpell = classtable.SteadyShot end
end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheFox, 'AspectoftheFox')) and ((GetUnitSpeed('player') >0) and false and false) and cooldown[classtable.AspectoftheFox].ready then
if not setSpell then setSpell = classtable.AspectoftheFox end
end
end
function BeastMastery:single()
if (MaxDps:CheckSpellUsable(classtable.Misdirection, 'Misdirection')) and (false) and cooldown[classtable.Misdirection].ready then
if not setSpell then setSpell = classtable.Misdirection end
end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'AspectoftheHawk')) and (false and assigned_aspect.aspect_of_the_hawk and not (GetUnitSpeed('player') >0)) and cooldown[classtable.AspectoftheHawk].ready then
if not setSpell then setSpell = classtable.AspectoftheHawk end
end
if (MaxDps:CheckSpellUsable(classtable.HuntersMark, 'HuntersMark')) and (not debuff[classtable.HuntersMarkDeBuff].up) and cooldown[classtable.HuntersMark].ready then
if not setSpell then setSpell = classtable.HuntersMark end
end
if (MaxDps:CheckSpellUsable(classtable.BestialWrath, 'BestialWrath')) and (Focus >80 and debuff[classtable.SerpentStingDeBuff].remains >12) and cooldown[classtable.BestialWrath].ready then
if not setSpell then setSpell = classtable.BestialWrath end
end
if (MaxDps:CheckSpellUsable(classtable.RapidFire, 'RapidFire')) and (cooldown[classtable.CalloftheWild].ready) and cooldown[classtable.RapidFire].ready then
if not setSpell then setSpell = classtable.RapidFire end
end
if (MaxDps:CheckSpellUsable(classtable.KillCommand, 'KillCommand')) and cooldown[classtable.KillCommand].ready then
if not setSpell then setSpell = classtable.KillCommand end
if (MaxDps:CheckSpellUsable(classtable.CalloftheWild, 'CalloftheWild')) and (cooldown[classtable.RapidFire].ready and not false) and cooldown[classtable.CalloftheWild].ready then
if not setSpell then setSpell = classtable.CalloftheWild end
end
if (MaxDps:CheckSpellUsable(classtable.Fervor, 'Fervor')) and (Focus <= 37) and cooldown[classtable.Fervor].ready then
if (MaxDps:CheckSpellUsable(classtable.Fervor, 'Fervor')) and (Focus <50) and cooldown[classtable.Fervor].ready then
if not setSpell then setSpell = classtable.Fervor end
end
if (MaxDps:CheckSpellUsable(classtable.ArcaneShot, 'ArcaneShot')) and (Focus >= 59 or buff[classtable.BeastWithinBuff].up) and cooldown[classtable.ArcaneShot].ready then
if (MaxDps:CheckSpellUsable(classtable.SerpentSting, 'SerpentSting')) and (not debuff[classtable.SerpentStingDeBuff].up and not (MaxDps.spellHistory[1] == classtable.SerpentSting)) and cooldown[classtable.SerpentSting].ready then
if not setSpell then setSpell = classtable.SerpentSting end
end
if (MaxDps:CheckSpellUsable(classtable.ArcaneShot, 'ArcaneShot')) and (buff[classtable.TheBeastWithinBuff].up) and cooldown[classtable.ArcaneShot].ready then
if not setSpell then setSpell = classtable.ArcaneShot end
end
if (MaxDps:CheckSpellUsable(classtable.CobraShot, 'CobraShot')) and cooldown[classtable.CobraShot].ready then
if (MaxDps:CheckSpellUsable(classtable.CobraShot, 'CobraShot')) and (cooldown[classtable.BestialWrath].remains == 0 and UnitLevel('player') >80) and cooldown[classtable.CobraShot].ready then
if not setSpell then setSpell = classtable.CobraShot end
end
if (MaxDps:CheckSpellUsable(classtable.SteadyShot, 'SteadyShot')) and (cooldown[classtable.BestialWrath].remains == 0 and UnitLevel('player') <81) and cooldown[classtable.SteadyShot].ready then
if not setSpell then setSpell = classtable.SteadyShot end
end
if (MaxDps:CheckSpellUsable(classtable.KillCommand, 'KillCommand')) and (UnitExists('pet')) and cooldown[classtable.KillCommand].ready then
if not setSpell then setSpell = classtable.KillCommand end
end
if (MaxDps:CheckSpellUsable(classtable.KillShot, 'KillShot')) and (targetHP <20) and cooldown[classtable.KillShot].ready then
if not setSpell then setSpell = classtable.KillShot end
end
if (MaxDps:CheckSpellUsable(classtable.FocusFire, 'FocusFire')) and (not buff[classtable.FocusFireBuff].up and buff[classtable.FrenzyEffectBuff].count == 5) and cooldown[classtable.FocusFire].ready then
if not setSpell then setSpell = classtable.FocusFire end
end
if (MaxDps:CheckSpellUsable(classtable.ArcaneShot, 'ArcaneShot')) and (Focus >65) and cooldown[classtable.ArcaneShot].ready then
if not setSpell then setSpell = classtable.ArcaneShot end
end
if (MaxDps:CheckSpellUsable(classtable.CobraShot, 'CobraShot')) and (( not (GetUnitSpeed('player') >0) or buff[classtable.AspectoftheFoxBuff].up ) and UnitLevel('player') >80) and cooldown[classtable.CobraShot].ready then
if not setSpell then setSpell = classtable.CobraShot end
end
if (MaxDps:CheckSpellUsable(classtable.SteadyShot, 'SteadyShot')) and (( not (GetUnitSpeed('player') >0) or buff[classtable.AspectoftheFoxBuff].up ) and UnitLevel('player') <81) and cooldown[classtable.SteadyShot].ready then
if not setSpell then setSpell = classtable.SteadyShot end
end
if (MaxDps:CheckSpellUsable(classtable.AspectoftheFox, 'AspectoftheFox')) and ((GetUnitSpeed('player') >0) and false and false) and cooldown[classtable.AspectoftheFox].ready then
if not setSpell then setSpell = classtable.AspectoftheFox end
end
end


local function ClearCDs()
end

function BeastMastery:callaction()
BeastMastery:init()
if (MaxDps:CheckSpellUsable(classtable.HyperspeedAcceleration, 'HyperspeedAcceleration')) and cooldown[classtable.HyperspeedAcceleration].ready then
if not setSpell then setSpell = classtable.HyperspeedAcceleration end
end
if (targets >2) then
BeastMastery:aoe()
end
if (targets == 2) then
BeastMastery:cleave()
end
BeastMastery:single()
end
function Hunter:BeastMastery()
fd = MaxDps.FrameData
Expand Down Expand Up @@ -157,12 +301,42 @@ function Hunter:BeastMastery()
-- self.Flags[spellId] = false
-- self:ClearGlowIndependent(spellId, spellId)
--end
classtable.bloodlust = 0
classtable.SerpentStingDeBuff = 271788
classtable.BeastWithinBuff = 34471
classtable.AspectBuff = 0
classtable.HuntersMarkDeBuff = 1130
classtable.TrainingDummyDeBuff = 0
classtable.AspectoftheFoxBuff = 0
classtable.SerpentStingDeBuff = 1978
classtable.TheBeastWithinBuff = 38373
classtable.FocusFireBuff = 82692
classtable.FrenzyEffectBuff = 19615
classtable.HuntersMark = 1130
classtable.Misdirection = 34477
classtable.BestialWrath = 19574
classtable.RapidFire = 3045
classtable.TrapLauncher = 77769
classtable.ExplosiveTrap = 13813
classtable.KillShot = 53351
classtable.CobraShot = 77767
classtable.SteadyShot = 56641
classtable.SerpentSting = 1978
classtable.Fervor = 82726
classtable.ArcaneShot = 3044
classtable.FocusFire = 82692
classtable.KillCommand = 34026

local function debugg()
end


if MaxDps.db.global.debugMode then
debugg()
end

setSpell = nil
ClearCDs()

BeastMastery:precombat()

BeastMastery:callaction()
if setSpell then return setSpell end
end
Loading

0 comments on commit 3cabae7

Please sign in to comment.