WoWInterface SVN pRogue

Compare Revisions

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

Rev 6 → Rev 7

pRogue/pRogue.lua
1,35 → 1,30
if(select(2, UnitClass'player') ~= 'ROGUE') then return end
 
local function OnEvent()
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 addon = CreateFrame('Frame')
 
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)
function addon.PLAYER_LOGIN()
local button = CreateFrame('Button', 'pRogueUnlockButton', TradeFrame, 'SecureActionButtonTemplate, UIPanelButtonTemplate')
button:SetHeight(22)
button:SetWidth(85)
button:RegisterForClicks('AnyUp')
button:SetAttribute('type', 'spell')
button:SetAttribute('spell', 'Pick Lock')
button:SetPoint('RIGHT', TradeFrameTradeButton, 'LEFT', -2, 1)
button:SetText('Unlock')
end
 
local ttext = trade:CreateFontString(nil, 'OVERLAY')
ttext:SetParent(trade)
ttext:SetFontObject(GameFontNormal)
ttext:SetPoint('CENTER')
ttext:SetText('Pick Lock')
function addon.COMBAT_LOG_EVENT_UNFILTERED(stamp, event, sGUID, sName, sFlags, dGUID, dName, dFlags, spellId)
if(event == 'SPELL_CAST_SUCCESS') then
if(sGUID == UnitGUID('player')) then
if(spellId == 11297) then
SendChatMessage(format("- %s is now sapped -", dName), (GetNumRaidMembers() > 0) and 'RAID' or (GetNumPartyMembers() > 0) and 'PARTY' or 'SAY')
elseif(spellId == 2094) then
SendChatMessage(format("- %s is now blinded -", dName), (GetNumRaidMembers() > 0) and 'RAID' or (GetNumPartyMembers() > 0) and 'PARTY' or 'SAY')
end
end
end
end
 
local addon = CreateFrame('Frame', 'pRogue')
addon:SetScript('OnEvent', OnEvent)
addon:SetScript('OnEvent', function(self, event, ...) self[event](...) end)
addon:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED')
addon:RegisterEvent('PLAYER_LOGIN')
\ No newline at end of file