Closed Thread
Thread Tools Display Modes
Unread 01-14-09, 10:56 AM   #201
coree
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 27
since oUF 1.3.1 i am using tags for hp and power. i noticed that the tags are updating slower then the hp/power bars.
am i the only one who has this problem or is it a known "bug" or "thing nobody can fix" ?

Last edited by coree : 01-14-09 at 11:04 AM.
coree is offline  
Unread 01-14-09, 12:33 PM   #202
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Tags updates on events.
By default the non-tag updates are also on events, but on alot more of them.

Also, if enabled, its updated by a OnUpdate script instead of events, which makes it update more often
p3lim is offline  
Unread 01-14-09, 01:09 PM   #203
coree
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 27
Originally Posted by p3lim View Post
Also, if enabled, its updated by a OnUpdate script instead of events, which makes it update more often
how can i enable this option ?
coree is offline  
Unread 01-14-09, 01:15 PM   #204
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by coree View Post
how can i enable this option ?
health|power.frequentUpdates = true
p3lim is offline  
Unread 01-14-09, 02:08 PM   #205
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Do note that the option is not for the tags, but the bar only.
haste is offline  
Unread 01-15-09, 03:32 AM   #206
Blood Druid
A Fallenroot Satyr
Join Date: Oct 2008
Posts: 26
In general the code has led to yours since it all the same is more compact:

leader.lua
Code:
local parent = debugstack():match[[\AddOns\(.-)\]]
local global = GetAddOnMetadata(parent, 'X-oUF')
assert(global, 'X-oUF needs to be defined in the parent add-on.')
local oUF = _G[global]

local Update = function(self, event)
	if(UnitIsPartyLeader(self.unit)) then
		self.Leader:Show()
	else
		self.Leader:Hide()
	end
	if self.MasterIcon then
		local unit
		local method, pid, rid = GetLootMethod()
		if(method == 'master') then
			if(rid) then
				unit = 'raid'..rid
			elseif(pid) then
				if(pid == 0) then
					unit = 'player'
				else
					unit = 'party'..pid
				end
			end	
			if(UnitName(unit) == UnitName(self.unit)) then
				if(self.Leader:IsShown()) then
					if (self.unit == 'player') then
						self.MasterIcon:SetPoint('TOPRIGHT', self.Leader, 'TOPLEFT', 1, 0)
					else
						self.MasterIcon:SetPoint('TOPLEFT', self.Leader, 'TOPRIGHT', -3, 0)
					end
				else
					self.MasterIcon:SetPoint(self.Leader:GetPoint())
				end
				self.MasterIcon:Show()
			else
				self.MasterIcon:Hide()
			end
		elseif(self.MasterIcon:IsShown()) then
			self.MasterIcon:Hide()
		end
	end
end

local Enable = function(self)
	local leader = self.Leader
	if(leader) then
		self:RegisterEvent("PARTY_LEADER_CHANGED", Update)
		self:RegisterEvent("PARTY_MEMBERS_CHANGED", Update)

		if(leader:IsObjectType"Texture" and not leader:GetTexture()) then
			leader:SetTexture[[Interface\GroupFrame\UI-Group-LeaderIcon]]
		end

		local masterIcon = self.MasterIcon
		if(masterIcon) then
			if(masterIcon:IsObjectType"Texture" and not masterIcon:GetTexture()) then
				masterIcon:SetTexture[[Interface\GroupFrame\UI-Group-MasterLooter]]
			end
		end

		return true
	end
end

local Disable = function(self)
	local leader = self.Leader
	if(leader) then
		self:UnregisterEvent("PARTY_LEADER_CHANGED", Update)
		self:UnregisterEvent("PARTY_MEMBERS_CHANGED", Update)
	end
end

oUF:AddElement('Leader', Update, Enable, Disable)

But as I did not try to me and the same code was not possible to force to work, but placed in masterlooter.lua

All problem in if(self.Leader:IsShown()) then

why that this condition returns true when self.Leader it is hidden also false when it is shown...
What to do, I do not know
Blood Druid is offline  
Unread 01-31-09, 12:39 PM   #207
Corosive
A Kobold Labourer
Join Date: Jan 2009
Posts: 1
I just downloaded this addon and a skin for it,but i have no idea how to configure it. Can somebody help me >.<
Corosive is offline  
Unread 01-31-09, 12:43 PM   #208
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by Corosive View Post
I just downloaded this addon and a skin for it,but i have no idea how to configure it. Can somebody help me >.<
There is no config whatsoever, everything is hardcoded through Lua.
oUF is a unit framework and is made to those experienced with addons.

In other words, I you want to change stuff you need to know basic Lua.
p3lim is offline  
Unread 01-31-09, 12:47 PM   #209
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
That's really a false statement as usual. oUF itself does support enabling, disabling and updating of elements, but there just aren't any layouts that actually use the system.
haste is offline  
Unread 01-31-09, 12:53 PM   #210
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,320
Originally Posted by haste View Post
That's really a false statement as usual. oUF itself does support enabling, disabling and updating of elements, but there just aren't any layouts that actually use the system.
Well that is pretty much it. For example, there is no GUI that lets you change the looks.
Ive put my little GUI project on hold due RL.
p3lim is offline  
Unread 02-01-09, 06:50 AM   #211
MoonWitch
A Scalebane Royal Guard
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 437
Originally Posted by Corosive View Post
I just downloaded this addon and a skin for it,but i have no idea how to configure it. Can somebody help me >.<
To configure your oUF "skin" (it's a layout ), you will have to open the .lua files in the addon's folder in notepad (or any other text editor).

oUF is great, but does require some basic lua knowledge if you want to customize the layouts more.
MoonWitch is offline  
Unread 02-03-09, 10:42 AM   #212
isler
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 1
When I use reloadui during combat :

Error: attempt to perform arithmetic on field 'delay' (a nil value)
AddOn: oUF
File: castbar.lua
Line: 175
Count: 1
--------------------------------------------------
Error: Usage: <unnamed>:SetValue(value)
AddOn: oUF
File: castbar.lua
Line: 191
Count: 2
isler is offline  
Unread 02-03-09, 11:06 AM   #213
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
http://ixo.no/git/oUF.git/commit/?id...a620b6575ac179
Post it in the bug reports section the next time tho'.
haste is offline  
Unread 02-03-09, 02:33 PM   #214
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Been getting this error lately :P

Code:
[2009/02/03 13:31:47-131-x1]: oUF_HealComm-1.1\oUF_HealComm.lua:35: Usage: UnitHealth("unit")
oUF_HealComm-1.1\oUF_HealComm.lua:35: in function <Interface\AddOns\oUF_HealComm\oUF_HealComm.lua:34>
oUF_HealComm-1.1\oUF_HealComm.lua:101: in function `PostUpdateHealth'
oUF-1.3.4\elements\health.lua:95: in function `UNIT_MAXHEALTH'
oUF-1.3.4\elements\health.lua:42: in function <Interface\AddOns\oUF\elements\health.lua:35>
__________________
Alkar is offline  
Unread 02-03-09, 03:51 PM   #215
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by Alkar View Post
Been getting this error lately :P

Code:
[2009/02/03 13:31:47-131-x1]: oUF_HealComm-1.1\oUF_HealComm.lua:35: Usage: UnitHealth("unit")
oUF_HealComm-1.1\oUF_HealComm.lua:35: in function <Interface\AddOns\oUF_HealComm\oUF_HealComm.lua:34>
oUF_HealComm-1.1\oUF_HealComm.lua:101: in function `PostUpdateHealth'
oUF-1.3.4\elements\health.lua:95: in function `UNIT_MAXHEALTH'
oUF-1.3.4\elements\health.lua:42: in function <Interface\AddOns\oUF\elements\health.lua:35>
That look very much like a healcomm error, and not oUF.
haste is offline  
Unread 02-04-09, 07:41 AM   #216
Blood Druid
A Fallenroot Satyr
Join Date: Oct 2008
Posts: 26
Would like to bring up once again a question on an applied method of reception safezone:
today I had a fine possibility to be convinced that the applied method of reception the incorrect.
Certainly the question in that for what is it for Haste?
I tested it on Wintergrasp where logs are ideal for similar testing
My ping on GetNetStats() was 83ms, but thus on cast there was a delay in some seconds, and on castes a bar I was displayed small safezone corresponding ping 83ms.
Now I wish to offer a method which already was discussed, I tell about UNIT_SPELLCAST_SENT
Applying the given method I have received correct result of calculation Lags.
Can it is necessary to pass to this method, Haste?
Here an example copied by me castbar.lua:
Code:
--[[
	Original codebase:
		oUF_Castbar by starlon.
		http://svn.wowace.com/wowace/trunk/oUF_Castbar/

	Elements handled: .Castbar
	Sub-elements: .Text, .Icon, .Time, .SafeZone, .Spark
	Notes: This element will not work on units that require a OnUpdate.
	(eventless units).

	Functions that can be overridden from within a layout:
	 - :CustomDelayText(duration)
	 - :CustomTimeText(duration)

--]]
local parent = debugstack():match[[\AddOns\(.-)\]]
local global = GetAddOnMetadata(parent, 'X-oUF')
assert(global, 'X-oUF needs to be defined in the parent add-on.')
local oUF = _G[global]

local noop = function() end
local UnitName = UnitName
local GetTime = GetTime
local UnitCastingInfo = UnitCastingInfo
local UnitChannelInfo = UnitChannelInfo

local UNIT_SPELLCAST_SENT = function(self, event, unit)
	if (unit == 'player') and (self.Castbar.SafeZone) then
		self.Castbar.SafeZone.sendTime = GetTime()
	end	
end
local UNIT_SPELLCAST_START = function(self, event, unit, spell, spellrank)
	if(self.unit ~= unit) then return end

	local castbar = self.Castbar
	local name, rank, text, texture, startTime, endTime, _, castid = UnitCastingInfo(unit)
	if(not name) then
		castbar:Hide()
		return
	end

	endTime = endTime / 1e3
	startTime = startTime / 1e3
	local max = endTime - startTime

	castbar.castid = castid
	castbar.duration = GetTime() - startTime
	castbar.max = max
	castbar.delay = 0
	castbar.casting = true

	castbar:SetMinMaxValues(0, max)
	castbar:SetValue(0)

	if(castbar.Text) then castbar.Text:SetText(text) end
	if(castbar.Icon) then castbar.Icon:SetTexture(texture) end
	if(castbar.Time) then castbar.Time:SetText() end

	local sf = castbar.SafeZone
	if(sf) then
		sf.timeDiff = GetTime() - sf.sendTime
		sf.spellTimeSize = max
		sf.timeDiff = sf.timeDiff > sf.spellTimeSize and sf.spellTimeSize or sf.timeDiff
		sf.lagSize = sf.timeDiff / sf.spellTimeSize
		sf:ClearAllPoints()
		sf:SetPoint('BOTTOMRIGHT', castbar, 'BOTTOMRIGHT')
		sf:SetWidth((castbar:GetWidth()) * sf.lagSize)
		sf.Text:ClearAllPoints()
		sf.Text:SetPoint('BOTTOMRIGHT', sf, 'TOPRIGHT', 0, 2)
		sf.Text:SetJustifyH('RIGHT')
		sf.Text:SetFormattedText('%dms', sf.timeDiff * 1000)
	end

	if(self.PostCastStart) then self:PostCastStart(event, unit, name, rank, text, castid) end
	castbar:Show()
end

local UNIT_SPELLCAST_FAILED = function(self, event, unit, spellname, spellrank, castid)
	if(self.unit ~= unit) then return end

	local castbar = self.Castbar
	if(castbar.castid ~= castid) then
		return
	end

	castbar.casting = nil
	castbar:SetValue(0)
	castbar:Hide()

	if(self.PostCastFailed) then self:PostCastFailed(event, unit, spellname, spellrank, castid) end
end

local UNIT_SPELLCAST_INTERRUPTED = function(self, event, unit, spellname, spellrank, castid)
	if(self.unit ~= unit) then return end

	local castbar = self.Castbar
	if(castbar.castid ~= castid) then
		return
	end
	castbar.casting = nil
	castbar.channeling = nil

	castbar:SetValue(0)
	castbar:Hide()

	if(self.PostCastInterrupted) then self:PostCastInterrupted(event, unit, spellname, spellrank, castid) end
end

local UNIT_SPELLCAST_DELAYED = function(self, event, unit, spellname, spellrank)
	if(self.unit ~= unit) then return end

	local name, rank, text, texture, startTime, endTime = UnitCastingInfo(unit)
	if(not startTime) then return end

	local castbar = self.Castbar
	local duration = GetTime() - (startTime / 1000)
	if(duration < 0) then duration = 0 end

	castbar.delay = castbar.delay + castbar.duration - duration
	castbar.duration = duration

	castbar:SetValue(duration)

	if(self.PostCastDelayed) then self:PostCastDelayed(event, unit, name, rank, text) end
end

local UNIT_SPELLCAST_STOP = function(self, event, unit, spellname, spellrank, castid)
	if(self.unit ~= unit) then return end

	local castbar = self.Castbar
	if(castbar.castid ~= castid) then
		return
	end

	castbar.casting = nil
	castbar:SetValue(0)
	castbar:Hide()

	if(self.PostCastStop) then self:PostCastStop(event, unit, spellname, spellrank, castid) end
end

local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname, spellrank)
	if(self.unit ~= unit) then return end

	local castbar = self.Castbar
	local name, rank, text, texture, startTime, endTime = UnitChannelInfo(unit)
	if(not name) then
		return
	end

	endTime = endTime / 1e3
	startTime = startTime / 1e3
	local max = (endTime - startTime)
	local duration = endTime - GetTime()

	castbar.duration = duration
	castbar.max = max
	castbar.delay = 0
	castbar.channeling = true

	castbar:SetMinMaxValues(0, max)
	castbar:SetValue(duration)

	if(castbar.Text) then castbar.Text:SetText(name) end
	if(castbar.Icon) then castbar.Icon:SetTexture(texture) end
	if(castbar.Time) then castbar.Time:SetText() end

	local sf = castbar.SafeZone
	if(sf) then
		sf.timeDiff = GetTime() - sf.sendTime
		sf.spellTimeSize = max
		sf.timeDiff = sf.timeDiff > sf.spellTimeSize and sf.spellTimeSize or sf.timeDiff
		sf.lagSize = sf.timeDiff / sf.spellTimeSize
		sf:ClearAllPoints()
		sf:SetPoint('BOTTOMLEFT', castbar, 'BOTTOMLEFT')
		sf:SetWidth((castbar:GetWidth()) * sf.lagSize)
		sf.Text:ClearAllPoints()
		sf.Text:SetPoint('BOTTOMLEFT', sf, 'TOPLEFT', 0, 2)
		sf.Text:SetJustifyH('LEFT')
		sf.Text:SetFormattedText('%dms', sf.timeDiff * 1000)
		sf:Show()
	end

	if(self.PostChannelStart) then self:PostChannelStart(event, unit, name, rank, text) end
	castbar:Show()
end

local UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, event, unit, spellname, spellrank)
	if(self.unit ~= unit) then return end

	local name, rank, text, texture, startTime, endTime, oldStart = UnitChannelInfo(unit)
	local castbar = self.Castbar
	local duration = (endTime / 1000) - GetTime()

	castbar.delay = castbar.delay + castbar.duration - duration
	castbar.duration = duration
	castbar.max = (endTime - startTime) / 1000

	castbar:SetMinMaxValues(0, castbar.max)
	castbar:SetValue(duration)

	if(self.PostChannelUpdate) then self:PostChannelUpdate(event, unit, name, rank, text) end
end

local UNIT_SPELLCAST_CHANNEL_STOP = function(self, event, unit, spellname, spellrank)
	if(self.unit ~= unit) then return end

	local castbar = self.Castbar
	castbar.channeling = nil

	castbar:SetValue(castbar.max)
	castbar:Hide()

	if(self.PostChannelStop) then self:PostChannelStop(event, unit, spellname, spellrank) end
end

local onUpdate = function(self, elapsed)
	if self.casting then
		local duration = self.duration + elapsed
		if (duration >= self.max) then
			self.casting = nil
			self:Hide()
		end

		if self.SafeZone then
			local width = self:GetWidth()
			local _, _, ms = GetNetStats()
			-- MADNESS!
			local safeZonePercent = (width / self.max) * (ms / 1e5)
			if(safeZonePercent > 1) then safeZonePercent = 1 end
			self.SafeZone:SetWidth(width * safeZonePercent)
		end

		if self.Time then
			if self.delay ~= 0 then
				if(self.CustomDelayText) then
					self:CustomDelayText(duration)
				else
					self.Time:SetFormattedText("%.1f|cffff0000-%.1f|r", duration, self.delay)
				end
			else
				if(self.CustomTimeText) then
					self:CustomTimeText(duration)
				else
					self.Time:SetFormattedText("%.1f", duration)
				end
			end
		end

		self.duration = duration
		self:SetValue(duration)

		if self.Spark then
			self.Spark:SetPoint("CENTER", self, "LEFT", (duration / self.max) * self:GetWidth(), 0)
		end
	elseif self.channeling then
		local duration = self.duration - elapsed

		if(duration <= 0) then
			self.channeling = nil
			self:Hide()
			return
		end

		if(self.SafeZone) then
			local width = self:GetWidth()
			local _, _, ms = GetNetStats()
			-- MADNESS!
			local safeZonePercent = (width / self.max) * (ms / 1e5)
			if(safeZonePercent > 1) then safeZonePercent = 1 end
			self.SafeZone:SetWidth(width * safeZonePercent)
		end


		if self.Time then
			if self.delay ~= 0 then
				if(self.CustomDelayText) then
					self:CustomDelayText(duration)
				else
					self.Time:SetFormattedText("%.1f|cffff0000-%.1f|r", duration, self.delay)
				end
			else
				if(self.CustomTimeText) then
					self:CustomTimeText(duration)
				else
					self.Time:SetFormattedText("%.1f", duration)
				end
			end
		end

		self.duration = duration
		self:SetValue(duration)
		if self.Spark then
			self.Spark:SetPoint("CENTER", self, "LEFT", (duration / self.max) * self:GetWidth(), 0)
		end
	else
		self.unitName = nil
		self.channeling = nil
		self:SetValue(1)
		self:Hide()
	end
end

local Enable = function(object, unit)
	local castbar = object.Castbar
	if(unit and unit:match'%wtarget$') then return end

	if(castbar) then
		object:RegisterEvent("UNIT_SPELLCAST_SENT", UNIT_SPELLCAST_SENT)
		object:RegisterEvent("UNIT_SPELLCAST_START", UNIT_SPELLCAST_START)
		object:RegisterEvent("UNIT_SPELLCAST_FAILED", UNIT_SPELLCAST_FAILED)
		object:RegisterEvent("UNIT_SPELLCAST_STOP", UNIT_SPELLCAST_STOP)
		object:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", UNIT_SPELLCAST_INTERRUPTED)
		object:RegisterEvent("UNIT_SPELLCAST_DELAYED", UNIT_SPELLCAST_DELAYED)
		object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START", UNIT_SPELLCAST_CHANNEL_START)
		object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", UNIT_SPELLCAST_CHANNEL_UPDATE)
		object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_INTERRUPTED", 'UNIT_SPELLCAST_INTERRUPTED')
		object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", UNIT_SPELLCAST_CHANNEL_STOP)

		castbar.parent = object
		castbar:SetScript("OnUpdate", object.OnCastbarUpdate or onUpdate)

		if object.unit == "player" then
			CastingBarFrame:UnregisterAllEvents()
			CastingBarFrame.Show = noop
			CastingBarFrame:Hide()
		elseif(object.unit == 'pet') then
			PetCastingBarFrame:UnregisterAllEvents()
			PetCastingBarFrame.Show = noop
			PetCastingBarFrame:Hide()
		end

		if(not castbar:GetStatusBarTexture()) then
			castbar:SetStatusBarTexture[[Interface\TargetingFrame\UI-StatusBar]]
		end

		local spark = castbar.Spark
		if(spark and spark:IsObjectType'Texture' and not spark:GetTexture()) then
			spark:SetTexture[[Interface\CastingBar\UI-CastingBar-Spark]]
		end

		local sz = castbar.SafeZone
		if(sz and sz:IsObjectType'Texture' and not sz:GetTexture()) then
			sz:SetTexture(1, 0, 0)
		end

		castbar:Hide()

		return true
	end
end

local Disable = function(object, unit)
	local castbar = object.Castbar

	if(castbar) then
		object:UnregisterEvent("UNIT_SPELLCAST_SENT", UNIT_SPELLCAST_SENT)
		object:UnregisterEvent("UNIT_SPELLCAST_START", UNIT_SPELLCAST_START)
		object:UnregisterEvent("UNIT_SPELLCAST_FAILED", UNIT_SPELLCAST_FAILED)
		object:UnregisterEvent("UNIT_SPELLCAST_STOP", UNIT_SPELLCAST_STOP)
		object:UnregisterEvent("UNIT_SPELLCAST_INTERRUPTED", UNIT_SPELLCAST_INTERRUPTED)
		object:UnregisterEvent("UNIT_SPELLCAST_DELAYED", UNIT_SPELLCAST_DELAYED)
		object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_START", UNIT_SPELLCAST_CHANNEL_START)
		object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", UNIT_SPELLCAST_CHANNEL_UPDATE)
		object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_INTERRUPTED", UNIT_SPELLCAST_CHANNEL_INTERRUPTED)
		object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", UNIT_SPELLCAST_CHANNEL_STOP)

		castbar.parent = nil
		castbar:SetScript("OnUpdate", nil)
	end
end

oUF:AddElement('Castbar', function(...)
	UNIT_SPELLCAST_START(...)
	UNIT_SPELLCAST_CHANNEL_START(...)
end, Enable, Disable)
I did not change function OnUpdate, since I use the in the Layout...

Here my function OnUpdate:
Code:
local CastbarUpdate = function(self, elapsed)
	if self.casting then
		local duration = self.duration + elapsed
		if (duration >= self.max) then
			self.casting = nil
			self:Hide()
			return
		end
		if self.Time then
			if self.parent.unit == 'player' then
				if self.delay ~= 0 then
					self.Time:SetFormattedText('%.1f/|cffff0000%.1f|r', duration, self.max + self.delay)
				else
					self.Time:SetFormattedText('%.1f/%.1f', duration, self.max)
				end
			else
				self.Time:SetFormattedText('%.1f/%.1f', duration, self.max + self.delay)
			end
		end

		self.duration = duration
		self:SetValue(duration)

		if self.Spark then
			self.Spark:SetPoint('CENTER', self, 'LEFT', (duration / self.max) * self:GetWidth(), 0)
		end
	elseif self.channeling then
		local duration = self.duration - elapsed
		if(duration <= 0) then
			self.channeling = nil
			self:Hide()
			return
		end

		if self.Time then
			if self.parent.unit == 'player' then
				if self.delay ~= 0 then
					self.Time:SetFormattedText('%.1f/|cffff0000%.1f|r', duration, self.max - self.delay)
				else
					self.Time:SetFormattedText('%.1f/%.1f', duration, self.max)
				end
			else
				self.Time:SetFormattedText('%.1f/%.1f', duration, self.max - self.delay)
			end
		end

		self.duration = duration
		self:SetValue(duration)
		if self.Spark then
			self.Spark:SetPoint('CENTER', self, 'LEFT', (duration / self.max) * self:GetWidth(), 0)
		end
	else
		self.unitName = nil
		self.casting = nil
		self.channeling = nil
		self:SetValue(1)
		self:Hide()
	end
end

Last edited by Blood Druid : 02-04-09 at 07:48 AM.
Blood Druid is offline  
Unread 02-04-09, 08:13 AM   #217
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
I would honestly want to strip the safezone stuff out of the castbar if anything. At least until someone posts some hard numbers from testing.

Interruption was also changed slightly in 3.x, and I know that a lot of people complain about how every castbar add-on fails at doing safe zones correctly now.

You should also post diffs, as it's a lot easier to see what was actually changed in the code.

Another issue is that I can't do any testing atm. My graphics card died last weekend, and I will most likely remain without my main workstation for 1~3 months.
haste is offline  
Unread 02-04-09, 08:37 AM   #218
Blood Druid
A Fallenroot Satyr
Join Date: Oct 2008
Posts: 26
Unfortunately I do not possess skills of methods of testing of a code, well have not learnt
my method of testing is simple:
I come on lake into its most heat, I am there minutes 5 simply to catch all lags which is, then I try cast that
in a case in your code width safezone be similar ping which shows blizz ( GetNetStats() )
in my case I see a real delay a caste and it usually makes 2000-3000 ms at returned GetNetStats() 83ms

All that I can make it to remove 2 videos for 2 cases about that that occurs, if it is necessary
Blood Druid is offline  
Unread 02-25-09, 04:57 PM   #219
stako
A Murloc Raider
 
stako's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 6
Is there a way that I can put oUF in a sort of testing mode like you see in this screenshot?:

http://deponie.org/wow/WoWScrnShot_021409_002357.jpg
stako is online now  
Unread 02-25-09, 05:04 PM   #220
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by stako View Post
Is there a way that I can put oUF in a sort of testing mode like you see in this screenshot?:

http://deponie.org/wow/WoWScrnShot_021409_002357.jpg
No, there isn't any internal testing mod.
haste is offline  
Closed Thread

Go BackWoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - General discussion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off