X-Perl UnitFrames

Main Frames

Patch 6.0.2 compatibility

Use latest alpha from WoWAce for using in Patch 6.0.2

http://www.wowace.com/addons/xperl/files/

Until we pushed a proper release version if it become more stable.

May still has problems but for most cases it should be working(at least was tested on beta), if not, clearing old setting by killing(and backup) XPerlxxxxxxx.lua in the WTF directory of your WoW installlation and try again with fresh new default setting, thanks your patience.

Bug Reporting

Please use the Ticketing System on WoWAce Here and avoid posting bugs using comments on Curse because they're difficult to track and they will probably get lost.

Use a good error catcher (like BugSack from files.wowace.com) and provide the full error text, and give as much information as possible to recreate the problem. Don't assume We know what you're talking about with some three word report.

Introduction

Perl, with Extra stuff. Much enchanced from Nymbia's Perl UnitFrames, and a complete replacement for Blizzard's default unit frames, including raid frames and raid tools, with little remaining of the original Nymbia code.

  • Range Finder (combined with optional health check and/or debuff check) for all frames based on spell or item range test.
  • HoT Monitor will highlight units clearly that have ''your own'' active Heal over Time spells. Regardless of how many other heal over time buffs are on the raid members, you can keep track of your own ones and when they expire.
  • Debuff Highlighting in standard debuff colours on all friendly frames. Priority given to show debuffs that ''you'' can cure first.
  • Raid Frames, buff icons, MT list units and some other portions or X-Perl are Created on demand. Saving a lot of time and memory at system startup. Defering the creation of many parts of X-Perl to when they are actually required. And of course, most often outside of raids they are never required and are never created.
  • Raid Target icon support for Target, Target's Target, MT Targets.
  • Raid Tooltip will show combat rezzers available (druids with Rebirth ready (or very soon available) and any normal rezzers out of combat) if you bring up tooltip of a dead person.
  • In-combat indicators for all units.
  • 3D Portraits for player, pet, target, focus, party. Optional. Of course this may degrade your framerate somewhat because you are displaying more 3D character models that without this option. But some like it pretty, and it does look cool.
  • Red and Green combat flashes for frames when player, pet, target, party, partypets, raid take damage/heals. Useful indication of things happening.
  • Added '''time left''' on party member/target buffs/debuffs when in a raid, these depend somewhat on CTRA sending appropriate information over the addon channel, although some of it can be determined at run time by X-Perl, when a player gets a buff for example, we know how long it should last, and therefor when it should expire.
  • Totally new options window including all X-Perl options and access via minimap icon and the /xperl splash command.
  • Configurable colours for borders and backgrounds. Including class coloured names, and configurable reaction colours.

Much care has been taken with code size, memory load, memory usage per cycle and so on. LuaProfiler/OnEvent mods used extensively and regularly to ensure that X-Perl does not do more work than is absolutely necessary.

Assists View

Will show anyone from raid assising you with your target, and can also show healers or all plus known enemies targetting you.

Tooltips for the same also available (on player and target frames) if you prefer to not use the main window.

MT Targets

Replaces CTRA MT Targets window, and doubles as a replacement for the Perl RaidFrames warrior targets.

Indicator shows which target you are on.

Frames will be coloured to show if tanks have duplicate targets.

Casting Monitor

(WORK IN PROGRESS)

Shows selected classes (defaults to healer classes) in a list (much like the MT List), but with some differences.

Shows mana bars and cast bars on left. Their targets on right. Health bar as normal, but a secondary small red bar on targets which shows the maximum single hit this unit has received since entering combat. The secondary bar will extend downwards from their current HP level down to as far as zero.

A green name on the targets indicates this is the same target that you have. You can click on casters or their targets as expected.

For druids, right clicking on a caster will cast Innervate on them.

For shamans, right clicking on a caster will cast Mana Tide Totem. Check the * indicator to see if they're in your group.

All bars can be re-sized in X-Perl main options (Monitor section).

Totals can be toggled (from the 'T' minibutton at top of frame) which gives overview of raid mana status.

Raid Admin

(WORK IN PROGRESS)

Save/Load raid roster setups Only does direct save and load for the moment, but more to come (templates and such).

Item Check

Replacement for /raitem /radur /raresist /rareg. Use the old commands before, or drop items in the left item list.

Query button will perform /raitem on all ticked items (query always includes dur and resists) and you can then view and review all the results whenever, without having to re-query each item.

Includes everyone in raid, so you don't have to work out who doesn't have items, it'll list them with 0 instead of no entry.

Active Scanner to check raid member's equipment for the item selected. So you can be sure that people actually have the item worn (Onyxia Cloak for example), without having to go round single target inspecting everyone who 'forgot' to install CTRA for the 50th raid in a row.

Grim Reaper

Removed from X-Perl, but continues as it's own standalone Ace mod.

[http://www.wowace.com/projects/grim-reaper/]

More Buffing Features

Can be found in my new universal buffing mod, ZOMGBuffs

[http://www.wowace.com/projects/zomgbuffs/]

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of mysticalos mysticalos Jun 11, 2012 at 21:16 UTC - 0 likes

    i always use the latest stand alone alpha of ace, to ensure latest fixes and make sure some out of date lib embedded in another mod isn't running.

  • Avatar of PlayerLin PlayerLin Jun 07, 2012 at 16:27 UTC - 0 likes

    Sounds like a good idea...found an addon named "Consumption" and installed see what happens...

    After tests, found the Ace3 lib package is the source, and it cost 18K~ ms CPU time to process(in normal, it about 10K), and it made my QuestGuru_Tracker(7K at normal, 18K at delay like hell happens, even I hide that in combat.) uses 100 to 150% more CPU time. Disable the Ace3 lib package and looks like not happens anymore...the fps back to fine without any delay when targeting some Mobs/NPCs were cause "hell of delay", but I may needed more tests about that.

    Yeah, lazy to find what lib(s) of Ace3 package cause this fucking shit happens. :p

    Last edited Jun 07, 2012 by PlayerLin
  • Avatar of mysticalos mysticalos Jun 07, 2012 at 15:17 UTC - 0 likes

    You'd just have to use wow's cpu profiling to see what addon is doing it.

  • Avatar of PlayerLin PlayerLin Jun 06, 2012 at 13:46 UTC - 0 likes

    The problem is, I didn't install DBM at all, nothing Raid addons I installed, only some libs about raid. (So it explains why I cannot found any X-Perl problems about Raid, I never raiding, only go back Karazhan by solo with my 85 Ret. Paladin...)
    And this problems not only happens on Raid zones, some TBC/WotLK 5 man dungeons, not happens on any "Updated" classic 5 man dungeons.

    The laggy not cause by BOSS mobs, some non-elite MOBs or quest NPCs did.
    But sure, it must cause by an/some out-dated addon/libs(s), but just can't found the real source... :(

    Last edited Jun 06, 2012 by PlayerLin
  • Avatar of mysticalos mysticalos Jun 05, 2012 at 23:57 UTC - 0 likes

    PlayerLin, that could be an out of date DBM actually, those partuclar zones with an outdated DBM can cause signficant cpu usage/lag do to code changes if you don't update all your old classic raid mods to newest versions.

  • Avatar of PlayerLin PlayerLin Jun 04, 2012 at 14:53 UTC - 0 likes

    Actually, I do hope Zeksie come back and keep playing WoW and fixing his addons when WoW:MoP launches......but... :(

    X-Perl did cause WoW very lag as hell when targeting some NPCs/Mobs...it's still a problem, but thank goodness, it only happens on old/not-updated Zones/Raids like Karazhan, and I'm lazy to find and list them. (But I can't really sure it really cause by X-Perl...)

    Last edited Jun 04, 2012 by PlayerLin
  • Avatar of tss1398383123 tss1398383123 Jun 04, 2012 at 01:21 UTC - 0 likes

    The XPerl_PlayerBuffs.lua fromYour text to link here... have no Debuff problem.There may be some help.

    -- X-Perl UnitFrames
    -- Author: Zek <Boodhoof-EU>
    -- License: GNU GPL v3, 29 June 2007 (see LICENSE.txt)
    
    local conf, pconf
    XPerl_RequestConfig(function(new) conf = new pconf = new.player end, "$Revision: 366 $")
    
    local ev = CreateFrame("Frame")
    local buffAlpha = 1
    local buffFadingOut
    local buffsUpdateFlag
    
    -- FlashExpiringBuffs
    local function FlashExpiringBuffs(self, elapsed)
    	local now = GetTime()
    
    	if (buffFadingOut) then
    		buffAlpha = buffAlpha - elapsed
    		if (buffAlpha <= 0.3) then
    			buffAlpha = 0.3
    			buffFadingOut = nil
    		end
    	else
    		buffAlpha = buffAlpha + elapsed
    		if (buffAlpha >= 1) then
    			buffAlpha = 1
    			buffFadingOut = true
    		end
    	end
    
    	for i,buff in pairs(self.buffFrame.tempEnchant) do
    		if (buff.expireTime and buff.expireTime <= now + 30) then
    			buff:SetAlpha(buffAlpha)
    		else
    			buff:SetAlpha(1)
    		end
    	end
    	for i,buff in pairs(self.buffFrame.buff) do
    		if (buff.expireTime and buff.expireTime <= now + 30) then
    			buff:SetAlpha(buffAlpha)
    		else
    			buff:SetAlpha(1)
    		end
    	end
    	for i,buff in pairs(self.buffFrame.debuff) do
    		if (buff.expireTime and buff.expireTime <= now + 30) then
    			buff:SetAlpha(buffAlpha)
    		else
    			buff:SetAlpha(1)
    		end
    	end
    end
    
    -- UpdateBuffsTimeLeft
    local function UpdateBuffsTimeLeft(self)
    	self.firstExpire = nil
    	if (pconf.buffs.enable and pconf.buffs.flash) then
    		local time = GetTime()
    		local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges = GetWeaponEnchantInfo();
    
    		local function CheckOneBuff(button, timeRemaining)
    			if (timeRemaining > 0) then
    				button.expireTime = time + timeRemaining
    				if (not self.firstExpire or button.expireTime < self.firstExpire) then
    					self.firstExpire = button.expireTime
    					return true
    				end
    			else
    				button.expireTime = nil
    			end
    		end
    
    		if (mainHandExpiration) then
    			CheckOneBuff(self.buffFrame.tempEnchant[1], mainHandExpiration / 1000)
    		end
    		if (offHandExpiration) then
    			CheckOneBuff(self.buffFrame.tempEnchant[2], offHandExpiration / 1000)
    		end
    
    		for i = 1,40 do
    			local button = self.buffFrame.buff[i]
    			if (button) then
    				local name, rank, buff, count, _, duration, endTime, myCast = UnitBuff(self.partyid, i)
    				if (name and myCast) then
    					CheckOneBuff(button, endTime - duration)
    				else
    					button.expireTime = nil
    				end
    			end
    
    			button = self.buffFrame.debuff[i]
    			if (button) then
    				local name, rank, buff, count, _, duration, endTime, myCast = UnitDebuff(self.partyid, i)
    				if (name) then
    					CheckOneBuff(button, endTime - duration)
    				else
    					button.expireTime = nil
    				end
    			end
    		end
    	end
    end
    
    -- XPerl_PlayerBuffs_OnUpdate
    function XPerl_PlayerBuffs_OnUpdate(self, elapsed)
    	if (buffsUpdateFlag) then
    		buffsUpdateFlag = nil
    
    		-- The PLAYER_AURAS_CHANGED event is not given if an own buff is refreshed, hence we don't get expire times updated
    		-- So we intercept UNIT_AURA for this, but will still have to catch PLAYER_AURAS_CHANGED because there's some
    		-- latency between a buff expiring (according to UNIT_BUFF), and the aura fading (according to PLAYER_AURAS_CHANGED).
    		if (pconf.buffs.enable) then
    			local a = conf.buffs.cooldown
    			conf.buffs.cooldown = pconf.buffs.cooldown
    
    			-- Illidanel:fix while pconf.buffs.wrap on then the pconf.buffs.count not functional
    			XPerl_Unit_UpdateBuffs(XPerl_Player, pconf.buffs.count, pconf.buffs.count, 0, 0)
    
    			XPerl_Player_Buffs_Position(XPerl_Player)
    			conf.buffs.cooldown = a
    
    			XPerl_Player_TempEnchantUpdate(XPerl_Player)
    
    			UpdateBuffsTimeLeft(XPerl_Player)
    		end
    	end
    
    	if (XPerl_Player.firstExpire) then
    		local now = GetTime()
    		if (XPerl_Player.firstExpire <= now + 30) then
    			FlashExpiringBuffs(XPerl_Player, elapsed)
    		end
    	end
    end
    
    -- XPerl_Player_Buffs_Position
    function XPerl_Player_Buffs_Position(self)
    	if (self.buffFrame) then
    		self.buffFrame:ClearAllPoints()
    		if (pconf.buffs.above) then
    			self.buffFrame:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 3, 0)
    		else
    			if (self.runes and self.runes:IsShown() and not pconf.hideRunes) then
    				self.buffFrame:SetPoint("TOPLEFT", self.runes, "BOTTOMLEFT", 3, 0)
    			elseif (pconf.buffs.wrap and ((pconf.xpBar or pconf.repBar) and not pconf.extendPortrait)) then
    				self.buffFrame:SetPoint("TOPLEFT", self.statsFrame, "BOTTOMLEFT", 3, 0)
    			else
    				self.buffFrame:SetPoint("TOPLEFT", self.portraitFrame, "BOTTOMLEFT", 3, 0)
    			end
    		end
    
    		--if (not self.conf.buffs.wrap and self.buffFrame.buff and self.buffFrame.buff[1] and self.buffFrame.debuff and self.buffFrame.debuff[1]) then
    		--	self.buffFrame.buff[1]:ClearAllPoints()
    		--	self.buffFrame.debuff[1]:ClearAllPoints()
    		--	if (pconf.buffs.above) then
    		--		self.buffFrame.buff[1]:SetPoint("BOTTOMLEFT", 0, 0)
    		--		self.buffFrame.debuff[1]:SetPoint("BOTTOMLEFT", self.buffFrame.buff[1], "TOPLEFT", 0, 2)
    		--	else
    		--		self.buffFrame.buff[1]:SetPoint("TOPLEFT", 0, 0)
    		--		self.buffFrame.debuff[1]:SetPoint("TOPLEFT", self.buffFrame.buff[1], "BOTTOMLEFT", 0, -2)
    		--	end
    		--end
    
    		XPerl_Unit_BuffPositions(self, self.buffFrame.buff, self.buffFrame.debuff, pconf.buffs.size, pconf.debuffs.size)
    	end
    end
    
    -- XPerl_Player_BuffSetup
    function XPerl_Player_BuffSetup(self)
    	if (not pconf.buffs.enable) then
    		self.firstExpire = nil
    		if (self.buffFrame) then
    			self.buffFrame:Hide()
    			ev:UnregisterAllEvents()
    
    			BuffFrame:Show()
    			BuffFrame:RegisterEvent("UNIT_AURA")
    			TemporaryEnchantFrame:Show()
    
    			BuffFrame_Update()
    		end
    		return
    	end
    
    	if (not self.buffFrame) then
    		self.buffFrame = CreateFrame("Frame", self:GetName().."buffFrame", self)
    		self.buffFrame:SetScript("OnUpdate", XPerl_PlayerBuffs_OnUpdate)
    		self.buffFrame:SetWidth(200)
    		self.buffFrame:SetHeight(32)
    		self.buffFrame.buff = {}
    		self.buffFrame.debuff = {}
    
    		self.debuffFrame = CreateFrame("Frame", self:GetName().."debuffFrame", self.buffFrame)
    		self.tempEnchantFrame = CreateFrame("Frame", self:GetName().."tempEnchantFrame", self.buffFrame)
    
    		XPerl_GetBuffButton(self, 1, 1, true)
    		XPerl_GetBuffButton(self, 2, 1, true)
    		self.buffFrame.tempEnchant = self.buffFrame.debuff
    		self.buffFrame.debuff = {}
    
    		self.buffFrame.tempEnchant[1]:SetParent(self.tempEnchantFrame)
    		self.buffFrame.tempEnchant[2]:SetParent(self.tempEnchantFrame)
    
    		local function SetupEnchantButton(self)
    			self:SetScript("OnEnter",
    				function(self)
    					if (conf.tooltip.enableBuffs and XPerl_TooltipModiferPressed(true)) then
    						if (not conf.tooltip.hideInCombat or not InCombatLockdown()) then
    							GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT")
    							GameTooltip:SetInventoryItem("player", self:GetID())
    						end
    					end
    				end
    			)
    
    			self.UpdateTooltip = nil
    
    			self:SetScript("OnClick",
    				function(self, button)
    					if (button == "RightButton") then
    						if (self:GetID() == 16) then
    							CancelItemTempEnchantment(1)
    						elseif (self:GetID() == 17) then
    							CancelItemTempEnchantment(2)
    						end
    					end
    				end
    			)
    		end
    
    		local te = self.buffFrame.tempEnchant
    		SetupEnchantButton(te[1])
    		SetupEnchantButton(te[2])
    
    		XPerl_GetBuffButton(self, 1, 0, true)		-- Need at least 1 buff and debuff icon to anchor debuffs
    		XPerl_GetBuffButton(self, 1, 1, true)
    	end
    
    	XPerl_SetBuffSize(self)
      
    	if (pconf.buffs.hideBlizzard) then
    		BuffFrame:UnregisterEvent("UNIT_AURA")
    		BuffFrame:Hide()
    		TemporaryEnchantFrame:Hide()
    	else
    		BuffFrame:Show()
    		BuffFrame:RegisterEvent("UNIT_AURA")
    		TemporaryEnchantFrame:Show()
    	end
    
    	ev:RegisterEvent("UNIT_AURA")
    	ev:RegisterEvent("UNIT_INVENTORY_CHANGED")
    	ev:RegisterEvent("UNIT_ENTERED_VEHICLE")
    	ev:RegisterEvent("UNIT_EXITED_VEHICLE")
    	self.buffFrame:Show()
    
    	local a = conf.buffs.cooldown
    	conf.buffs.cooldown = pconf.buffs.cooldown
    
    	-- Illidanel:fix while pconf.buffs.wrap on then the pconf.buffs.count not functional
    	XPerl_Unit_UpdateBuffs(XPerl_Player, pconf.buffs.count, pconf.buffs.count, 0, 0)
    
    	conf.buffs.cooldown = a
    
    	self.buffOptMix = nil
    	XPerl_Player_Buffs_Position(self)
    
    	XPerl_Player_TempEnchantUpdate(XPerl_Player)
    	UpdateBuffsTimeLeft(XPerl_Player)
    end
    
    -- XPerl_Player_TempEnchantUpdate
    function XPerl_Player_TempEnchantUpdate(self)
    
    	if (not self.buffFrame) then
    		return
    	end
    
    	local time = GetTime()
    	local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges = GetWeaponEnchantInfo();
    
    	local te = self.buffFrame.tempEnchant
    	local on1 = te and te[1]:IsVisible()
    	local on2 = te and te[2]:IsVisible()
    	local anyOn = (on1 and on2)
    
    	-- No enchants, kick out early
    	if (not hasMainHandEnchant and not hasOffHandEnchant) then
    		if (te) then
    			te[1]:Hide()
    			te[2]:Hide()
    		end
    		if (self.buffFrame.buff and self.buffFrame.buff[1]) then
    			if (pconf.buffs.above) then
    				self.buffFrame.buff[1]:SetPoint("BOTTOMLEFT", 0, 0)
    			else
    				self.buffFrame.buff[1]:SetPoint("TOPLEFT", 0, 0)
    			end
    		end
    		return anyOn
    	end
    
    	local function DoEnchant(index, slotID, hasEnchant, expire, charges)
    	local button = te[index]
    		if (hasEnchant) then
    			--Illidanel:currently does not includ the buff countdown zone feature
    			button.fullDuration = 3600
    
    			button:Show()
    
    			local textureName = GetInventoryItemTexture("player", slotID)	-- Weapon Icon
    			button:SetID(slotID)
    			button.icon:SetTexture(textureName)
    			button:SetAlpha(1)
    			button.border:SetVertexColor(0.7, 0, 0.7)
    
    			-- Handle cooldowns
    			if (button.cooldown) then
    				if (expire and conf.buffs.cooldown and pconf.buffs.cooldown) then
    					local timeEnd = time + (expire / 1000)
    					local timeStart = timeEnd - button.fullDuration
    
    					XPerl_CooldownFrame_SetTimer(button.cooldown, timeStart, button.fullDuration, 1)
    				else
    					button.cooldown:Hide()
    				end
    			end
    
    			if (index > 1) then
    				button:SetPoint("TOPLEFT", te[index - 1], "TOPRIGHT", 0, 0)
    			else
    				button:ClearAllPoints()
    				if (pconf.buffs.above) then
    					button:SetPoint("BOTTOMLEFT", self.buffFrame, "BOTTOMLEFT", 0, 0)
    				else
    					button:SetPoint("TOPLEFT", self.buffFrame, "TOPLEFT", 0, 0)
    				end
    			end
    
    			return 1
    		else
    			button.fullDuration = nil
    			button:Hide()
    			return 0
    		end
    	end
    
    	local i = 0
    	i = i + DoEnchant(i + 1, 16, hasMainHandEnchant, mainHandExpiration, mainHandCharges)
    	i = i + DoEnchant(i + 1, 17, hasOffHandEnchant, offHandExpiration, offHandCharges)
    
    	self.buffFrame.buff[1]:SetPoint("TOPLEFT", self.buffFrame.tempEnchant[i], "TOPRIGHT", 0, 0)
    
    	i = i + 1
    	while i < 3 do
    		local button = te[i]
    		button:Hide()
    		i = i + 1
    	end
    
    	if (te[1]:IsVisible() and not on1) then
    		return true
    	elseif (te[2]:IsVisible() and not on2) then
    		return true
    	end
    
    	return
    end
    
    -- XPerl_Player_SetBuffTooltip
    function XPerl_Player_SetBuffTooltip(self)
    	if (conf.tooltip.enableBuffs and XPerl_TooltipModiferPressed(true)) then
    		if (not conf.tooltip.hideInCombat or not InCombatLockdown()) then
    			GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT")
    			GameTooltip:SetUnitBuff(XPerl_Player.partyid, self:GetID())
    		end
    	end
    end
    
    -- XPerl_Player_SetDeBuffTooltip
    function XPerl_Player_SetDeBuffTooltip(self)
    	if (conf.tooltip.enableBuffs and XPerl_TooltipModiferPressed(true)) then
    		if (not conf.tooltip.hideInCombat or not InCombatLockdown()) then
    			GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT")
    			GameTooltip:SetUnitDebuff(XPerl_Player.partyid, self:GetID())
    		end
    	end
    end
    
    -- PlayerBuffsInit
    local function PlayerBuffsInit(self)
    	local BuffOnUpdate, DebuffOnUpdate, BuffUpdateTooltip, DebuffUpdateTooltip
    	BuffUpdateTooltip = XPerl_Player_SetBuffTooltip
    	DebuffUpdateTooltip = XPerl_Player_SetDeBuffTooltip
    
    	XPerl_Player.buffSetup = {
    		buffScripts = {
    			OnEnter = XPerl_Player_SetBuffTooltip,
    			OnUpdate = BuffOnUpdate,
    			OnLeave = XPerl_PlayerBuffTipHide,
    			OnClick = function(self, button)
    				if (button == "RightButton") then
    					local name, rank, buff, count, _, duration, endTime, myCast = UnitBuff("player", self:GetID())
    					if (name) then
    						CancelUnitBuff("player", name)
    					end
    				end
    			end,
    		},
    		debuffScripts = {
    			OnEnter = XPerl_Player_SetDeBuffTooltip,
    			OnUpdate = DebuffOnUpdate,
    			OnLeave = XPerl_PlayerBuffTipHide,
    			OnClick = function(self, button)
    				-- Can cancel a few debuffs (Mind Vision for example)
    				if (button == "RightButton") then
    					local name, rank, buff, count, _, duration, endTime, myCast = UnitDebuff("player", self:GetID())
    					if (name) then
    						CancelUnitBuff("player", name)
    					end
    				end
    			end,
    		},
    		updateTooltipBuff = BuffUpdateTooltip,
    		updateTooltipDebuff = DebuffUpdateTooltip,
    		debuffParent = true,
    		buffSizeOpt = "PlayerBuffSize",
    		debuffSizeMod = 0.2,
    		rightClickable = true,
    		buffAnchor1 = function(self, b)
    			if (pconf.buffs.above) then
    				self.buffFrame:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 3, 0)
    			else
    				--if ((self.statsFrame.repBar and self.statsFrame.repBar:IsShown()) or (self.statsFrame.xpBar and self.statsFrame.xpBar:IsShown()) or (self.statsFrame.druidBar and self.statsFrame.druidBar:IsShown())) then
    				--	self.buffFrame:SetPoint("TOPLEFT", self.statsFrame, "BOTTOMLEFT", 3, 0)
    				--else
    					self.buffFrame:SetPoint("TOPLEFT", self.portraitFrame, "BOTTOMLEFT", 3, 0)
    				--end
    			end
    
    			b:ClearAllPoints()
    			if (pconf.buffs.above) then
    				b:SetPoint("BOTTOMLEFT", 0, 0)
    			else
    				b:SetPoint("TOPLEFT", 0, 0)
    			end
    			self.buffSetup.buffAchor1 = nil
    		end,
    		debuffAnchor1 = function(self, b)
    			b:ClearAllPoints()
    			if (pconf.buffs.above) then
    				b:SetPoint("BOTTOMLEFT", self.buffFrame.buff[1], "TOPLEFT", 0, 0)
    			else
    				b:SetPoint("TOPLEFT", self.buffFrame.buff[1], "BOTTOMLEFT", 0, 0)
    			end
    			self.buffSetup.debuffAchor1 = nil
    		end,
    	}
    
    	XPerl_RegisterOptionChanger(function()
    			XPerl_Player.buffOptMix = nil
    			XPerl_Player_BuffSetup(XPerl_Player)
    		end
    	)
    
    	XPerl_Player.GetBuffSpacing = function(self)
    		local w = self.statsFrame:GetWidth()
    		if (pconf.portrait) then
    			w = w - 2 + self.portraitFrame:GetWidth()
    		end
    		if (not self.buffSpacing) then
    			self.buffSpacing = XPerl_GetReusableTable()
    		end
    		self.buffSpacing.rowWidth = w
    
    		local srs = 0
    		if ((not self.runes or pconf.hideRunes) and not self.conf.buffs.above and pconf.portrait and not pconf.extendPortrait) then
    			if (self.statsFrame.xpBar and self.statsFrame.xpBar:IsShown()) then
    				srs = 10
    			end
    			if (self.statsFrame.repBar and self.statsFrame.repBar:IsShown()) then
    				srs = srs + 10
    			end
    			if (self.statsFrame.druidBar and self.statsFrame.druidBar:IsShown()) then
    				srs = srs + 10
    			end
    		end
    
    		if (srs > 0 and pconf.portrait) then
    			self.buffSpacing.smallRowHeight = srs
    			self.buffSpacing.smallRowWidth = self.portraitFrame:GetWidth() - 2
    		else
    			self.buffSpacing.smallRowHeight = 0
    			self.buffSpacing.smallRowWidth = w
    		end
    	end
    
    	XPerl_Player_BuffSetup(XPerl_Player)
    
    	PlayerBuffsInit = nil
    end
    
    local function PlayerBuffsOnEvent(self, event, unit)
    --XPerl_ShowMessage("PlayerBuffs")
    
    	if (event == "UNIT_AURA" and (unit == "player" or unit == "vehicle")) then
    		-- The PLAYER_AURAS_CHANGED event is not given if an own buff is refreshed, hence we don't get expire times updated
    		-- So we intercept UNIT_AURA for this, but will still have to catch PLAYER_AURAS_CHANGED because there's some
    		-- latency between a buff expiring (according to UNIT_BUFF), and the aura fading (according to PLAYER_AURAS_CHANGED).
    
    		-- So, instead of doing double work we'll set a flag and do it during the OnUpdate
    		if (pconf.buffs.enable) then
    			buffsUpdateFlag = true
    		end
    
    	elseif (event == "UNIT_INVENTORY_CHANGED") then
    		-- Fired when (among other things) a weapon enchant changes
    		-- This event fires a lot, which is aweful. But less awful than re-working the icons from
    		-- scratch for every single frame like the Blizzard code does (Who writes that code???)
    		if (unit == "player" and pconf.buffs.enable) then
    			buffsUpdateFlag = true
    		end
    
    	elseif (event == "PLAYER_ENTERING_WORLD") then
    		self:UnregisterEvent("PLAYER_ENTERING_WORLD")
    		PlayerBuffsInit(self)
    
    	elseif (event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE") then
    		-- We want to insure that and update to buffs happen uppone entering a Vehicle
    		if (pconf.buffs.enable) then
    			buffsUpdateFlag = true
    		end
    	end
    end
    
    ev:RegisterEvent("PLAYER_ENTERING_WORLD")
    ev:SetScript("OnEvent", PlayerBuffsOnEvent)
    ev:Show()
    
  • Avatar of mysticalos mysticalos Jun 03, 2012 at 22:54 UTC - 0 likes

    i just wish i could brain suck tandanu's brain so i could code it even better then zek ever did. I wish xperl could be as efficent as other mods. My problem with UI frames, is that i just coudln't like any of the other ones. i didn't like any of em at all, grid, grid2, shadowed, pitbull.

    xperl cpu usage has always been too high true, just not as high as it was in 630, in general it's a high cpu mod. I just wish blizz would design a better default UI raid frame to be honest, so i can just run one less mod. But we'll see how things go in MOP, and if xperl is fixable for it for that matter.

  • Avatar of mysticalos mysticalos Jun 02, 2012 at 22:34 UTC - 0 likes

    The cpu usaeg in 25 man heroic raid combat was massive, like of the charts massive, my fps tanked ot sub 10fps on fights i normally have 40fps, if that tells you anything, reverting to 629 fixed the problem. I know for a fact it was xperl because i had to enable cpu profiling to find the cause. what code change did it who knows.

    It was not really noticable in a 10 man. So it definitely seems compounded by massive events going on at once in 25 man raids.In fact, it was slightly noticiable on trash and morchok, but it was a disaster on heroic zon ozz and yorsahj.

    I'm sure it happens in all situations, But really depends on computer on where you start to really feel impact. Personally if an addon is even costingf you 1fps it's doing it wrong, costing you 30fps is way out of line though.

    Last edited Jun 02, 2012 by mysticalos
  • Avatar of PlayerLin PlayerLin Jun 01, 2012 at 15:07 UTC - 0 likes

    .................

    Too bad about it must be reverted and...Sontix, get your ass back to fix and fully testing your damn code!!
    :P

    (BTW, does it means only happens in Raid and not in other situations? Or may happens in all situations?)

    Last edited Jun 01, 2012 by PlayerLin

Facts

Date created
Aug 31, 2008
Categories
Last update
Oct 18, 2014
Development stage
Release
Language
  • deDE
  • enUS
  • esES
  • frFR
  • koKR
  • ruRU
  • zhCN
  • zhTW
License
GNU General Public License version 3 (GPLv3)
Curse link
X-Perl UnitFrames
Downloads
22,330,869
Recent files
  • A: r879 for 6.0.2 Oct 18, 2014
  • A: r878 for 6.0.1 Sep 24, 2014
  • A: r876 for 6.0.1 Sep 15, 2014
  • A: r875 for 6.0.1 Sep 15, 2014
  • A: r874 for 6.0.1 Sep 12, 2014

Authors

Relationships

Optional dependency
LibTalentQuery-1.0