/
if(select(2, UnitClass"player") ~= "ROGUE") then return end |
if(select(2, UnitClass'player') ~= 'ROGUE') then return end |
local showSnD = true |
local showRupture = true |
local function OnEvent() |
-- Merchantframe Poisons Button |
local merchant = CreateFrame('Button', 'pRogueMerchantButton', MerchantFrame, 'SecureActionButtonTemplate, UIPanelButtonTemplate') |
merchant:SetHeight(18) |
merchant:SetWidth(170) |
merchant:RegisterForClicks('AnyUp') |
merchant:SetAttribute('type*', 'spell') |
merchant:SetAttribute('spell', 'Poisons') |
merchant:SetPoint('BOTTOMLEFT', MerchantFrame, 'BOTTOMLEFT', 14, 66) |
local mtext = merchant:CreateFontString(nil, 'OVERLAY') |
mtext:SetParent(merchant) |
mtext:SetFontObject(GameFontNormal) |
mtext:SetPoint('CENTER') |
mtext:SetText('Open Poisons') |
local function CreateUpdatedTexture(size, id, y) |
local spellName, spellRank, spellTexture = GetSpellInfo(id) |
-- Tradeframe Picklock Button |
local trade = CreateFrame('Button', 'pRogueTradeButton', TradeFrame, 'SecureActionButtonTemplate, UIPanelButtonTemplate') |
trade:SetHeight(22) |
trade:SetWidth(170) |
trade:RegisterForClicks('AnyUp') |
trade:SetAttribute('type*', 'spell') |
trade:SetAttribute('spell*', 'Pick Lock') |
trade:SetPoint('BOTTOMLEFT', TradeFrame, 'BOTTOMLEFT', 14, 56) |
local ttext = trade:CreateFontString(nil, 'OVERLAY') |
ttext:SetParent(trade) |
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, - y) |
frame:SetHeight(size) |
frame:SetWidth(size) |
frame:SetPoint('CENTER', 0, -180) |
frame:SetHeight(40) |
frame:SetWidth(40) |
frame:SetAlpha(0) |
local texture = frame:CreateTexture(nil, 'ARTWORK') |
local background = frame:CreateTexture(nil, 'BACKGROUND') |
background:SetTexture(1.0, 1.0, 1.0, 0.8) |
background:SetHeight(size + 2) |
background:SetWidth(size + 2) |
background:SetHeight(frame:GetHeight() + 2) |
background:SetWidth(frame:GetWidth() + 2) |
background:SetPoint('CENTER') |
local number = frame:CreateFontString(nil, 'OVERLAY') |
total = total + al |
if(total > 0.25) then |
for i = 1, 40 do |
local buffName, _, _, _, _, buffTime = UnitBuff('player', i) |
local buffName, _, _, _, _, _, buffTime = UnitDebuff('target', i) |
if(buffName == spellName) then |
if(buffTime ~= nil) then |
frame:SetAlpha(1) |
end |
end) |
end |
local function OnEvent() |
-- Merchantframe Poisons Button |
local merchant = CreateFrame("Button", nil, MerchantFrame, "SecureActionButtonTemplate, UIPanelButtonTemplate") |
merchant:SetHeight(18) |
merchant:SetWidth(170) |
merchant:RegisterForClicks("AnyUp") |
merchant:SetAttribute("type*", "spell") |
merchant:SetAttribute("spell", "Poisons") |
merchant:SetPoint("BOTTOMLEFT", MerchantFrame, "BOTTOMLEFT", 14, 66) |
local mtext = merchant:CreateFontString(nil, "OVERLAY") |
mtext:SetParent(merchant) |
mtext:SetFontObject(GameFontNormal) |
mtext:SetPoint("CENTER") |
mtext:SetText("Open Poisons") |
-- Tradeframe Picklock Button |
local trade = CreateFrame("Button", nil, TradeFrame, "SecureActionButtonTemplate, UIPanelButtonTemplate") |
trade:SetHeight(22) |
trade:SetWidth(170) |
trade:RegisterForClicks("AnyUp") |
trade:SetAttribute("type*", "spell") |
trade:SetAttribute("spell*", "Pick Lock") |
trade:SetPoint("BOTTOMLEFT", TradeFrame, "BOTTOMLEFT", 14, 56) |
local ttext = trade:CreateFontString(nil, "OVERLAY") |
ttext:SetParent(trade) |
ttext:SetFontObject(GameFontNormal) |
ttext:SetPoint("CENTER") |
ttext:SetText("Pick Lock") |
-- Timers |
if(showSnD) then |
CreateUpdatedTexture(40, 6774, 180) |
end |
if(showRupture) then |
CreateUpdatedTexture(40, 26867, 260) |
end |
end |
local addon = CreateFrame("Frame", "pRogue") |
addon:SetScript("OnEvent", OnEvent) |
addon:RegisterEvent("PLAYER_LOGIN") |