WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   self.Power.frequentUpdates = true for pets (https://www.wowinterface.com/forums/showthread.php?t=22521)

zork 04-19-09 01:40 PM

self.Power.frequentUpdates = true for pets
 
When I try adding self.Power.frequentUpdates = true for unit == "pet" I get a Lua error.

Screenshot:
http://img2.abload.de/img/wowscrnsho...09_213av4p.jpg

Am I doing something wrong? Pets are allowed to use frequentupdates or not?

p3lim 04-19-09 02:05 PM

Its a bug haste forgot during the new event system.

haste 04-20-09 05:27 AM

Quote:

Originally Posted by zork (Post 128817)
When I try adding self.Power.frequentUpdates = true for unit == "pet" I get a Lua error.

Screenshot:
http://img2.abload.de/img/wowscrnsho...09_213av4p.jpg

Am I doing something wrong? Pets are allowed to use frequentupdates or not?

Is the power frame correctly parented? It seems to me that you have a power frame that isn't. Since your UNIT_MAXMANA is nil on the parent that is.

If it is: Could you do a dump on the parent of the power frame? or tell me what layout this is on so I can test myself.

Also it's really better to post possible bug issues on my portal. I always go through them before I start looking it posts. In this case there isn't enough information to do a fix, but if it had then I would have to do an extra minor version "just" for this.
Quote:

Originally Posted by p3lim (Post 128821)
Its a bug haste forgot during the new event system.

Most likely not, but based on your comment you've already had this issue without reporting it.

p3lim 04-20-09 06:23 AM

Quote:

Originally Posted by haste (Post 129098)
Most likely not, but based on your comment you've already had this issue without reporting it.

I havent, but looking at the code it seems it still uses the old event system:
Code:

local OnPowerUpdate
do
        local UnitMana = UnitMana
        OnPowerUpdate = function(self)
                if(self.disconnected) then return end
                local power = UnitMana(self.unit)

                if(power ~= self.min) then
                        self.min = power

                        self:GetParent():UNIT_MAXMANA("OnPowerUpdate", self.unit)
                end
        end
end


haste 04-20-09 07:17 AM

That code is still valid for the new system.

zork 04-20-09 07:35 AM

I will post the code on the Bug Report Portal.

Edit haste's tip was correct. I was using self.Power = CreateFrame("StatusBar", nil, self.Health), after I changed that to self.Power = CreateFrame("StatusBar", nil, self) it worked.

Scound 04-22-09 06:19 AM

I have experienced the exact same issue, but for all my powerframes - I already posted it in "oUF - Layout discussion": http://www.wowinterface.com/forums/s...=18363&page=50

I suppose referencing the powerbar to the frame itself insted of the healthbar might do the trick for me too - will check later today. Thanks.

However, why isn't it possible to parent the healthbar-frame to the powerbar one?

haste 04-22-09 06:30 AM

Quote:

Originally Posted by Scound (Post 129957)
However, why isn't it possible to parent the healthbar-frame to the powerbar one?

frequentUpdates makes oUF call the function which updates power/health on a poll basis instead of event. It does however still use events for some updates, so oUF needs to be able to call the event function.

It's possible to solve this in a different manner now, but I haven't seen a reason to change it. Except for the two cases you have here.

Scound 04-23-09 01:42 AM

Well, tried it and everything is working perfectly now - Thanks...


All times are GMT -6. The time now is 09:32 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI