View Single Post
10-02-08, 10:08 AM   #13
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Weird, i'm sure i tried to change the portrait level before and it didn't work for some reason, now it does. Anyway thanks, though i don't know yet if i like the result or not

Anyway, i'd like to understand something, since i've added portraits, i've created a "fake" frame above them so they don't look so flat, i've anchored a few things to that "fake" frame, like health value, power value and so on and it works just fine. But, when i try to do the same with Druidmana, it works but return an error. I'm not sure to understand it because it works for everything else using the exact same method, why not for Druidmana.

Code:
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:56: attempt to index local 'parent' (a nil value)
Count: 1

Call Stack:
[C]: ?
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:56: in function <Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:55>
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:464: in function `style'
Interface\AddOns\oUF\ouf.lua:212: in function <Interface\AddOns\oUF\ouf.lua:206>
Interface\AddOns\oUF\ouf.lua:269: in function <Interface\AddOns\oUF\ouf.lua:266>
Interface\AddOns\oUF\ouf.lua:323: in function `Spawn'
Interface\AddOns\oUF_Caellian\oUF_Caellian.lua:614: in main chunk
Line 464 being my SetFontString
Code:
	if(IsAddOnLoaded('oUF_DruidMana')) then
		if(portraits == true) then
			self.DruidManaText = SetFontString(self.Portrait2, font, 10)
			self.DruidManaText:SetPoint('CENTER', 0, 1)
			self.DruidManaText:SetTextColor(1, .49, .04)
		else
			self.DruidManaText = SetFontString(self.Health, font, 10)
			self.DruidManaText:SetPoint('CENTER', 0, 1)
			self.DruidManaText:SetTextColor(1, .49, .04)
		end
	end
In the following example it's working just fine
Code:
		if(portraits == true) then
			self.CombatFeedbackText = SetFontString(self.Portrait2, fontnum, 18, 'OUTLINE')
			self.CombatFeedbackText:SetPoint('CENTER', 0, 1)
		else
			self.CombatFeedbackText = SetFontString(self.Health, fontnum, 18, 'OUTLINE')
			self.CombatFeedbackText:SetPoint('CENTER', 0, 1)
		end
Another question, i want to hide my target's name if it's casting and display the castbar text instead.
This didn't work, apparently self.Castbar.Text:GetText()) is not correct, is there any other way ? (only the hide part doesn't work here, the rest is fine, i just paste the whole thing)
Code:
	if(unit == 'target') then
		self.Name:ClearAllPoints()
		if(not self.Castbar.Text:GetText()) then
			if(self.Power.value:GetText()) then
				self.Name:SetPoint('CENTER', 0, 1)
			else
				self.Name:SetPoint('LEFT', 1, 1)
			end
		else
			self.Name:Hide()
		end
	end
Note: WTB [tt] tag plz ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 10-03-08 at 01:47 PM.