Skip to content

Instantly share code, notes, and snippets.

local ADDON_NAME, ns = ...
local oUF = ns.oUF or oUF
local _Objects = {}
-- /ouftest
-- simulate a gui slider..
local scale, size, loop = 1, 32, 0
local timer = 0
local Update = function(self, elapsed)
oUF.Tags['afkdnd'] = function(unit)
if(UnitIsAFK(unit)) then
return CHAT_FLAG_AFK
elseif(UnitIsDND(unit)) then
return CHAT_FLAG_DND
end
end
oUF.TagEvents['afkdnd'] = 'PLAYER_FLAGS_CHANGED'
@@ -41,16 +41,18 @@
end
local function Unbeneficial(self, unit)
+ if UnitHasVehicleUI('player') then
+ return true
+ end
+
if(unit == 'player') then
if(UnitLevel(unit) == MAX_PLAYER_LEVEL) then
@freebaser
freebaser / pet.lua
Created November 18, 2010 23:24
testing pet template bug
local ADDON_NAME, ns = ...
local oUF = ns.oUF or oUF
local OnEnter = function(self)
UnitFrame_OnEnter(self)
end
local OnLeave = function(self)
UnitFrame_OnLeave(self)
end
--- 855fb4 freebaser 2 minutes ago core.lua
+++ f3490f freebaser just now core.lua
@@ -126,25 +126,11 @@
local self = power.__owner
if ptype == 'MANA' then
- if(ns.db.orientation == "VERTICAL")then
- power:SetPoint"TOP"
- power:SetWidth(ns.db.width*ns.db.powerbarsize)
- self.Health:SetWidth((0.98 - ns.db.powerbarsize)*ns.db.width)
local UnitSpecific = {
player = function(self)
-- Player specific layout code.
end,
party = function(self)
-- Party specific layout code.
end,
}
self.CPoints = CreateFrame("Frame", nil, self)
for index = 1, MAX_COMBO_POINTS do
-- Set texture and size
local CPoint = self:CreateTexture(nil, 'OVERLAY')
CPoint:SetSize(8, 8)
CPoint:SetTexture('Interface\\ComboFrame\\ComboPoint')
CPoint:SetTexCoord(0, 0.375, 0, 1)
-- Set positions
-- Position and size
local Health = CreateFrame("StatusBar", nil, self)
Health:SetHeight(20)
Health:SetPoint('TOP')
Health:SetPoint('LEFT')
Health:SetPoint('RIGHT')
-- Options
Health.frequentUpdates = true
Health.colorTapping = true