changeset 17:58086ea2f944 v1.5.0

Updated for MoP by patch by Balire22
author Emil Madsen <skeen@cs.au.dk>
date Sat, 27 Apr 2013 19:49:49 +0200
parents 24332c8d9009
children 3efd2090d824
files SkeenCore3BeastMasteryHunter.lua SkeenCore3BeastMasteryHunter.toc
diffstat 2 files changed, 103 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/SkeenCore3BeastMasteryHunter.lua	Thu Sep 06 21:56:39 2012 +0200
+++ b/SkeenCore3BeastMasteryHunter.lua	Sat Apr 27 19:49:49 2013 +0200
@@ -6,10 +6,30 @@
 local function Rotation()
 
     -- Hide the frame, if the target is dead, non existing or friendly.
-	if UnitName("target") == nil or UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0 then
-		return nil
-	end
-	
+    if UnitName("target") == nil or UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0 then
+        return nil
+    end
+
+    --Information from;
+    --http://www.wowpedia.org/API_GetTalentInfo_(Mists)
+    local _, _, _, _, selected, _ = GetTalentInfo(13)
+    local a_murder_of_crows_chosen = selected
+
+    local _, _, _, _, selected, _ = GetTalentInfo(14)
+    local blink_strike_chosen = selected
+
+    local _, _, _, _, selected, _ = GetTalentInfo(15)
+    local lynx_rush_chosen = selected
+
+    local _, _, _, _, selected, _ = GetTalentInfo(16)
+    local glaive_toss_chosen = selected
+
+    local _, _, _, _, selected, _ = GetTalentInfo(17)
+    local powershot_chosen = selected
+
+    local _, _, _, _, selected, _ = GetTalentInfo(18)
+    local barrage_chosen = selected
+
     -- The table used for spell information (returned to the callee)
     local spell = {}
     spell.current = nil
@@ -18,76 +38,107 @@
     spell.cd2 = nil
     spell.cd3 = nil
     spell.cd4 = nil
-	
+
     -- Ability SpellID
-    local KillCommandID     = 34026
-    local KillShotID        = 53351
-    local RapidFireID       = 3045
-    local FocusFireID       = 82692
-    local FervorID          = 82726
-    local BestialWrathID    = 19574
-    local SerpentStingID    = 1978
-    local ArcaneShotID      = 3044
-    local CobraShotID       = 77767
-    local HuntersMarkID     = 1130
-    local ReadinessID       = 23989
+    local KillCommandID = 34026
+    local KillShotID = 53351
+    local RapidFireID = 3045
+    local FocusFireID = 82692
+    local FervorID = 82726
+    local BestialWrathID = 19574
+    local SerpentStingID = 1978
+    local ArcaneShotID = 3044
+    local CobraShotID = 77767
+    local HuntersMarkID = 1130
+    local ReadinessID = 23989
+    local AMurderOfCrowsID = 131894
+    local BlinkStrikeID = 130392
+    local LynxRushID = 120697
+    local GlaiveTossID = 117050
+    local PowershotID = 109259
+    local BarrageID = 120360
+    local StampedeID = 121818
+    local FrenzyID = 19615
 
-	local focus = UnitPower("player")
+    local focus = UnitPower("player")
 
     --Cooldowns
-    local kill_command_cooldown = LibSkeenCore:GetCooldown(KillCommandID)   --"Kill Command"
-    local kill_shot_cooldown    = LibSkeenCore:GetCooldown(KillShotID)      --"Kill Shot"
-    local rapid_fire_cooldown   = LibSkeenCore:GetCooldown(RapidFireID)     --"Rapid Fire"
-    local focus_fire_cooldown   = LibSkeenCore:GetCooldown(FocusFireID)     --"Focus Fire"
-    local fervor_cooldown       = LibSkeenCore:GetCooldown(FervorID)        --"Fervor"
-    local bestial_wrath_cooldown= LibSkeenCore:GetCooldown(BestialWrathID)  --"Bestial Wrath"
-    local Readiness_cooldown    = LibSkeenCore:GetCooldown(ReadinessID)
+    local kill_command_cooldown = LibSkeenCore:GetCooldown(KillCommandID) --"Kill Command"
+    local kill_shot_cooldown = LibSkeenCore:GetCooldown(KillShotID) --"Kill Shot"
+    local rapid_fire_cooldown = LibSkeenCore:GetCooldown(RapidFireID) --"Rapid Fire"
+    local focus_fire_cooldown = LibSkeenCore:GetCooldown(FocusFireID) --"Focus Fire"
+    local fervor_cooldown = LibSkeenCore:GetCooldown(FervorID) --"Fervor"
+    local bestial_wrath_cooldown = LibSkeenCore:GetCooldown(BestialWrathID) --"Bestial Wrath"
+    local Readiness_cooldown = LibSkeenCore:GetCooldown(ReadinessID) --"Readiness"
+    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 glaive_toss_cooldown = LibSkeenCore:GetCooldown(GlaiveTossID) --"Glaive Toss"
+    local powershot_cooldown = LibSkeenCore:GetCooldown(PowershotID) --"Powershot"
+    local barrage_cooldown = LibSkeenCore:GetCooldown(BarrageID) --"Barrage"
+    local stampede_cooldown = LibSkeenCore:GetCooldown(StampedeID) --"Stampede"
 
     --Debuff
     local serpent_sting_duration = LibSkeenCore:GetDebuffDuration(SerpentStingID) --"Serpent Sting"
-    local HuntersMark_duration = LibSkeenCore:GetDebuffDuration(HuntersMarkID)
+    local HuntersMark_duration = LibSkeenCore:GetDebuffDuration(HuntersMarkID) --"Hunters Mark"
+
+    --BuffStacks
+    local frenzy_stacks = LibSkeenCore:GetBuffCount(FrenzyID)
 
     -- Get the target's health percentage
-	local TargetsPercentOfHealth = (UnitHealth("target") / UnitHealthMax("target") * 100);
+    local TargetsPercentOfHealth = (UnitHealth("target") / UnitHealthMax("target") * 100);
 
     if(HuntersMark_duration < 1) then
         spell.current = HuntersMarkID
     elseif (serpent_sting_duration < 1) then
         if (focus >= 25) then
-            spell.current = SerpentStingID --SS;
+            spell.current = SerpentStingID
         else
-            spell.next = SerpentStingID --SS;
+            spell.next = SerpentStingID
         end
+    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 --KC
+            spell.current = KillCommandID
         else
-             spell.next = KillCommandID --KC
+            spell.next = KillCommandID
         end
     elseif ((TargetsPercentOfHealth < 20) and (kill_shot_cooldown<1)) then
-        spell.current = KillShotID --Kill Shot
-    --TODO: FOCUS FIRE
+        spell.current = KillShotID
     elseif (focus >= 60) then
-        spell.current = ArcaneShotID --Arcane Shot
+        spell.current = ArcaneShotID
     else
-        spell.current = CobraShotID --Cobra Shot
+        spell.current = CobraShotID
     end
-    
-	if (rapid_fire_cooldown < 1) then
-		spell.cd1 = RapidFireID --Rapid fire
-	end
-	
-	if (focus_fire_cooldown < 1) then
-		spell.cd2 = FocusFireID --Focus fire
-	end
-	
+
+    if (rapid_fire_cooldown < 1) then
+        spell.cd1 = RapidFireID
+    end
+
+    if (stampede_cooldown < 1) then
+        spell.cd2 = StampedeID
+    end
+
     if (Readiness_cooldown < 1) then
-		spell.cd3 = ReadinessID --Readiness
-	end
-	
-	if (bestial_wrath_cooldown < 1) then
-		spell.cd4 = BestialWrathID --Bestial Wrath
-	end
+        spell.cd3 = ReadinessID
+    end
+
+    if (bestial_wrath_cooldown < 1) then
+        spell.cd4 = BestialWrathID
+    end
 
     return spell
 end
@@ -96,9 +147,8 @@
 SkeenPlugin.Name = "Hunter: Beast Mastery"
 SkeenPlugin.Class = "HUNTER"
 SkeenPlugin.Spec = 1
-SkeenPlugin.Version = "4.3.0"
+SkeenPlugin.Version = "5.2.0"
 SkeenPlugin.Rotation = Rotation
 
 local SkeenCore3 = _G["SkeenCore3"]
 SkeenCore3:RegisterPlugin(SkeenPlugin)
-
--- a/SkeenCore3BeastMasteryHunter.toc	Thu Sep 06 21:56:39 2012 +0200
+++ b/SkeenCore3BeastMasteryHunter.toc	Sat Apr 27 19:49:49 2013 +0200
@@ -1,7 +1,7 @@
 ## Title: |cffffd200Skeen|r|cff69ccf0Core3|rBeastMasteryHunter
-## Version: 1.4.5
+## Version: 1.5.0
 ## Author: Skeen
-## Interface: 50001
+## Interface: 50200
 ## Dependencies: SkeenCore3
 ## RequiredDeps: SkeenCore3
 ## SavedVariables: SkeenBeastMasteryHunterdb