changeset 3:629e6e84fd18 v1.2.0

Ready 4 multi lang
author Emil Madsen <skeen@cs.au.dk>
date Fri, 08 Jul 2011 00:02:44 +0200
parents 1350c4dc9631
children 9f81a94993b7
files SkeenCore3BeastMasteryHunter.lua SkeenCore3BeastMasteryHunter.toc SkeenCoreLib.lua
diffstat 3 files changed, 17 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/SkeenCore3BeastMasteryHunter.lua	Thu Jun 30 18:45:45 2011 +0200
+++ b/SkeenCore3BeastMasteryHunter.lua	Fri Jul 08 00:02:44 2011 +0200
@@ -22,15 +22,15 @@
 	local focus = UnitPower("player")
 
     --Cooldowns
-    local kill_command_cooldown = GetCooldown("Kill Command")
-    local kill_shot_cooldown = GetCooldown("Kill Shot")
-    local rapid_fire_cooldown = GetCooldown("Rapid Fire")
-    local focus_fire_cooldown = GetCooldown("Focus Fire")
-    local fervor_cooldown = GetCooldown("Fervor")
-    local bestial_wrath_cooldown = GetCooldown("Bestial Wrath")
+    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"
     
     --Debuff
-    local serpent_sting_duration = GetDebuffDuration("Serpent Sting")
+    local serpent_sting_duration = GetDebuffDuration(1978) --"Serpent Sting"
 
     -- Get the target's health percentage
 	local TargetsPercentOfHealth = (UnitHealth("target") / UnitHealthMax("target") * 100);
--- a/SkeenCore3BeastMasteryHunter.toc	Thu Jun 30 18:45:45 2011 +0200
+++ b/SkeenCore3BeastMasteryHunter.toc	Fri Jul 08 00:02:44 2011 +0200
@@ -1,7 +1,7 @@
 ## Title: |cffffd200Skeen|r|cff69ccf0Core3|rBeastMasteryHunter
-## Version: 1.0.1
+## Version: 1.2.0
 ## Author: Skeen
-## Interface: 40000
+## Interface: 40200
 ## Dependencies: SkeenCore3
 ## RequiredDeps: SkeenCore3
 ## SavedVariables: SkeenBeastMasteryHunterdb
--- a/SkeenCoreLib.lua	Thu Jun 30 18:45:45 2011 +0200
+++ b/SkeenCoreLib.lua	Fri Jul 08 00:02:44 2011 +0200
@@ -1,5 +1,6 @@
-function GetDebuffDuration(name)
-	local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitDebuff("target", name)
+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())
@@ -8,8 +9,9 @@
 	end	
 end
 
-function GetBuffDuration(name)
-	local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff("player", name)
+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())
@@ -18,8 +20,8 @@
 	end
 end
 
-function GetCooldown(name)
-	local start, duration, enabled = GetSpellCooldown(name);
+function GetCooldown(id)
+	local start, duration, enabled = GetSpellCooldown(id);
 	if duration ~= nil then 
 		return (duration + start - GetTime())
 	else