Thread Tools Display Modes
09-07-12, 11:38 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Runebar bug

I tested my new runebar module and found a bug with the color init.

This does not return the correct value for me on the first login of a character:
https://github.com/haste/oUF/blob/ma...nebar.lua#L119

Changing that to:
Code:
UpdateType(self, nil, i, floor((i+1)/2))
fixed it. (holy and frost where swapped)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 09-07-12 at 11:40 AM.
  Reply With Quote
09-08-12, 06:13 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
The correct order should be death/blood, frost, unholy. Isn't this what you were seeing?
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-08-12, 07:12 AM   #3
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by haste View Post
The correct order should be death/blood, frost, unholy. Isn't this what you were seeing?
zork is right, with your implementation we get order of blood, unholy, frost. I did a small test: logged in and then reloaded UI, and here is what i've got

  Reply With Quote
09-08-12, 07:50 AM   #4
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
No, your forgetting that the API returns the incorrect order, which is why we have the runemap to re-arrange it. The API returns blood, unholy and frost.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-08-12, 08:17 AM   #5
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Another test, using oUF from github



As you can see, I’ve got the order of blood, unholy, frost, but that's only colors, 'cause when i use any spell, which consumes unholy rune, the blue one (on the left side of a picture) recharges
Then i reloaded UI and I’ve got correct order, 'cause oUF uses data returned by GetRuneType(rid) instead of alt in this line:
Lua Code:
  1. local colors = self.colors.runes[GetRuneType(rid) or alt]
May be there is an error in some other place because of that usage of runemap, but there IS an error.
The way i created that runebar is the same as the one in an example code of runebar.lua

Last edited by lightspark : 09-08-12 at 08:33 AM.
  Reply With Quote
09-08-12, 08:20 AM   #6
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
That is exactly what my tests turned out aswell.
On first login of a char (not reload) GetRuneType is using a wrong value.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
09-08-12, 09:17 AM   #7
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
I'm actually unable to re-create this. Even gave it a whirl with 64-bit WoW to see if it made any difference.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-08-12, 10:08 AM   #8
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Haha, I've got it After rewriting the code for 5.0.4, I forgot to put Spawn and SetActiveStyle functions inside oUF:Factory. I just used those functions without it.
Previously I had this:
Lua Code:
  1. oUF:SetActiveStyle("Player")
  2. oUF:Spawn("player", "oUF_PlayerFrame")
and I've got the same bug as zork did, now i changed code to this:
Lua Code:
  1. oUF:Factory(function(self)
  2.     self:SetActiveStyle("Player")
  3.     self:Spawn("player", "oUF_PlayerFrame")
  4. end)
and everything works just fine
  Reply With Quote
09-08-12, 10:09 AM   #9
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Nice! I'll dig into it then.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-08-12, 10:33 AM   #10
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
And one more test, haste, there IS a bug with alt
Previously I checked the value returned by GetRuneType and alt, but I didn't check the order in which runes are created.
So, I gave names to all the runes I wanna spawn and then I get them via GetName() on the first call of UpdateType Runes are created in this order 1, 2, 5, 6, 3, 4, so there is no need to make alt be 1, 1, 3, 3, 2, 2, because runes already are in correct(required) order.



P.S. I'm afraid I'm some kind of captain obvious right now and everyone except me already knew it
P.P.S. Remove maintank.lua from oUF.xml

Last edited by lightspark : 09-08-12 at 11:25 AM.
  Reply With Quote
09-08-12, 12:49 PM   #11
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Pushed.

https://github.com/haste/oUF/compare...d...83a12d7830
__________________
「貴方は1人じゃないよ」
  Reply With Quote
09-08-12, 08:03 PM   #12
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Wouldn't it be helpful to pass runeReady along to PostUpdateRune, so we don't have to call GetRuneCooldown again?
  Reply With Quote
09-09-12, 12:53 AM   #13
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Thanks, somehow managed to miss the potential arguments while adding those.

https://github.com/haste/oUF/compare...0...aa453967bf
__________________
「貴方は1人じゃないよ」
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Runebar bug


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