WoWInterface SVN pRogue

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 5 to Rev 6
    Reverse comparison

Rev 5 → Rev 6

pRogue/pRogue.lua
1,7 → 1,6
if(select(2, UnitClass'player') ~= 'ROGUE') then return end
 
local function OnEvent()
-- Merchantframe Poisons Button
local merchant = CreateFrame('Button', 'pRogueMerchantButton', MerchantFrame, 'SecureActionButtonTemplate, UIPanelButtonTemplate')
merchant:SetHeight(18)
merchant:SetWidth(170)
16,7 → 15,6
mtext:SetPoint('CENTER')
mtext:SetText('Open Poisons')
 
-- Tradeframe Picklock Button
local trade = CreateFrame('Button', 'pRogueTradeButton', TradeFrame, 'SecureActionButtonTemplate, UIPanelButtonTemplate')
trade:SetHeight(22)
trade:SetWidth(170)
30,51 → 28,6
ttext:SetFontObject(GameFontNormal)
ttext:SetPoint('CENTER')
ttext:SetText('Pick Lock')
 
-- SnD Timer
local spellName, spellRank, spellTexture = GetSpellInfo(6774)
local frame = CreateFrame('Frame', nil, UIParent)
frame:SetFrameStrata('BACKGROUND')
frame:SetPoint('CENTER', 0, -180)
frame:SetHeight(40)
frame:SetWidth(40)
frame:SetAlpha(0)
 
local texture = frame:CreateTexture(nil, 'ARTWORK')
texture:SetTexture(spellTexture)
texture:SetTexCoord(0.1, 0.9, 0.1, 0.9)
texture:SetAllPoints(frame)
 
local background = frame:CreateTexture(nil, 'BACKGROUND')
background:SetTexture(1.0, 1.0, 1.0, 0.8)
background:SetHeight(frame:GetHeight() + 2)
background:SetWidth(frame:GetWidth() + 2)
background:SetPoint('CENTER')
 
local number = frame:CreateFontString(nil, 'OVERLAY')
number:SetFont('Fonts\\FRIZQT__.TTF', 24, 'OUTLINE')
number:SetPoint('CENTER')
number:SetText()
 
local total = 0
frame:SetScript('OnUpdate', function(self, al)
total = total + al
if(total > 0.25) then
for i = 1, 40 do
local buffName, _, _, _, _, _, buffTime = UnitDebuff('target', i)
if(buffName == spellName) then
if(buffTime ~= nil) then
frame:SetAlpha(1)
number:SetText(floor(buffTime))
end
if(number:GetText() == '0') then
frame:SetAlpha(0)
end
end
end
total = 0
end
end)
end
 
local addon = CreateFrame('Frame', 'pRogue')