|
|
#121 | |
|
Senior Member
|
Quote:
I would hope even players who have never touched code before take a look at LuaTexts and experiment. If you have customised your DogTags, you are already a programmer! Who knows, maybe LuaTexts will be your window into the exciting and rewarding world of addon creation! Go forth and Lua! :P |
|
|
|
|
|
|
#122 |
|
Member
Join Date: Sep 2008
Posts: 16
|
thank you! I have switched health over so far and it really seemed to make a big difference. I also switched over my buff display so I can see only hots and beacon of light and sacred shield and that seemed to go okay although I might try to figure out how to consolidate all the Healing over time spells into just one icon if any of them are present.
I was working on my debuffs and I definately can figure out how to do slag pot, etc... and am okay with those displaying as an icon. However, for poison, magic, curse, and disease I have a custom dog tag to show these as little colored asterix. Code:
[(if HasPoisonDebuff = true then
"*":Green
end) (if HasMagicDebuff = true then
"*":Color("00BFFF")
end) (if HasDiseaseDebuff = true then
"*":Yellow
end) (if HasCurseDebuff = true then
"*":Fuchsia
end)]
thanks again! |
|
|
|
|
|
#123 |
|
Senior Member
|
There is frame and/or border highlighting for each of those. I think if you want to do it with LuaTexts, you'll probably need to loop through all 40 possible auras with UnitDebuff()
Here's the basic framework for such a loop, I think you get the idea. Code:
for i=1,40 do
local type = UnitDebuff(unit, i, false)
if type == "Poison" then
-- do your poison colouring thing here
end
-- branch for other debuff types Magic, Disease, Curse...
end
-- use your colour on the asterisk
Just remember that you need to have the right events toggled for this to be updated properly: UNIT_AURA |
|
|
|
|
|
#124 | |
|
Hero Member
Join Date: Feb 2007
Posts: 558
|
Quote:
b) I'd encourage you to use UnitAura() now. UnitDebuff() is just a wrapper for it anyway. No reason to incur an extra function call just to figure out the options for you. UnitDebuff(unit, i) == UnitAura(unit, i, "HARMFUL") |
|
|
|
|
|
|
#125 |
|
Hero Member
Join Date: Feb 2007
Posts: 558
|
|
|
|
|
|
|
#127 |
|
Newbie
Join Date: Jan 2009
Posts: 8
|
Is there any way of returning a Classification without the need for a gap if the target is a normal mob? At the moment I'm using the following for target class text:
Code:
if UnitIsPlayer(unit) then return "Level %s %s %s",Level(unit),SmartRace(unit),Class(unit) else return "Level %s %s %s",Level(unit),Classification(unit) or '',SmartRace(unit) end |
|
|
|
|
|
#129 | |
|
Hero Member
Join Date: Feb 2007
Posts: 558
|
Quote:
Code:
if UnitIsPlayer(unit) then
return "Level %s %s %s",Level(unit),SmartRace(unit),Class(unit)
else
local classification = Classification(unit)
if classification then
return "Level %s %s %s",Level(unit),classification,SmartRace(unit)
else
return "Level %s %s",Level(unit),SmartRace(unit)
end
end
|
|
|
|
|
|
|
#130 |
|
Senior Member
|
I'd be more inclined to create separate LuaTexts for each of Level, Classification and Race. That way, PitBull's layout system will automatically put spacing in there. I do have to wonder though if the spacing around texts/indicators is properly omitted for empty/absent ones, but everything looks fine on my layout.
Separate but properly ordered texts means you have (what I feel is) better mirror behaviour. If you always want Race to be closer to the centre of the frame than Level, no matter what way 'round the frame is mirrored, then this is the way to accomplish that. Of course, if you don't mirror horizontally for some frames then it's neither here nor there.
|
|
|
|
![]() |
| Tags |
| luatexts |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
All times are GMT. The time now is 08:11 AM.
WowAce Forums









