View Single Post
08-16-10, 11:44 PM   #11
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Toran View Post
Code:
if playerClass == "ROGUE" or playerClass == "DRUID" then
			local CPoints = {}
			CPoints.unit = "player"
			for index = 1, MAX_COMBO_POINTS do
				local CPoint = CreateFrame("Frame", nil, self.Health)
				CPoint:SetHeight(6)
				CPoint:SetWidth(width * .96 / MAX_COMBO_POINTS)
				CPoint:SetFrameStrata("BACKGROUND")
				kiss_set_me_a_backdrop(CPoint)
				CPoint.bg = CPoint:CreateTexture(nil, "LOW")
				CPoint.bg:SetTexture(texture)
				CPoint.bg:SetAllPoints(CPoint)
				--CPoint:SetPoint('LEFT', index == 1 and self.Health or CPoints[index - 1], 'LEFT', 20, 10)
				if(index == 1) then
					CPoint:SetPoint("LEFT", self.Health, "LEFT", 0, 15)
				else
					CPoint:SetPoint("LEFT", CPoints[index-1], "RIGHT", 2, 0)
				end

				if(index == 1) then CPoint.bg:SetVertexColor(1,1,0) end
				if(index == 2) then CPoint.bg:SetVertexColor(1,0.75,0) end
				if(index == 3) then CPoint.bg:SetVertexColor(1,0.5,0) end
				if(index == 4) then CPoint.bg:SetVertexColor(1,0.25,0) end
				if(index == 5) then CPoint.bg:SetVertexColor(1,0,0) end
				CPoints[index] = CPoint
			end
			self:RegisterEvent("UNIT_COMBO_POINTS", updateCPoints)
			self.CPoints = CPoints
		end
CPoints.unit = "player"
Isn't used by oUF.

self:RegisterEvent("UNIT_COMBO_POINTS", updateCPoints)
Is only used to update self.CPoints.unit, which isn't used by oUF.

Combo points also aren't restricted to class anymore, so restricting it to the player unit would be enough.
__________________
「貴方は1人じゃないよ」
  Reply With Quote