Skip to content

Instantly share code, notes, and snippets.

local function GetValidChannel(num)
local i = 0
while true do
i = i + 1
if i > 10 then return end
num = num + 1
if num > 10 then
num = 1
end
if select(2, GetChannelName(i)) then
for i=1,4 do
local party = 'PartyMemberFrame'..i
local frame = _G[party]
frame:UnregisterAllEvents()
frame.Show = function() end
frame:Hide()
_G[party..'HealthBar']:UnregisterAllEvents()
_G[party..'ManaBar']:UnregisterAllEvents()
local function isLeader(u)
return ((UnitInParty(u) or UnitInRaid(u)) and UnitIsPartyLeader(u))
end
local function isMasterLoot(u)
local method, party, raid = GetLootMethod()
local unit
if method == 'master' then
if party then
unit = party == 0 and 'player' or 'party' .. party
local function onLeave(self)
self:SetAlpha(0)
end
local function onEnter(self)
self:SetAlpha(1)
end
local function hook(self)
self:SetScript('OnEnter', onEnter)
self:SetScript('OnLeave', onLeave)
local ccp = {
[1] = '|cffffffff1|r',
[2] = '|cffffffff2|r',
[3] = '|cffffffff3|r',
[4] = '|cffffd8194|r',
[5] = '|cffff00005|r',
}
oUF.Tags['[leafcp]'] = function(u)
local cp = GetComboPoints(PlayerFrame.unit, 'target')
return ccp[cp]
{
["(.*)\232\135\170\229\139\149\230\148\190\230\163\132:(.+)\239\188\140\229\155\160\231\130\186"] = "pass",
["(.*)\230\148\190\230\163\132\228\186\134:(.+)"] = "pass",
["(.*)\233\129\184\230\147\135\228\186\134\232\178\170\229\169\170\229\132\170\229\133\136:(.+)"] = "greed",
["(.*)\233\129\184\230\147\135\228\186\134\233\156\128\230\177\130\229\132\170\229\133\136:(.+)"] = "need",
["(.*)\233\129\184\230\147\135\229\136\134\232\167\163:(.+)"] = "disenchant",
}
function oUF:SpawnHeader(overrideName, template, visibility, ...)
.....
if header:GetAttribute'showParty' then
oUF:DisableBlizzard'party'
end
return header
-- yleaf (yaroot@gmail.com)
local BUFFS_PER_ROW = 12
local BUFF_MAX_DISPLAY = 32
local DEBUFF_MAX_DISPLAY = 16
local ROW_SPACING = 15
local SPACING = 5
local ICON_SIZE = 30
local COUNT_FONT = {STANDARD_TEXT_FONT, 12, 'OUTLINE'}
local DURATION_FONT = {STANDARD_TEXT_FONT, 13}
function twitter_url_shorten_callback($match) {
if (preg_match('#http://www.flickr.com/photos/[^/]+/(\d+)/#', $match[0], $matches)) {
return 'http://flic.kr/p/'.flickr_encode($matches[1]);
}
/*
if (!defined('BITLY_API_KEY')) return $match[0];
$request = 'http://api.bit.ly/shorten?version=2.0.1&longUrl='.urlencode($match[0]).'&login='.BITLY_LOGIN.'&apiKey='.BITLY_API_KEY;
$json = json_decode(twitter_fetch($request));
if ($json->errorCode == 0) {
$results = (array) $json->results;
-- yleaf (yaroot@gmail.com)
local BOE_Only = false
local defaultPrice = 99*1e4
local dePrice = {
--[[
0 = Poor
1 = Common
2 = Uncommon