comparison SkeenCore3BeastMasteryHunter.lua @ 21:39f3f0dbf42e v1.5.2

Update to new cooldown system
author Emil Madsen <skeen@cs.au.dk>
date Wed, 08 May 2013 00:08:19 +0200
parents d268dd3509fa
children a03c3c813e3e
comparison
equal deleted inserted replaced
20:a17e3bf11a54 21:39f3f0dbf42e
1 -- 1 --
2 -- SkeenCore3BeastMasteryHunter 2 -- SkeenCore3BeastMasteryHunter
3 -- 3 --
4 local LibSkeenCore = LibStub("LibSkeenCore"); 4 local LibSkeenCore = LibStub("LibSkeenCore");
5
6 local function Cooldowns()
7
8 -- Ability SpellID
9 local RapidFireID = 3045
10 local StampedeID = 121818
11 local ReadinessID = 23989
12 local BestialWrathID = 19574
13
14 return {RapidFireID, StampedeID, ReadinessID, BestialWrathID}
15 end
5 16
6 local function Rotation() 17 local function Rotation()
7 18
8 -- Hide the frame, if the target is dead, non existing or friendly. 19 -- Hide the frame, if the target is dead, non existing or friendly.
9 if UnitName("target") == nil or UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0 then 20 if UnitName("target") == nil or UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0 then
29 spell.cd4 = nil 40 spell.cd4 = nil
30 41
31 -- Ability SpellID 42 -- Ability SpellID
32 local KillCommandID = 34026 43 local KillCommandID = 34026
33 local KillShotID = 53351 44 local KillShotID = 53351
34 local RapidFireID = 3045
35 local FocusFireID = 82692 45 local FocusFireID = 82692
36 local FervorID = 82726 46 local FervorID = 82726
37 local BestialWrathID = 19574
38 local SerpentStingID = 1978 47 local SerpentStingID = 1978
39 local ArcaneShotID = 3044 48 local ArcaneShotID = 3044
40 local CobraShotID = 77767 49 local CobraShotID = 77767
41 local HuntersMarkID = 1130 50 local HuntersMarkID = 1130
42 local ReadinessID = 23989
43 local AMurderOfCrowsID = 131894 51 local AMurderOfCrowsID = 131894
44 local BlinkStrikeID = 130392 52 local BlinkStrikeID = 130392
45 local LynxRushID = 120697 53 local LynxRushID = 120697
46 local GlaiveTossID = 117050 54 local GlaiveTossID = 117050
47 local PowershotID = 109259 55 local PowershotID = 109259
48 local BarrageID = 120360 56 local BarrageID = 120360
49 local StampedeID = 121818
50 local FrenzyID = 19615 57 local FrenzyID = 19615
51 58
52 local focus = UnitPower("player") 59 local focus = UnitPower("player")
53 60
54 --Cooldowns 61 --Cooldowns
55 local kill_command_cooldown = LibSkeenCore:GetCooldown(KillCommandID) --"Kill Command" 62 local kill_command_cooldown = LibSkeenCore:GetCooldown(KillCommandID) --"Kill Command"
56 local kill_shot_cooldown = LibSkeenCore:GetCooldown(KillShotID) --"Kill Shot" 63 local kill_shot_cooldown = LibSkeenCore:GetCooldown(KillShotID) --"Kill Shot"
57 local rapid_fire_cooldown = LibSkeenCore:GetCooldown(RapidFireID) --"Rapid Fire"
58 local focus_fire_cooldown = LibSkeenCore:GetCooldown(FocusFireID) --"Focus Fire" 64 local focus_fire_cooldown = LibSkeenCore:GetCooldown(FocusFireID) --"Focus Fire"
59 local fervor_cooldown = LibSkeenCore:GetCooldown(FervorID) --"Fervor" 65 local fervor_cooldown = LibSkeenCore:GetCooldown(FervorID) --"Fervor"
60 local bestial_wrath_cooldown = LibSkeenCore:GetCooldown(BestialWrathID) --"Bestial Wrath"
61 local Readiness_cooldown = LibSkeenCore:GetCooldown(ReadinessID) --"Readiness"
62 local a_murder_of_crows_cooldown = LibSkeenCore:GetCooldown(AMurderOfCrowsID) --"A Murder of Crows" 66 local a_murder_of_crows_cooldown = LibSkeenCore:GetCooldown(AMurderOfCrowsID) --"A Murder of Crows"
63 local blink_strike_cooldown = LibSkeenCore:GetCooldown(BlinkStrikeID) --"Blink Strike" 67 local blink_strike_cooldown = LibSkeenCore:GetCooldown(BlinkStrikeID) --"Blink Strike"
64 local lynx_rush_cooldown = LibSkeenCore:GetCooldown(LynxRushID) --"Lynx Rush" 68 local lynx_rush_cooldown = LibSkeenCore:GetCooldown(LynxRushID) --"Lynx Rush"
65 local glaive_toss_cooldown = LibSkeenCore:GetCooldown(GlaiveTossID) --"Glaive Toss" 69 local glaive_toss_cooldown = LibSkeenCore:GetCooldown(GlaiveTossID) --"Glaive Toss"
66 local powershot_cooldown = LibSkeenCore:GetCooldown(PowershotID) --"Powershot" 70 local powershot_cooldown = LibSkeenCore:GetCooldown(PowershotID) --"Powershot"
67 local barrage_cooldown = LibSkeenCore:GetCooldown(BarrageID) --"Barrage" 71 local barrage_cooldown = LibSkeenCore:GetCooldown(BarrageID) --"Barrage"
68 local stampede_cooldown = LibSkeenCore:GetCooldown(StampedeID) --"Stampede"
69 72
70 --Debuff 73 --Debuff
71 local serpent_sting_duration = LibSkeenCore:GetDebuffDuration(SerpentStingID) --"Serpent Sting" 74 local serpent_sting_duration = LibSkeenCore:GetDebuffDuration(SerpentStingID) --"Serpent Sting"
72 local HuntersMark_duration = LibSkeenCore:GetDebuffDuration(HuntersMarkID) --"Hunters Mark" 75 local HuntersMark_duration = LibSkeenCore:GetDebuffDuration(HuntersMarkID) --"Hunters Mark"
73 76
111 spell.current = ArcaneShotID 114 spell.current = ArcaneShotID
112 else 115 else
113 spell.current = CobraShotID 116 spell.current = CobraShotID
114 end 117 end
115 118
116 if (rapid_fire_cooldown < 1) then
117 spell.cd1 = RapidFireID
118 end
119
120 if (stampede_cooldown < 1) then
121 spell.cd2 = StampedeID
122 end
123
124 if (Readiness_cooldown < 1) then
125 spell.cd3 = ReadinessID
126 end
127
128 if (bestial_wrath_cooldown < 1) then
129 spell.cd4 = BestialWrathID
130 end
131
132 return spell 119 return spell
133 end 120 end
134 121
135 local SkeenPlugin = {} 122 local SkeenPlugin = {}
136 SkeenPlugin.Name = "Hunter: Beast Mastery" 123 SkeenPlugin.Name = "Hunter: Beast Mastery"
137 SkeenPlugin.Class = "HUNTER" 124 SkeenPlugin.Class = "HUNTER"
138 SkeenPlugin.Spec = 1 125 SkeenPlugin.Spec = 1
139 SkeenPlugin.Version = "5.2.0" 126 SkeenPlugin.Version = "5.2.0"
140 SkeenPlugin.Rotation = Rotation 127 SkeenPlugin.Rotation = Rotation
128 SkeenPlugin.Cooldowns = Cooldowns
141 129
142 local SkeenCore3 = _G["SkeenCore3"] 130 local SkeenCore3 = _G["SkeenCore3"]
143 SkeenCore3:RegisterPlugin(SkeenPlugin) 131 SkeenCore3:RegisterPlugin(SkeenPlugin)