Hiding Cooldown
Starting with latest oUF and oUF_Ammo layout. I'm using OmniCC for cooldown numbers, but I'd prefer not to show the numbers or clock animation.
I found the block of code in aura.lua that shows or hides the cooldown on the icon, but I haven't been able to figure out what code to call in oUF_Ammo to turn it off permanently. I can, of course, comment out the block of code, but then I'd have to do that every time I get a new version. I also tried creating my own PostUpdateAuraIcon like looked like this: Code:
-- params omitted for brevity |
Code:
local function PostCreateAuraIcon(self, button, icons, index, debuff) |
Quote:
|
Well, phooey. I originally tried adding button.cd:Hide() to auraIcon in oUF_Ammo. That's the name of the function that overloaded PostCreateAuraIcon.
Here is what I tried for that: Code:
local function auraIcon(self, button, icons, index, debuff) |
Quote:
Add a "noCooldownCount" entry for it. i.e. Code:
<cooldownframe>.noCooldownCount = true |
Aight, progress, by using
Code:
self:SetScript("OnEnter", function(self) Haste explained this Quote:
|
I'm setting up player auras and wanted to have them displayed with a numeric duration next to them, like Elk's BuffBars (just time, I don't care about bars).
Looking at the Blizzard API's, it seems like you're only supposed to be able to get durations for things you cast. Elk's code gets around this (I think) with the follow type of code: Code:
local buffIndex, untilCancelled = GetPlayerBuff(index, "HELPFUL") I think I can duplicate this, but I'd love two pointers: 1. Is PostUpdateAuraIcon() the hook I want to be using for this? It seems to have the information I want and is per-aura. 2. If so, why is the 'index' parameter a table? Still noobish with this stuff. |
Quote:
Code:
self:PostUpdateAuraIcon(icons, unit, icon, index, offset, filter, isDebuff) |
Fixing my faulty parameterization makes complete sense.
As to EBB, I suppose it's a good thing that I'm only interested in Buffs then. That code snippet was from EBB code, but likely from a incorrect context. Since I could can query the auras now *cough*, it should be easier to play with and figure out. |
Code:
Code:
self.Experience:SetScript("OnEnter", function(self) |
Quote:
|
Quote:
I was looking through the aura.lua code, saw only references to UnitBuff() and the like. Those functions only return durations on stuff cast by the player, so I thought that was the limitation. Getting information in a general way seems like the best method of doing things, so I didn't even think to search for a player specific version of those functions. GetPlayerBuffTimeLeft() is the ticket. Lesson learned. Thanks for the help! |
Quote:
Quote:
Quote:
|
Is there a way to show temp enhancements (Weapon Buffs) in the aura?
|
Take a look at my raid layout (oUF Perfect), its based on pure tags for text
|
Quote:
|
I came across a bizzare situation while setting up oUF. I don't think it's strictly related to oUF, but hopefully the bright minds reading this thread will have an idea as to why it happens.
Basically I spawned the party header, and no matter what I did the party members didn't show up. Calling :Show() on the party header manually would show the party for a split second then it would be hidden again. After long time of scratching my head, I decided to disable the other addons I use, and the party showed just fine. Then I enabled my addons one by one and narrowed down the problem to ClearFont2: if I have ClearFont2 enabled, oUF party header won't show up, if I disable it, the party shows up. This strikes me as quite a strange issue, I can't see what the link is between a secure party header and ClearFont2. Could it be that enabling CF2 loads a library that messes the header up? I'd appreciate if anybody has an idea on the cause of this, and even more how I could go about debugging this issue. What can affect the visibility of the header, generally speaking? Thanks in advance! |
A easy way to debug it is by doing the following on your header:
Code:
local Hide = party.hide |
Exp mouseover take 2
Aight, still on about the experience mouseover thingy, but with some progress this time.
It's now working correctly, 'almost', with the following code in the exp block of the layout, the exp bar + tooltip shows and hides on mouseover as expected. There is one very small issue left, on login or /rl, i have to mouseover the player frame before it starts working. If i don't do that, when i mouseover the exp bar only the tooltip is shown, not the bar itself. Code:
self:SetScript("OnEnter", function(self) |
Not to be completely evil (but quite a bit). Think about exactly what you logically want to do (all the steps of hooking and calling), and what you are doing now.
Or put in another way: Explain to yourself exactly what your code does every time you execute those two functions. |
All times are GMT -6. The time now is 08:16 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI