/trunk
local addon = CreateFrame('Button', 'pRogue', TradeFrame, 'SecureActionButtonTemplate, UIPanelButtonTemplate') |
local function GetChannel() |
local channel = GetNumRaidMembers() > 0 and 'RAID' or GetNumPartyMembers() > 0 and 'PARTY' or 'SAY' |
local channel = GetNumRaidMembers() > 0 and 'RAID' or GetNumPartyMembers() > 0 and 'PARTY' |
return channel |
end |
return false |
end |
function addon.PLAYER_LOGIN(self) |
function addon:PLAYER_LOGIN() |
self:SetHeight(22) |
self:SetWidth(85) |
self:RegisterForClicks('AnyUp') |
self:SetAttribute('spell', 'Pick Lock') |
self:SetPoint('RIGHT', TradeFrameTradeButton, 'LEFT', -2, 1) |
self:SetText('Unlock') |
self:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED') |
end |
function addon.COMBAT_LOG_EVENT_UNFILTERED(self, stamp, event, sGUID, sName, sFlags, dGUID, dName, dFlags, spellId) |
if(not InBattleGround()) then |
function addon:COMBAT_LOG_EVENT_UNFILTERED(stamp, event, sGUID, sName, sFlags, dGUID, dName, dFlags, spellId) |
if(not InBattleGround() and (GetNumPartyMembers() > 0 or GetNumRaidMembers() > 0)) then |
if(event == 'SPELL_CAST_SUCCESS') then |
if(sGUID == UnitGUID('player')) then |
if(spellId == 11297) then |
end |
addon:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end) |
addon:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED') |
addon:RegisterEvent('PLAYER_LOGIN') |