WoWInterface SVN CoolLine

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 27 to Rev 28
    Reverse comparison

Rev 27 → Rev 28

trunk/CoolLine/CoolLine.toc
2,7 → 2,7
## Title: CoolLine
## Notes: Shows cooldowns on a single bar.
## Author: TotalPackage
## Version: 4.3.001
## Version: 4.3.002
 
## SavedVariables: CoolLineDB
## SavedVariablesPerCharacter: CoolLineCharDB
trunk/CoolLine/core.lua
12,14 → 12,15
local random = math.random
local strmatch = strmatch
local UnitExists, HasPetUI = UnitExists, HasPetUI
local GetSpellInfo = GetSpellInfo
 
local db, block
local backdrop = { edgeSize=16, }
local section, iconsize = 0, 0
local tick0, tick1, tick10, tick30, tick60, tick120, tick300
local tick0, tick1, tick3, tick10, tick30, tick120, tick300
local BOOKTYPE_SPELL, BOOKTYPE_PET = BOOKTYPE_SPELL, BOOKTYPE_PET
local spells = { [BOOKTYPE_SPELL] = { }, [BOOKTYPE_PET] = { }, }
local frames, cooldowns = { }, { }
local frames, cooldowns, specialspells = { }, { }, { }
 
local SetValue, updatelook, createfs, ShowOptions, RuneCheck
local function SetValueH(this, v, just)
98,6 → 99,17
end
end
end
if select(2, UnitClass("player")) == "PRIEST" then
specialspells = {
[GetSpellInfo(87151) or "blah"] = 87151, -- Archangel
[GetSpellInfo(14751) or "blah"] = 14751, -- Chakra
[GetSpellInfo(81209) or "blah"] = 81209, -- Chakra
[GetSpellInfo(88684) or "blah"] = 88684, -- Holy Word: Serenity
[GetSpellInfo(88682) or "blah"] = 88682, -- Holy Word: Aspire
[GetSpellInfo(88685) or "blah"] = 88685, -- Holy Word: Sanctuary
[GetSpellInfo(88625) or "blah"] = 88625 -- Holy Word: Chastise
}
end
 
SlashCmdList.COOLLINE = ShowOptions
SLASH_COOLLINE1 = "/coolline"
194,9 → 206,9
 
tick0 = createfs(tick0, "0", 0, "LEFT")
tick1 = createfs(tick1, "1", section)
tick10 = createfs(tick10, "3", section * 2)
tick30 = createfs(tick30, "10", section * 3)
tick60 = createfs(tick60, "60", section * 4)
tick3 = createfs(tick3, "3", section * 2)
tick10 = createfs(tick10, "10", section * 3)
tick30 = createfs(tick30, "30", section * 4)
tick120 = createfs(tick120, "2m", section * 5)
tick300 = createfs(tick300, "6m", section * 6, "RIGHT")
 
333,13 → 345,13
ClearCooldown(frame)
end
elseif remain < 10 then
SetupIcon(frame, section * (remain + 11) * 0.143, remain > 4 and 0.05 or 0.02, true, dofl) -- 2 + (remain - 3) / 7
elseif remain < 60 then
SetupIcon(frame, section * (remain + 140) * 0.02, 0.12, true, dofl) -- 3 + (remain - 10) / 50
SetupIcon(frame, section * (remain + 11) * 0.14286, remain > 4 and 0.05 or 0.02, true, dofl) -- 2 + (remain - 3) / 7
elseif remain < 30 then
SetupIcon(frame, section * (remain + 50) * 0.05, 0.09, true, dofl) -- 3 + (remain - 10) / 20
elseif remain < 120 then
SetupIcon(frame, section * (remain + 180) * 0.01666, 0.25, true, dofl) -- 4 + (remain - 60) / 60
SetupIcon(frame, section * (remain + 330) * 0.011111, 0.21, true, dofl) -- 4 + (remain - 30) / 90
elseif remain < 360 then
SetupIcon(frame, section * (remain + 1080) * 0.004166, 1.2, true, dofl) -- 5 + (remain - 120) / 240
SetupIcon(frame, section * (remain + 1080) * 0.0041667, 1.2, true, dofl) -- 5 + (remain - 120) / 240
frame:SetAlpha(1)
else
SetupIcon(frame, 6 * section, 2, false, dofl)
390,10 → 402,6
local CLTip = CreateFrame("GameTooltip", "CLTip", CoolLine, "GameTooltipTemplate")
CLTip:SetOwner(CoolLine, "ANCHOR_NONE")
local GetSpellBookItemName, GetSpellBookItemInfo = GetSpellBookItemName, GetSpellBookItemInfo
local specialspells = {
[GetSpellInfo(87151) or "blah"] = true, -- Archangel
[GetSpellInfo(14751) or "blah"] = "chakra", -- Chakra
}
local cooldown1 = gsub(SPELL_RECAST_TIME_MIN, "%%%.%d[fg]", "(.+)")
local cooldown2 = gsub(SPELL_RECAST_TIME_SEC, "%%%.%d[fg]", "(.+)")
local function CheckRight(rtext)
412,18 → 420,11
local stype, id = GetSpellBookItemInfo(i, btype)
last = name
if sb[name] then
sb[name] = id
elseif specialspells[name] then
sb[name] = id
if specialspells[name] == "chakra" then
sb[GetSpellInfo(88684) or "blah"] = 88684 -- Holy Word: Serenity
sb[GetSpellInfo(88682) or "blah"] = 88682 -- Holy Word: Aspire
sb[GetSpellInfo(88685) or "blah"] = 88685 -- Holy Word: Sanctuary
end
sb[name] = specialspells[name] or id
else
CLTip:SetSpellBookItem(i, btype)
if CheckRight(CLTipTextRight2) or CheckRight(CLTipTextRight3) or CheckRight(CLTipTextRight4) then
sb[name] = id
sb[name] = specialspells[name] or id
end
end
end
467,7 → 468,7
end
spellthrot:SetScript("OnUpdate", function(this, a1)
selap = selap + a1
if selap < 0.33 then return end
if selap < 0.3 then return end
selap = 0
this:Hide()
CheckSpellBook(BOOKTYPE_SPELL)
trunk/CoolLine/libs/LibSharedMedia-3.0/LibStub/LibStub.lua
1,13 → 1,22
-- $Id: LibStub.lua 76 2007-09-03 01:50:17Z mikk $
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
-- LibStub is hereby placed in the Public Domain
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
 
-- Check to see is this version of the stub is obsolete
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
 
-- LibStub:NewLibrary(major, minor)
-- major (string) - the major version of the library
-- minor (string or number ) - the minor version of the library
--
-- returns nil if a newer or same version of the lib is already present
-- returns empty library object or old library object if upgrade is needed
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
18,6 → 27,12
return self.libs[major], oldminor
end
 
-- LibStub:GetLibrary(major, [silent])
-- major (string) - the major version of the library
-- silent (boolean) - if true, library is optional, silently return nil if its not found
--
-- throws an error if the library can not be found (except silent is set)
-- returns the library object if found
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
25,6 → 40,12
return self.libs[major], self.minors[major]
end
 
function LibStub:IterateLibraries() return pairs(self.libs) end
-- LibStub:IterateLibraries()
--
-- Returns an iterator for the currently registered libraries
function LibStub:IterateLibraries()
return pairs(self.libs)
end
 
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
trunk/CoolLine/libs/LibSharedMedia-3.0/lib.xml New file
0,0 → 1,4
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Include file="LibSharedMedia-3.0\lib.xml" />
</Ui>
trunk/CoolLine/libs/LibSharedMedia-3.0/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
1,6 → 1,6
--[[
--[[
Name: LibSharedMedia-3.0
Revision: $Revision: 62 $
Revision: $Revision: 69 $
Author: Elkano (elkano@gmx.de)
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
9,7 → 9,7
License: LGPL v2.1
]]
 
local MAJOR, MINOR = "LibSharedMedia-3.0", 100001 -- increase manualy on changes
local MAJOR, MINOR = "LibSharedMedia-3.0", 4030402 -- increase manualy on changes
local lib = LibStub:NewLibrary(MAJOR, MINOR)
 
if not lib then return end
59,6 → 59,7
-- populate lib with default Blizzard data
-- BACKGROUND
if not lib.MediaTable.background then lib.MediaTable.background = {} end
lib.MediaTable.background["None"] = [[]]
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
71,16 → 72,18
lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]]
lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]]
lib.MediaTable.background["Solid"] = [[Interface\Buttons\WHITE8X8]]
lib.DefaultMedia.background = "None"
 
-- BORDER
if not lib.MediaTable.border then lib.MediaTable.border = {} end
lib.MediaTable.border["None"] = [[Interface\None]]
lib.MediaTable.border["None"] = [[]]
lib.MediaTable.border["Blizzard Achievement Wood"] = [[Interface\AchievementFrame\UI-Achievement-WoodBorder]]
lib.MediaTable.border["Blizzard Chat Bubble"] = [[Interface\Tooltips\ChatBubble-Backdrop]]
lib.MediaTable.border["Blizzard Dialog"] = [[Interface\DialogFrame\UI-DialogBox-Border]]
lib.MediaTable.border["Blizzard Dialog Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Border]]
lib.MediaTable.border["Blizzard Party"] = [[Interface\CHARACTERFRAME\UI-Party-Border]]
lib.MediaTable.border["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Border]]
lib.DefaultMedia.border = "None"
 
-- FONT
if not lib.MediaTable.font then lib.MediaTable.font = {} end
98,9 → 101,9
elseif locale == "zhCN" then
LOCALE_MASK = lib.LOCALE_BIT_zhCN
--
SML_MT_font["伤害数字"] = [[Fonts\ZYKai_C.ttf]]
SML_MT_font["默认"] = [[Fonts\ZYKai_T.ttf]]
SML_MT_font["聊天"] = [[Fonts\ZYHei.ttf]]
SML_MT_font["伤害数字"] = [[Fonts\ARKai_C.ttf]]
SML_MT_font["默认"] = [[Fonts\ARKai_T.ttf]]
SML_MT_font["聊天"] = [[Fonts\ARHei.ttf]]
--
lib.DefaultMedia["font"] = "默认" -- someone from zhCN please adjust if needed
--
186,8 → 189,7
local mtt = mediaTable[mediatype]
local overridekey = overrideMedia[mediatype]
local result = mtt and ((overridekey and mtt[overridekey] or mtt[key]) or (not noDefault and defaultMedia[mediatype] and mtt[defaultMedia[mediatype]])) or nil
 
return result
return result ~= "" and result or nil
end
 
function lib:IsValid(mediatype, key)
trunk/CoolLine/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc New file
0,0 → 1,14
## Interface: 20400
 
## Title: Lib: SharedMedia-3.0
## Notes: Shared handling of media data (fonts, sounds, textures, ...) between addons.
## Version: 3.0
## Author: Elkano
## X-Category: Library
 
## LoadOnDemand: 1
 
LibStub\LibStub.lua
CallbackHandler-1.0\CallbackHandler-1.0.lua
 
lib.xml