# HG changeset patch # User Emil Madsen # Date 1312141938 -7200 # Node ID afd83bc06b1eb13e4ee74e581255cf205c09bf28 # Parent 9f81a94993b7976704df6d115d5b5501d0831e43 Updated to make use of library diff -r 9f81a94993b7 -r afd83bc06b1e .pkgmeta --- 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 + diff -r 9f81a94993b7 -r afd83bc06b1e SkeenCore3BeastMasteryHunter.lua --- 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); diff -r 9f81a94993b7 -r afd83bc06b1e SkeenCore3BeastMasteryHunter.toc --- 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 diff -r 9f81a94993b7 -r afd83bc06b1e SkeenCoreLib.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