Thread Tools Display Modes
08-19-10, 08:59 AM   #1
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Castbar Error?

Hello, i've been trying to add "ms" to appear on my castbar, but it doesnt seem to want to appear... for some reason? so i wounder if anyone chould help me and maybe can see the error, i've done wrong..

full lua: http://pastebin.com/2S5EZg0U

in the end it should be like this: http://s.wowinterface.com/preview/pvw38103.png

Last edited by Aftermathhqt : 08-19-10 at 09:22 AM.
  Reply With Quote
08-20-10, 07:49 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Assuming you are using 1.4:

Line 347-348
Code:
self.Castbar.PostCastStart = UpdateCastStart
self.Castbar.PostChannelStart = UpdateChannelStart
You would also need to update the Post hook functions to support this.
See arguments: http://github.com/haste/oUF/blob/8a3...astbar.lua#L59
  Reply With Quote
08-20-10, 09:36 AM   #3
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
I already has this hook. at line 148-180 ^^ and the problem is the "ms" text is not appearing

Code:
local function UpdateChannelStart(self, event, unit, name, rank, text) 
    if (self.Castbar.Latency) then
        self.Castbar.Latency:ClearAllPoints()
        self.Castbar.Latency:SetPoint('LEFT', self.Castbar, 'BOTTOMLEFT', 1, -1) 
        
        local _, _, ms = GetNetStats()
        self.Castbar.Latency:SetText(ms..'ms')
    end

	if (self.Castbar.SafeZone) then
        self.Castbar.SafeZone:SetDrawLayer('ARTWORK')
        self.Castbar.SafeZone:SetPoint('TOPLEFT', self.Castbar)
        self.Castbar.SafeZone:SetPoint('BOTTOMLEFT', self.Castbar)
	end
end

    -- custom casting function
    
local function UpdateCastStart(self, event, unit, name, rank, text, castid)
    if (self.Castbar.Latency and unit == 'player') then
        self.Castbar.Latency:ClearAllPoints()
        self.Castbar.Latency:SetPoint('RIGHT', self.Castbar, 'BOTTOMRIGHT', -1, -1) 
        
        local _, _, ms = GetNetStats()
        self.Castbar.Latency:SetText(ms..'ms')
    end

	if (self.Castbar.SafeZone) then
        self.Castbar.SafeZone:SetDrawLayer('BORDER')
        self.Castbar.SafeZone:SetPoint('TOPRIGHT', self.Castbar)
        self.Castbar.SafeZone:SetPoint('BOTTOMRIGHT', self.Castbar)
	end
end

Last edited by Aftermathhqt : 08-20-10 at 10:01 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Castbar Error?


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