Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kaminaris/MaxDps-Hunter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.0.16
Choose a base ref
...
head repository: kaminaris/MaxDps-Hunter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 13, 2024

  1. Update MaxDps_Hunter.toc

    doadin committed Aug 13, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    f608d97 View commit details

Commits on Aug 15, 2024

  1. BM Fix Hunters Mark

    doadin committed Aug 15, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    99b67a7 View commit details
  2. Update MaxDps_Hunter.toc

    doadin committed Aug 15, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    5dd80dd View commit details

Commits on Aug 17, 2024

  1. Update BM

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    4d36378 View commit details
  2. Update MM

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    34b3404 View commit details
  3. Update Surv

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    d51546f View commit details
  4. Update MaxDps_Hunter.toc

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    5a7258b View commit details
  5. Fix Double End In MM

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    46751a9 View commit details
  6. Update MaxDps_Hunter.toc

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    8783eac View commit details
  7. Fix Interrupts

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    206a667 View commit details
  8. Update MaxDps_Hunter.toc

    doadin committed Aug 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    8031b7d View commit details

Commits on Aug 18, 2024

  1. Update MM

    doadin committed Aug 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    4835407 View commit details
  2. Update MaxDps_Hunter.toc

    doadin committed Aug 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    d07a601 View commit details

Commits on Aug 24, 2024

  1. Update All

    doadin committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    04a459e View commit details
  2. Update MaxDps_Hunter.toc

    doadin committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    6d3680b View commit details
  3. Update All

    doadin committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    dfea6f1 View commit details
  4. Update MaxDps_Hunter.toc

    doadin committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    e475939 View commit details
  5. Update All

    doadin committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    e81f4c4 View commit details
  6. Update MaxDps_Hunter.toc

    doadin committed Aug 24, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    89485e1 View commit details

Commits on Aug 26, 2024

  1. Update All

    doadin committed Aug 26, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    ad9671f View commit details
  2. Update MaxDps_Hunter.toc

    doadin committed Aug 26, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    a8c6f99 View commit details

Commits on Oct 3, 2024

  1. Cata

    doadin committed Oct 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    173779e View commit details
  2. Cata 2

    doadin committed Oct 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    03a1661 View commit details

Commits on Oct 4, 2024

  1. Cata 3

    doadin committed Oct 4, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    c84e9d2 View commit details

Commits on Oct 30, 2024

  1. Update Surv

    doadin committed Oct 30, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    2fbd01e View commit details
  2. Update BM

    doadin committed Oct 30, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    f7e7ac8 View commit details
  3. Update MM

    doadin committed Oct 30, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    cb2ffd6 View commit details

Commits on Oct 31, 2024

  1. Update BM

    doadin committed Oct 31, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    07d8a15 View commit details
  2. Update All Cata

    doadin committed Oct 31, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    1b6075f View commit details

Commits on Nov 6, 2024

  1. Update All Cata

    doadin committed Nov 6, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    000fa97 View commit details

Commits on Dec 17, 2024

  1. Update TOC

    doadin committed Dec 17, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    dc0a5bb View commit details

Commits on Jan 9, 2025

  1. Update All Cata

    doadin committed Jan 9, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    3cabae7 View commit details

Commits on Jan 14, 2025

  1. Update All Cata

    doadin committed Jan 14, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    472cd9a View commit details

Commits on Jan 15, 2025

  1. Update Dev Setting

    doadin committed Jan 15, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    97b0f49 View commit details

Commits on Jan 25, 2025

  1. Update All Cata

    doadin committed Jan 25, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    1eb8cb6 View commit details
  2. Update All Cata

    doadin committed Jan 25, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    b7e7e65 View commit details
  3. Update All Cata

    doadin committed Jan 25, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    45fd22c View commit details

Commits on Jan 27, 2025

  1. Update Cata Surv

    doadin committed Jan 27, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    d30468d View commit details

Commits on Feb 1, 2025

  1. Classic

    doadin committed Feb 1, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    c934d6f View commit details
  2. Update All Classic

    doadin committed Feb 1, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    0519568 View commit details

Commits on Feb 11, 2025

  1. Update All Classic

    doadin committed Feb 11, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    9854fae View commit details
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -28,3 +28,13 @@ jobs:
uses: BigWigsMods/packager@master
with:
args: -g retail

- name: Package Cata Classic
uses: BigWigsMods/packager@master
with:
args: -g cata

- name: Package Classic
uses: BigWigsMods/packager@master
with:
args: -g classic
11 changes: 8 additions & 3 deletions Main.lua
Original file line number Diff line number Diff line change
@@ -30,8 +30,10 @@ local _PetBasics = {
}

function Hunter:Enable()
Hunter:InitializeDatabase()
Hunter:CreateConfig()
if MaxDps:IsRetailWow() then
Hunter:InitializeDatabase()
Hunter:CreateConfig()
end

if MaxDps.Spec == 1 then
MaxDps.NextSpell = Hunter.BeastMastery
@@ -42,7 +44,10 @@ function Hunter:Enable()
elseif MaxDps.Spec == 3 then
MaxDps.NextSpell = Hunter.Survival
MaxDps:Print(MaxDps.Colors.Info .. 'Hunter Survival', "info")
end
elseif MaxDps:IsClassicWow() then
MaxDps.NextSpell = Hunter.Marksmanship
MaxDps:Print(MaxDps.Colors.Info .. 'Hunter', "info")
end

return true
end
25 changes: 22 additions & 3 deletions MaxDps_Hunter.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
## Title: MaxDps_Hunter
## Version: 10.0.16
## Version: @project-version@
## Author: Kaminaris
## Interface: 110000
## Interface: 110007
## Interface-Retail: 110007
## Interface-Classic: 11505
## Interface-BCC: 20504
## Interface-Wrath: 30403
## Interface-Cata: 40401
## Dependencies: MaxDps
## LoadOnDemand: 1
## SavedVariables: MaxDpsHunterOptions
@@ -10,7 +15,21 @@
## X-Wago-ID: XKq9w5Ky

Main.lua
#@retail@
Specialization\Beastmastery.lua
Specialization\Survival.lua
Specialization\Marksmanship.lua
Config.lua
Config.lua
#@end-retail@

#@version-cata@
Specialization\Cata\Beastmastery.lua
Specialization\Cata\Survival.lua
Specialization\Cata\Marksmanship.lua
#@end-version-cata@

#@version-classic@
Specialization\Classic\Beastmastery.lua
Specialization\Classic\Survival.lua
Specialization\Classic\Marksmanship.lua
#@end-version-classic@
303 changes: 101 additions & 202 deletions Specialization/Beastmastery.lua

Large diffs are not rendered by default.

350 changes: 350 additions & 0 deletions Specialization/Cata/BeastMastery.lua

Large diffs are not rendered by default.

351 changes: 351 additions & 0 deletions Specialization/Cata/Marksmanship.lua

Large diffs are not rendered by default.

316 changes: 316 additions & 0 deletions Specialization/Cata/Survival.lua

Large diffs are not rendered by default.

183 changes: 183 additions & 0 deletions Specialization/Classic/BeastMastery.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
local _, addonTable = ...
local Hunter = addonTable.Hunter
local MaxDps = _G.MaxDps
if not MaxDps then return end
local setSpell

local UnitPower = UnitPower
local UnitHealth = UnitHealth
local UnitAura = C_UnitAuras.GetAuraDataByIndex
local UnitAuraByName = C_UnitAuras.GetAuraDataBySpellName
local UnitHealthMax = UnitHealthMax
local UnitPowerMax = UnitPowerMax
local SpellHaste
local SpellCrit
local GetSpellInfo = C_Spell.GetSpellInfo
local GetSpellCooldown = C_Spell.GetSpellCooldown
local GetSpellCount = C_Spell.GetSpellCastCount

local ManaPT = Enum.PowerType.Mana
local RagePT = Enum.PowerType.Rage
local FocusPT = Enum.PowerType.Focus
local EnergyPT = Enum.PowerType.Energy
local ComboPointsPT = Enum.PowerType.ComboPoints
local RunesPT = Enum.PowerType.Runes
local RunicPowerPT = Enum.PowerType.RunicPower
local SoulShardsPT = Enum.PowerType.SoulShards
local LunarPowerPT = Enum.PowerType.LunarPower
local HolyPowerPT = Enum.PowerType.HolyPower
local MaelstromPT = Enum.PowerType.Maelstrom
local ChiPT = Enum.PowerType.Chi
local InsanityPT = Enum.PowerType.Insanity
local ArcaneChargesPT = Enum.PowerType.ArcaneCharges
local FuryPT = Enum.PowerType.Fury
local PainPT = Enum.PowerType.Pain
local EssencePT = Enum.PowerType.Essence
local RuneBloodPT = Enum.PowerType.RuneBlood
local RuneFrostPT = Enum.PowerType.RuneFrost
local RuneUnholyPT = Enum.PowerType.RuneUnholy

local fd
local ttd
local timeShift
local gcd
local cooldown
local buff
local debuff
local talents
local targets
local targetHP
local targetmaxHP
local targethealthPerc
local curentHP
local maxHP
local healthPerc
local timeInCombat
local classtable
local LibRangeCheck = LibStub('LibRangeCheck-3.0', true)

local Focus
local FocusMax
local FocusDeficit
local FocusRegen
local FocusTimeToMax
local FocusPerc
local petHP
local petmaxHP
local pethealthPerc

local BeastMastery = {}


function BeastMastery:precombat()

end

function BeastMastery:aoe()
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'Multi-Shot')) and cooldown[classtable.MultiShot].ready then
if not setSpell then setSpell = classtable.MultiShot end
end
if (MaxDps:CheckSpellUsable(classtable.Volley, 'Volley')) and cooldown[classtable.Volley].ready then
if not setSpell then setSpell = classtable.Volley end
end
if (MaxDps:CheckSpellUsable(classtable.ExplosiveTrap, 'Explosive Trap')) and cooldown[classtable.ExplosiveTrap].ready then
if not setSpell then setSpell = classtable.ExplosiveTrap end
end
end
function BeastMastery:single()
if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'Aspect of the Hawk')) and (not MaxDps:FindBuffAuraData(classtable.AspectoftheHawk).up) and cooldown[classtable.AspectoftheHawk].ready then
if not setSpell then setSpell = classtable.AspectoftheHawk end
end
if (MaxDps:CheckSpellUsable(classtable.HuntersMark, 'Hunters Mark')) and (not MaxDps:FindADAuraData(classtable.HuntersMark).up) and cooldown[classtable.HuntersMark].ready then
if not setSpell then setSpell = classtable.HuntersMark end
end
if (MaxDps:CheckSpellUsable(classtable.BestialWrath, 'Bestial Wrath')) and cooldown[classtable.BestialWrath].ready then
if not setSpell then setSpell = classtable.BestialWrath end
end
if (MaxDps:CheckSpellUsable(classtable.RapidFire, 'Rapid Fire')) and cooldown[classtable.RapidFire].ready then
if not setSpell then setSpell = classtable.RapidFire end
end
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'Multi-Shot')) and cooldown[classtable.MultiShot].ready then
if not setSpell then setSpell = classtable.MultiShot end
end
if (MaxDps:CheckSpellUsable(classtable.SerpentSting , 'Serpent Sting')) and (not MaxDps:FindADAuraData(classtable.SerpentSting).up) and cooldown[classtable.SerpentSting].ready then
if not setSpell then setSpell = classtable.SerpentSting end
end
if (MaxDps:CheckSpellUsable(classtable.AimedShot, 'Aimed Shot')) and cooldown[classtable.AimedShot].ready then
if not setSpell then setSpell = classtable.AimedShot end
end
if (MaxDps:CheckSpellUsable(classtable.ArcaneShot, 'Arcane Shot')) and not MaxDps:FindSpell(classtable.AimedShot) and cooldown[classtable.ArcaneShot].ready then
if not setSpell then setSpell = classtable.ArcaneShot end
end
end


local function ClearCDs()
end

function BeastMastery:callaction()
if (targets >2) then
BeastMastery:aoe()
end
BeastMastery:single()
end
function Hunter:BeastMastery()
fd = MaxDps.FrameData
ttd = (fd.timeToDie and fd.timeToDie) or 500
timeShift = fd.timeShift
gcd = fd.gcd
cooldown = fd.cooldown
buff = fd.buff
debuff = fd.debuff
talents = fd.talents
targets = MaxDps:SmartAoe()
Mana = UnitPower('player', ManaPT)
ManaMax = UnitPowerMax('player', ManaPT)
ManaDeficit = ManaMax - Mana
targetHP = UnitHealth('target')
targetmaxHP = UnitHealthMax('target')
targethealthPerc = (targetHP >0 and targetmaxHP >0 and (targetHP / targetmaxHP) * 100) or 100
curentHP = UnitHealth('player')
maxHP = UnitHealthMax('player')
healthPerc = (curentHP / maxHP) * 100
timeInCombat = MaxDps.combatTime or 0
classtable = MaxDps.SpellTable
SpellHaste = UnitSpellHaste('player')
SpellCrit = GetCritChance()
Focus = UnitPower('player', FocusPT)
FocusMax = UnitPowerMax('player', FocusPT)
FocusDeficit = FocusMax - Focus
FocusRegen = GetPowerRegenForPowerType(Enum.PowerType.Focus)
FocusTimeToMax = FocusDeficit / FocusRegen
FocusPerc = (Focus / FocusMax) * 100
petHP = UnitHealth('pet')
petmaxHP = UnitHealthMax('pet')
pethealthPerc = (petHP > 0 and petmaxHP > 0 and (petHP / petmaxHP) * 100) or 100

classtable.AspectoftheHawk = 25296
classtable.HuntersMark = 14325
classtable.BestialWrath = 19574
classtable.RapidFire = 3045
classtable.MultiShot = 14290
classtable.SerpentSting = 13555
classtable.AimedShot = 20904
classtable.ArcaneShot = 14287
classtable.Volley = 14295
classtable.ExplosiveTrap = 409535

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
175 changes: 175 additions & 0 deletions Specialization/Classic/Marksmanship.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
local _, addonTable = ...
local Hunter = addonTable.Hunter
local MaxDps = _G.MaxDps
if not MaxDps then return end
local setSpell

local UnitPower = UnitPower
local UnitHealth = UnitHealth
local UnitAura = C_UnitAuras.GetAuraDataByIndex
local UnitAuraByName = C_UnitAuras.GetAuraDataBySpellName
local UnitHealthMax = UnitHealthMax
local UnitPowerMax = UnitPowerMax
local SpellHaste
local SpellCrit
local GetSpellInfo = C_Spell.GetSpellInfo
local GetSpellCooldown = C_Spell.GetSpellCooldown
local GetSpellCount = C_Spell.GetSpellCastCount

local ManaPT = Enum.PowerType.Mana
local RagePT = Enum.PowerType.Rage
local FocusPT = Enum.PowerType.Focus
local EnergyPT = Enum.PowerType.Energy
local ComboPointsPT = Enum.PowerType.ComboPoints
local RunesPT = Enum.PowerType.Runes
local RunicPowerPT = Enum.PowerType.RunicPower
local SoulShardsPT = Enum.PowerType.SoulShards
local LunarPowerPT = Enum.PowerType.LunarPower
local HolyPowerPT = Enum.PowerType.HolyPower
local MaelstromPT = Enum.PowerType.Maelstrom
local ChiPT = Enum.PowerType.Chi
local InsanityPT = Enum.PowerType.Insanity
local ArcaneChargesPT = Enum.PowerType.ArcaneCharges
local FuryPT = Enum.PowerType.Fury
local PainPT = Enum.PowerType.Pain
local EssencePT = Enum.PowerType.Essence
local RuneBloodPT = Enum.PowerType.RuneBlood
local RuneFrostPT = Enum.PowerType.RuneFrost
local RuneUnholyPT = Enum.PowerType.RuneUnholy

local fd
local ttd
local timeShift
local gcd
local cooldown
local buff
local debuff
local talents
local targets
local targetHP
local targetmaxHP
local targethealthPerc
local curentHP
local maxHP
local healthPerc
local timeInCombat
local classtable
local LibRangeCheck = LibStub('LibRangeCheck-3.0', true)

local Focus
local FocusMax
local FocusDeficit
local FocusRegen
local FocusTimeToMax
local FocusPerc
local petHP
local petmaxHP
local pethealthPerc

local Marksmanship = {}


function Marksmanship:precombat()

end

function Marksmanship:aoe()
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'Multi-Shot')) and cooldown[classtable.MultiShot].ready then
if not setSpell then setSpell = classtable.MultiShot end
end
if (MaxDps:CheckSpellUsable(classtable.Volley, 'Volley')) and cooldown[classtable.Volley].ready then
if not setSpell then setSpell = classtable.Volley end
end
if (MaxDps:CheckSpellUsable(classtable.ExplosiveTrap, 'Explosive Trap')) and cooldown[classtable.ExplosiveTrap].ready then
if not setSpell then setSpell = classtable.ExplosiveTrap end
end
end
function Marksmanship:single()
if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'Aspect of the Hawk')) and (not MaxDps:FindBuffAuraData(classtable.AspectoftheHawk).up) and cooldown[classtable.AspectoftheHawk].ready then
if not setSpell then setSpell = classtable.AspectoftheHawk end
end
if (MaxDps:CheckSpellUsable(classtable.HuntersMark, 'Hunters Mark')) and (not MaxDps:FindADAuraData(classtable.HuntersMark).up) and cooldown[classtable.HuntersMark].ready then
if not setSpell then setSpell = classtable.HuntersMark end
end
if (MaxDps:CheckSpellUsable(classtable.RapidFire, 'Rapid Fire')) and cooldown[classtable.RapidFire].ready then
if not setSpell then setSpell = classtable.RapidFire end
end
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'Multi-Shot')) and cooldown[classtable.MultiShot].ready then
if not setSpell then setSpell = classtable.MultiShot end
end
if (MaxDps:CheckSpellUsable(classtable.SerpentSting , 'Serpent Sting')) and (not MaxDps:FindADAuraData(classtable.SerpentSting).up) and cooldown[classtable.SerpentSting].ready then
if not setSpell then setSpell = classtable.SerpentSting end
end
if (MaxDps:CheckSpellUsable(classtable.AimedShot, 'Aimed Shot')) and cooldown[classtable.AimedShot].ready then
if not setSpell then setSpell = classtable.AimedShot end
end
end


local function ClearCDs()
end

function Marksmanship:callaction()
if (targets >2) then
Marksmanship:aoe()
end
Marksmanship:single()
end
function Hunter:Marksmanship()
fd = MaxDps.FrameData
ttd = (fd.timeToDie and fd.timeToDie) or 500
timeShift = fd.timeShift
gcd = fd.gcd
cooldown = fd.cooldown
buff = fd.buff
debuff = fd.debuff
talents = fd.talents
targets = MaxDps:SmartAoe()
Mana = UnitPower('player', ManaPT)
ManaMax = UnitPowerMax('player', ManaPT)
ManaDeficit = ManaMax - Mana
targetHP = UnitHealth('target')
targetmaxHP = UnitHealthMax('target')
targethealthPerc = (targetHP >0 and targetmaxHP >0 and (targetHP / targetmaxHP) * 100) or 100
curentHP = UnitHealth('player')
maxHP = UnitHealthMax('player')
healthPerc = (curentHP / maxHP) * 100
timeInCombat = MaxDps.combatTime or 0
classtable = MaxDps.SpellTable
SpellHaste = UnitSpellHaste('player')
SpellCrit = GetCritChance()
Focus = UnitPower('player', FocusPT)
FocusMax = UnitPowerMax('player', FocusPT)
FocusDeficit = FocusMax - Focus
FocusRegen = GetPowerRegenForPowerType(Enum.PowerType.Focus)
FocusTimeToMax = FocusDeficit / FocusRegen
FocusPerc = (Focus / FocusMax) * 100
petHP = UnitHealth('pet')
petmaxHP = UnitHealthMax('pet')
pethealthPerc = (petHP > 0 and petmaxHP > 0 and (petHP / petmaxHP) * 100) or 100

classtable.AspectoftheHawk = 25296
classtable.HuntersMark = 14325
classtable.RapidFire = 3045
classtable.MultiShot = 14290
classtable.SerpentSting = 13555
classtable.AimedShot = 20904
classtable.Volley = 14295
classtable.ExplosiveTrap = 409535

local function debugg()
end


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

setSpell = nil
ClearCDs()

Marksmanship:precombat()

Marksmanship:callaction()
if setSpell then return setSpell end
end
175 changes: 175 additions & 0 deletions Specialization/Classic/Survival.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
local _, addonTable = ...
local Hunter = addonTable.Hunter
local MaxDps = _G.MaxDps
if not MaxDps then return end
local setSpell

local UnitPower = UnitPower
local UnitHealth = UnitHealth
local UnitAura = C_UnitAuras.GetAuraDataByIndex
local UnitAuraByName = C_UnitAuras.GetAuraDataBySpellName
local UnitHealthMax = UnitHealthMax
local UnitPowerMax = UnitPowerMax
local SpellHaste
local SpellCrit
local GetSpellInfo = C_Spell.GetSpellInfo
local GetSpellCooldown = C_Spell.GetSpellCooldown
local GetSpellCount = C_Spell.GetSpellCastCount

local ManaPT = Enum.PowerType.Mana
local RagePT = Enum.PowerType.Rage
local FocusPT = Enum.PowerType.Focus
local EnergyPT = Enum.PowerType.Energy
local ComboPointsPT = Enum.PowerType.ComboPoints
local RunesPT = Enum.PowerType.Runes
local RunicPowerPT = Enum.PowerType.RunicPower
local SoulShardsPT = Enum.PowerType.SoulShards
local LunarPowerPT = Enum.PowerType.LunarPower
local HolyPowerPT = Enum.PowerType.HolyPower
local MaelstromPT = Enum.PowerType.Maelstrom
local ChiPT = Enum.PowerType.Chi
local InsanityPT = Enum.PowerType.Insanity
local ArcaneChargesPT = Enum.PowerType.ArcaneCharges
local FuryPT = Enum.PowerType.Fury
local PainPT = Enum.PowerType.Pain
local EssencePT = Enum.PowerType.Essence
local RuneBloodPT = Enum.PowerType.RuneBlood
local RuneFrostPT = Enum.PowerType.RuneFrost
local RuneUnholyPT = Enum.PowerType.RuneUnholy

local fd
local ttd
local timeShift
local gcd
local cooldown
local buff
local debuff
local talents
local targets
local targetHP
local targetmaxHP
local targethealthPerc
local curentHP
local maxHP
local healthPerc
local timeInCombat
local classtable
local LibRangeCheck = LibStub('LibRangeCheck-3.0', true)

local Focus
local FocusMax
local FocusDeficit
local FocusRegen
local FocusTimeToMax
local FocusPerc
local petHP
local petmaxHP
local pethealthPerc

local Survival = {}


function Survival:precombat()

end

function Survival:aoe()
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'Multi-Shot')) and cooldown[classtable.MultiShot].ready then
if not setSpell then setSpell = classtable.MultiShot end
end
if (MaxDps:CheckSpellUsable(classtable.Volley, 'Volley')) and cooldown[classtable.Volley].ready then
if not setSpell then setSpell = classtable.Volley end
end
if (MaxDps:CheckSpellUsable(classtable.ExplosiveTrap, 'Explosive Trap')) and cooldown[classtable.ExplosiveTrap].ready then
if not setSpell then setSpell = classtable.ExplosiveTrap end
end
end
function Survival:single()
if (MaxDps:CheckSpellUsable(classtable.AspectoftheHawk, 'Aspect of the Hawk')) and (not MaxDps:FindBuffAuraData(classtable.AspectoftheHawk).up) and cooldown[classtable.AspectoftheHawk].ready then
if not setSpell then setSpell = classtable.AspectoftheHawk end
end
if (MaxDps:CheckSpellUsable(classtable.HuntersMark, 'Hunters Mark')) and (not MaxDps:FindADAuraData(classtable.HuntersMark).up) and cooldown[classtable.HuntersMark].ready then
if not setSpell then setSpell = classtable.HuntersMark end
end
if (MaxDps:CheckSpellUsable(classtable.RapidFire, 'Rapid Fire')) and cooldown[classtable.RapidFire].ready then
if not setSpell then setSpell = classtable.RapidFire end
end
if (MaxDps:CheckSpellUsable(classtable.MultiShot, 'Multi-Shot')) and cooldown[classtable.MultiShot].ready then
if not setSpell then setSpell = classtable.MultiShot end
end
if (MaxDps:CheckSpellUsable(classtable.SerpentSting , 'Serpent Sting')) and (not MaxDps:FindADAuraData(classtable.SerpentSting).up) and cooldown[classtable.SerpentSting].ready then
if not setSpell then setSpell = classtable.SerpentSting end
end
if (MaxDps:CheckSpellUsable(classtable.AimedShot, 'Aimed Shot')) and cooldown[classtable.AimedShot].ready then
if not setSpell then setSpell = classtable.AimedShot end
end
end


local function ClearCDs()
end

function Survival:callaction()
if (targets >2) then
Survival:aoe()
end
Survival:single()
end
function Hunter:Survival()
fd = MaxDps.FrameData
ttd = (fd.timeToDie and fd.timeToDie) or 500
timeShift = fd.timeShift
gcd = fd.gcd
cooldown = fd.cooldown
buff = fd.buff
debuff = fd.debuff
talents = fd.talents
targets = MaxDps:SmartAoe()
Mana = UnitPower('player', ManaPT)
ManaMax = UnitPowerMax('player', ManaPT)
ManaDeficit = ManaMax - Mana
targetHP = UnitHealth('target')
targetmaxHP = UnitHealthMax('target')
targethealthPerc = (targetHP >0 and targetmaxHP >0 and (targetHP / targetmaxHP) * 100) or 100
curentHP = UnitHealth('player')
maxHP = UnitHealthMax('player')
healthPerc = (curentHP / maxHP) * 100
timeInCombat = MaxDps.combatTime or 0
classtable = MaxDps.SpellTable
SpellHaste = UnitSpellHaste('player')
SpellCrit = GetCritChance()
Focus = UnitPower('player', FocusPT)
FocusMax = UnitPowerMax('player', FocusPT)
FocusDeficit = FocusMax - Focus
FocusRegen = GetPowerRegenForPowerType(Enum.PowerType.Focus)
FocusTimeToMax = FocusDeficit / FocusRegen
FocusPerc = (Focus / FocusMax) * 100
petHP = UnitHealth('pet')
petmaxHP = UnitHealthMax('pet')
pethealthPerc = (petHP > 0 and petmaxHP > 0 and (petHP / petmaxHP) * 100) or 100

classtable.AspectoftheHawk = 25296
classtable.HuntersMark = 14325
classtable.RapidFire = 3045
classtable.MultiShot = 14290
classtable.SerpentSting = 13555
classtable.AimedShot = 20904
classtable.Volley = 14295
classtable.ExplosiveTrap = 409535

local function debugg()
end


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

setSpell = nil
ClearCDs()

Survival:precombat()

Survival:callaction()
if setSpell then return setSpell end
end
326 changes: 124 additions & 202 deletions Specialization/Marksmanship.lua

Large diffs are not rendered by default.

409 changes: 186 additions & 223 deletions Specialization/Survival.lua

Large diffs are not rendered by default.