changeset 5:afd83bc06b1e v1.3.0

Updated to make use of library
author Emil Madsen <skeen@cs.au.dk>
date Sun, 31 Jul 2011 21:52:18 +0200
parents 9f81a94993b7
children 71256d741c62
files .pkgmeta SkeenCore3BeastMasteryHunter.lua SkeenCore3BeastMasteryHunter.toc SkeenCoreLib.lua
diffstat 4 files changed, 19 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/.pkgmeta	Fri Jul 08 00:02:47 2011 +0200
+++ b/.pkgmeta	Sun Jul 31 21:52:18 2011 +0200
@@ -1,4 +1,11 @@
 package-as: SkeenCore3BeastMasteryHunter 
 
 enable-nolib-creation: no
-        
+
+externals:
+   Libs/LibStub:
+        url: svn://svn.wowace.com/wow/libstub/mainline/trunk
+        tag: latest
+   Libs/LibSkeenCore:
+        url: http://hg.curseforge.net/wow/libskeencore/mainline
+                
--- a/SkeenCore3BeastMasteryHunter.lua	Fri Jul 08 00:02:47 2011 +0200
+++ b/SkeenCore3BeastMasteryHunter.lua	Sun Jul 31 21:52:18 2011 +0200
@@ -1,6 +1,7 @@
 --
 -- SkeenCore3BeastMasteryHunter
 -- 
+local LibSkeenCore = LibStub("LibSkeenCore");
 
 local function Rotation()
 
@@ -22,15 +23,15 @@
 	local focus = UnitPower("player")
 
     --Cooldowns
-    local kill_command_cooldown = GetCooldown(34026) --"Kill Command"
-    local kill_shot_cooldown = GetCooldown(53351) --"Kill Shot"
-    local rapid_fire_cooldown = GetCooldown(3045) --"Rapid Fire"
-    local focus_fire_cooldown = GetCooldown(82692) --"Focus Fire"
-    local fervor_cooldown = GetCooldown(82726) --"Fervor"
-    local bestial_wrath_cooldown = GetCooldown(19574) --"Bestial Wrath"
+    local kill_command_cooldown = LibSkeenCore:GetCooldown(34026) --"Kill Command"
+    local kill_shot_cooldown = LibSkeenCore:GetCooldown(53351) --"Kill Shot"
+    local rapid_fire_cooldown = LibSkeenCore:GetCooldown(3045) --"Rapid Fire"
+    local focus_fire_cooldown = LibSkeenCore:GetCooldown(82692) --"Focus Fire"
+    local fervor_cooldown = LibSkeenCore:GetCooldown(82726) --"Fervor"
+    local bestial_wrath_cooldown = LibSkeenCore:GetCooldown(19574) --"Bestial Wrath"
     
     --Debuff
-    local serpent_sting_duration = GetDebuffDuration(1978) --"Serpent Sting"
+    local serpent_sting_duration = LibSkeenCore:GetDebuffDuration(1978) --"Serpent Sting"
 
     -- Get the target's health percentage
 	local TargetsPercentOfHealth = (UnitHealth("target") / UnitHealthMax("target") * 100);
--- a/SkeenCore3BeastMasteryHunter.toc	Fri Jul 08 00:02:47 2011 +0200
+++ b/SkeenCore3BeastMasteryHunter.toc	Sun Jul 31 21:52:18 2011 +0200
@@ -1,5 +1,5 @@
 ## Title: |cffffd200Skeen|r|cff69ccf0Core3|rBeastMasteryHunter
-## Version: 1.2.0
+## Version: 1.3.0
 ## Author: Skeen
 ## Interface: 40200
 ## Dependencies: SkeenCore3
@@ -11,6 +11,7 @@
 ## X-Child-Of: SkeenCore3
 ## X-Part-Of: SkeenCore3
 
-SkeenCoreLib.lua
+Libs\LibStub\LibStub.lua
+Libs\LibSkeenCore\LibSkeenCore.lua
 SkeenCore3BeastMasteryHunter.lua
 
--- a/SkeenCoreLib.lua	Fri Jul 08 00:02:47 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-function GetDebuffDuration(id)
-    local spell_name = GetSpellInfo(id)
-	local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitDebuff("target", spell_name)
-
-	if name ~= nil and isMine == "player" then
-		return (expirationTime - GetTime())
-	else
-		return 0
-	end	
-end
-
-function GetBuffDuration(id)
-    local spell_name = GetSpellInfo(id)
-	local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff("player", spell_name)
-
-	if name ~= nil then
-		return (expirationTime - GetTime())
-	else
-		return 0
-	end
-end
-
-function GetCooldown(id)
-	local start, duration, enabled = GetSpellCooldown(id);
-	if duration ~= nil then 
-		return (duration + start - GetTime())
-	else
-		return 60
-	end
-end