Mercurial > wow > skeencore3beastmasteryhunter
changeset 25:a03c3c813e3e v1.5.4
Updated for patch 5.4.0
| author | Emil Madsen <skeen@cs.au.dk> |
|---|---|
| date | Tue, 03 Dec 2013 21:27:10 +0100 |
| parents | 737091a6d012 |
| children | 442108748d1e |
| files | SkeenCore3BeastMasteryHunter.lua SkeenCore3BeastMasteryHunter.toc |
| diffstat | 2 files changed, 101 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/SkeenCore3BeastMasteryHunter.lua Wed May 22 22:38:32 2013 +0200 +++ b/SkeenCore3BeastMasteryHunter.lua Tue Dec 03 21:27:10 2013 +0100 @@ -3,6 +3,54 @@ -- local LibSkeenCore = LibStub("LibSkeenCore"); +local function Plugin_Registed() + -- Default saved variables + if SkeenCore3BeastMasteryHunterdb == nil then + SkeenCore3BeastMasteryHunterdb = {} -- fresh start + end + + -- Load defaults + if SkeenCore3BeastMasteryHunterdb.SuggestHuntersMark == nil then + SkeenCore3BeastMasteryHunterdb.SuggestHuntersMark = false + end +end + +local Option_Functions = {} + +function Option_Functions:GetHuntersMark() + return SkeenCore3BeastMasteryHunterdb.SuggestHuntersMark +end + + +function Option_Functions:ToggleHuntersMark() + SkeenCore3BeastMasteryHunterdb.SuggestHuntersMark = not SkeenCore3BeastMasteryHunterdb.SuggestHuntersMark +end + + +local function Option_Frame() + local panel = CreateFrame("FRAME") + + local string + local checkbox + + local y = -40 + local string_X = 10 + local checkbox_X = -10 + + string = panel:CreateFontString(nil,"OVERLAY","GameFontNormal") + string:SetText("Suggest Hunters Mark in Rotation") + string:SetPoint("TOPLEFT", string_X, y) + + checkbox = CreateFrame("CheckButton", nil, panel, "OptionsCheckButtonTemplate") + checkbox:SetWidth(18) + checkbox:SetHeight(18) + checkbox:SetScript("OnClick", function() Option_Functions:ToggleVanish() end) + checkbox:SetPoint("TOPRIGHT", checkbox_X, y) + checkbox:SetChecked(Option_Functions:ToggleHuntersMark()) + + return panel +end + local function Cooldowns() -- Ability SpellID @@ -23,9 +71,9 @@ --Information from; --http://www.wowpedia.org/API_GetTalentInfo_(Mists) - local a_murder_of_crows_chosen = LibSkeenCore:HasChosenTalent(13) - local blink_strike_chosen = LibSkeenCore:HasChosenTalent(14) - local lynx_rush_chosen = LibSkeenCore:HasChosenTalent(15) + local fervor_chosen = LibSkeenCore:HasChosenTalent(10) + local dire_beast_chosen = LibSkeenCore:HasChosenTalent(11) + local thrill_of_the_hunt_chosen = LibSkeenCore:HasChosenTalent(12) local glaive_toss_chosen = LibSkeenCore:HasChosenTalent(16) local powershot_chosen = LibSkeenCore:HasChosenTalent(17) local barrage_chosen = LibSkeenCore:HasChosenTalent(18) @@ -44,13 +92,12 @@ local KillShotID = 53351 local FocusFireID = 82692 local FervorID = 82726 + local DireBeastID = 120679 + local ThrillOfTheHuntID = 109306 local SerpentStingID = 1978 local ArcaneShotID = 3044 local CobraShotID = 77767 local HuntersMarkID = 1130 - local AMurderOfCrowsID = 131894 - local BlinkStrikeID = 130392 - local LynxRushID = 120697 local GlaiveTossID = 117050 local PowershotID = 109259 local BarrageID = 120360 @@ -61,11 +108,9 @@ --Cooldowns local kill_command_cooldown = LibSkeenCore:GetCooldown(KillCommandID) --"Kill Command" local kill_shot_cooldown = LibSkeenCore:GetCooldown(KillShotID) --"Kill Shot" - local focus_fire_cooldown = LibSkeenCore:GetCooldown(FocusFireID) --"Focus Fire" local fervor_cooldown = LibSkeenCore:GetCooldown(FervorID) --"Fervor" - local a_murder_of_crows_cooldown = LibSkeenCore:GetCooldown(AMurderOfCrowsID) --"A Murder of Crows" - local blink_strike_cooldown = LibSkeenCore:GetCooldown(BlinkStrikeID) --"Blink Strike" - local lynx_rush_cooldown = LibSkeenCore:GetCooldown(LynxRushID) --"Lynx Rush" + local dire_beast_cooldown = LibSkeenCore:GetCooldown(DireBeastID) --"Dire Beast" + local thrill_of_the_hunt_cooldown = LibSkeenCore:GetCooldown(ThrillOfTheHuntID) --"Fervor" local glaive_toss_cooldown = LibSkeenCore:GetCooldown(GlaiveTossID) --"Glaive Toss" local powershot_cooldown = LibSkeenCore:GetCooldown(PowershotID) --"Powershot" local barrage_cooldown = LibSkeenCore:GetCooldown(BarrageID) --"Barrage" @@ -80,36 +125,56 @@ -- Get the target's health percentage local TargetsPercentOfHealth = (UnitHealth("target") / UnitHealthMax("target") * 100); - if(HuntersMark_duration < 1) then + -- Apply Hunter's Mark Icon Hunter's Mark on the target. + if ((HuntersMark_duration < 1) and Option_Functions:GetHuntersMark()) then spell.current = HuntersMarkID + -- Cast Kill Command Icon Kill Command on cooldown. + elseif(kill_command_cooldown < 1) then + if (focus >= 40) then + spell.current = KillCommandID + else + spell.next = KillCommandID + end + -- Cast Kill Shot Icon Kill Shot (only available below 20% health). + elseif ((TargetsPercentOfHealth < 20) and (kill_shot_cooldown<1)) then + spell.current = KillShotID + -- Apply and maintain Serpent Sting Icon Serpent Sting to the target + -- it will be refreshed by Cobra Shot Icon Cobra Shot so it only needs to be done once, normally. elseif (serpent_sting_duration < 1) then if (focus >= 25) then spell.current = SerpentStingID else spell.next = SerpentStingID end + -- Cast your Tier 6 talent (normally Glaive Toss Icon Glaive Toss) + elseif (glaive_toss_chosen == true) and (glaive_toss_cooldown < 1) then + if (focus >= 15) then + spell.current = GlaiveTossID + else + spell.next = GlaiveTossID + end + elseif (powershot_chosen == true) and (powershot_cooldown < 1) and (focus >= 20) then + if (focus >= 20) then + spell.current = PowershotID + else + spell.next = PowershotID + end + elseif (barrage_chosen == true) and (barrage_cooldown < 1) then + if (focus >= 30) then + spell.current = BarrageID + else + spell.next = BarrageID + end + -- Cast your Tier 4 talent (normally Dire Beast Icon Dire Beast). + elseif (fervor_chosen == true) and (fervor_cooldown < 1) then + spell.current = FervorID + elseif (dire_beast_chosen == true) and (dire_beast_cooldown < 1) then + spell.current = DireBeastID + elseif (thrill_of_the_hunt_chosen == true) and (thrill_of_the_hunt_cooldown < 1) then + spell.current = ThrillOfTheHuntID + -- Cast Focus Fire Icon Focus Fire when your pet's Frenzy Icon Frenzy reaches 5 stacks (the icon will glow) elseif (frenzy_stacks == 5) then spell.current = FocusFireID - elseif (glaive_toss_chosen == true) and (glaive_toss_cooldown < 1) and (focus >= 15) then - spell.current = GlaiveTossID - elseif (powershot_chosen == true) and (powershot_cooldown < 1) and (focus >= 20) then - spell.current = PowershotID - elseif (barrage_chosen == true) and (barrage_cooldown < 1) and (focus >= 30) then - spell.current = BarrageID - elseif (a_murder_of_crows_chosen == true) and (a_murder_of_crows_cooldown < 1) then - spell.current = AMurderOfCrowsID - elseif (blink_strike_chosen == true) and (blink_strike_cooldown < 1) then - spell.current = BlinkStrikeID - elseif (lynx_rush_chosen == true) and (lynx_rush_cooldown < 1) then - spell.current = LynxRushID - elseif (kill_command_cooldown < 1) then - if (focus >= 40) then - spell.current = KillCommandID - else - spell.next = KillCommandID - end - elseif ((TargetsPercentOfHealth < 20) and (kill_shot_cooldown<1)) then - spell.current = KillShotID elseif (focus >= 60) then spell.current = ArcaneShotID else @@ -123,9 +188,11 @@ SkeenPlugin.Name = "Hunter: Beast Mastery" SkeenPlugin.Class = "HUNTER" SkeenPlugin.Spec = 1 -SkeenPlugin.Version = "5.2.0" +SkeenPlugin.Version = "5.4.0" SkeenPlugin.Rotation = Rotation SkeenPlugin.Cooldowns = Cooldowns +SkeenPlugin.Plugin_Registed = Plugin_Registed +SkeenPlugin.Option_Frame = Option_Frame local SkeenCore3 = _G["SkeenCore3"] SkeenCore3:RegisterPlugin(SkeenPlugin)
--- a/SkeenCore3BeastMasteryHunter.toc Wed May 22 22:38:32 2013 +0200 +++ b/SkeenCore3BeastMasteryHunter.toc Tue Dec 03 21:27:10 2013 +0100 @@ -1,7 +1,7 @@ ## Title: |cffffd200Skeen|r|cff69ccf0Core3|rBeastMasteryHunter -## Version: 1.5.3 +## Version: 1.5.4 ## Author: Skeen -## Interface: 50300 +## Interface: 50400 ## Dependencies: SkeenCore3 ## RequiredDeps: SkeenCore3 ## SavedVariables: SkeenBeastMasteryHunterdb
