WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Bug Reports (https://www.wowinterface.com/forums/forumdisplay.php?f=90)
-   -   Temporary Fix to new class bars (https://www.wowinterface.com/forums/showthread.php?t=36226)

Xrystal 10-25-10 08:20 AM

Temporary Fix to new class bars
 
4 Attachment(s)
Whilst I've been using other addons for my warlock and paladin they have other elements that I do not need.

Now, seeing as we are patiently ( stress on the last word there ) waiting for an update to include the new bars I thought I would rig up a temporary work around to allow us to place the bars where we want them for now and have nUI keep track of them for us. How nice of nUI to do that for us rofl.

I won't upload this addon as an official addon as it is only temporary in nature to use in the interim if you don't like the functionality of the other addons being used instead.

I don't have a boomkin to test the eclipse bar on but I have set it up to work the same as the other bars so should work fine.

Just use /nui movers and you should see mover frames for them. However, the Shaman totem timer buttons I have automatically attached to the shaman totem bar to have them appear directly underneath the totem button that they reflect. Blizz deals with updating it however, all I did was reparent the timer bar to the totem bar and reposition the individual buttons.

For those that want to see exactly what I did .. here's the code segment for each bar:
Code:

local function PTM_WSSInit()
       
        ShardBarFrame:SetParent(nil);
        ShardBarFrame:SetParent(UIParent);
        ShardBarFrame:SetPoint("CENTER");
        if ShardBarFrame then nUI_Movers:lockFrame( ShardBarFrame, true, "nUI_XShardBarFrame" ); end
       
end

local function PTM_STBInit()

        TotemFrame:SetParent(nil);
        TotemFrame:SetParent(MultiCastActionBarFrame);
        TotemFrameTotem1:SetPoint("TOPLEFT",MultiCastActionButton1,"BOTTOMLEFT");
        TotemFrameTotem2:SetPoint("TOPLEFT",MultiCastActionButton2,"BOTTOMLEFT");
        TotemFrameTotem3:SetPoint("TOPLEFT",MultiCastActionButton3,"BOTTOMLEFT");
        TotemFrameTotem4:SetPoint("TOPLEFT",MultiCastActionButton4,"BOTTOMLEFT");
end

local function PTM_PPBInit()
       
        PaladinPowerBar:SetParent(nil);
        PaladinPowerBar:SetParent(UIParent);
        PaladinPowerBar:SetPoint("CENTER");
        if PaladinPowerBar then nUI_Movers:lockFrame( PaladinPowerBar, true, "nUI_XPaladinPowerBar" ); end

end

local function PTM_DEBInit()
        EclipseBarFrame:SetParent(nil);
        EclipseBarFrame:SetParent(UIParent);
        EclipseBarFrame:SetPoint("CENTER");
        if EclipseBarFrame then nUI_Movers:lockFrame( EclipseBarFrame, true, "nUI_XDruidEclipseBar" ); end
end

And below is the link to the addon itself and some screenshots of them working .. well apart from the druid one that is.

Nightspirit 10-25-10 08:54 AM

YAY! First time I see my shards since 4.0.1 hit :p

Or do I? It always shows 2 shards for some reason. nUI error, Blizzard error or user error (aka PEBKAC)?

Xrystal 10-25-10 09:09 AM

1 Attachment(s)
Hmm, good point .. maybe the update routines aren't being triggered .. I'm on my pally so will test that one. Then I'll test the warlock one out .. my apologies if it's not working properly *sigh*.


Edit:
Okay, think I realise now why people use a fake player frame to do this rofl. They use a getparent.unit value that gets updated on target change. Will incorporate the new changes and yes, thoroughly test it out on the two classes at least :D My apologies again for missing out that vital ingredient :D

Okay, seems to be working .. holy power and soul shards being visually displayed when being filled and used. The same change worked for both so hopefully it will work for the druids.

Nightspirit 10-25-10 09:15 AM

Seeing the shards in my local wow install made me happy already, having it actually work will give new excitement. When you get it to work, you made me happy twice ;)

tinyu 10-25-10 09:41 AM

i got this error after installing this temp fix "addon"

Code:

Date: 2010-10-26 02:10:43
ID: 3
Error occured in: Global
Count: 1
Message: ..\FrameXML\PaladinPowerBar.lua line 16:
  Usage: UnitPower("unit"[, type])
Debug:
  [C]: ?
  [C]: UnitPower()
  ..\FrameXML\PaladinPowerBar.lua:16: PaladinPowerBar_Update()
  ..\FrameXML\PaladinPowerBar.lua:73:
      ..\FrameXML\PaladinPowerBar.lua:60


Xrystal 10-25-10 09:43 AM

Yep, that was the problem tinyu. I didn't realise that they were using self:GetParent().unit to validate the shard/power level which of course would be nil unless set. So, the main addon frame has become a fake player frame with a unit value set to whatever the playerframe's unit is set to on target change. Seems to work now with my initial tests on both warlock and paladin.

tinyu 10-25-10 09:49 AM

sounds great cant wait for the upload

Xrystal 10-25-10 09:53 AM

1 Attachment(s)
okay, new file .. I posted in the earlier reply but I'll post here as well :D

tinyu 10-25-10 10:04 AM

got the same error again

Code:

Date: 2010-10-26 02:33:49
ID: 3
Error occured in: Global
Count: 6
Message: ..\FrameXML\PaladinPowerBar.lua line 16:
  Usage: UnitPower("unit"[, type])
Debug:
  [C]: ?
  [C]: UnitPower()
  ..\FrameXML\PaladinPowerBar.lua:16: PaladinPowerBar_Update()
  ..\FrameXML\PaladinPowerBar.lua:73:
      ..\FrameXML\PaladinPowerBar.lua:60


Xrystal 10-25-10 10:10 AM

Hmm weird, playing my pally now doing dailies with no errors .. can you remember what you're doing when that happens ?

Nightspirit 10-25-10 10:10 AM

It works for Warlocks now, as long as I changed target at least once. Fair enough for such quick code.

Thank you very much!:D

tinyu 10-25-10 10:14 AM

Quote:

Originally Posted by Xrystal (Post 213976)
Hmm weird, playing my pally now doing dailies with no errors .. can you remember what you're doing when that happens ?

logging in :D

Xrystal 10-25-10 10:19 AM

ah .. one test I didn't do tinyu and probably the cause of the warlock glitch .. let me test that in a bit and see if I get the same effect.


Edit:
Hmm, just logged out to desktop with my pally and logged back into game .. not in combat mind you if thats the difference, no error in bugsack *sigh*

You are using the (2) version right ?


As to the warlock buglet .. try adding the following line before the UnregisterEvent line in the OnEvent function. Theoretically that will refresh things regardless of a target change when you first log in or reloadui. It may resolve your paladin problem too tinyu .. not being able to get the error I don't know for sure though.

self.unit = PlayerFrame.unit;

tinyu 10-25-10 10:35 AM

Quote:

Originally Posted by Xrystal (Post 213982)
ah .. one test I didn't do tinyu and probably the cause of the warlock glitch .. let me test that in a bit and see if I get the same effect.


Edit:
Hmm, just logged out to desktop with my pally and logged back into game .. not in combat mind you if thats the difference, no error in bugsack *sigh*

You are using the (2) version right ?


As to the warlock buglet .. try adding the following line before the UnregisterEvent line in the OnEvent function. Theoretically that will refresh things regardless of a target change when you first log in or reloadui. It may resolve your paladin problem too tinyu .. not being able to get the error I don't know for sure though.

self.unit = PlayerFrame.unit;

I sure am using the (2) version, and i was out of combat when it happened.

Nightspirit 10-25-10 10:56 AM

Quote:

Originally Posted by Xrystal (Post 213982)
self.unit = PlayerFrame.unit;

Does work. I can now be a good Warlock :p

Edit: Bad news! I logged out with 0 shards, logged in with, well... 0 ofc :p It showed 3 shards on login, casting Soul Harvest lead to:
Code:

Message: Interface\FrameXML\ShardBar.lua:79: attempt to index a nil value
Time: 10/25/10 18:59:16
Count: 4
Stack: Interface\FrameXML\ShardBar.lua:79: in function <Interface\FrameXML\ShardBar.lua:74>

Locals: self = ShardBarFrame {
 shard1 = ShardBarFrameShard1 {
 }
 showAnim = <unnamed> {
 }
 ClearAllPoints = <function> defined @Interface\AddOns\nUI\Plugins\nUI_Movers.lua:474
 SetPoint = <function> defined @Interface\AddOns\nUI\Plugins\nUI_Movers.lua:473
 shard2 = ShardBarFrameShard2 {
 }
 shard3 = ShardBarFrameShard3 {
 }
 SetAllPoints = <function> defined @Interface\AddOns\nUI\Plugins\nUI_Movers.lua:472
 0 = <userdata>
}
event = "UNIT_POWER"
arg1 = "player"
arg2 = "SOUL_SHARDS"
(*temporary) = nil
(*temporary) = ShardBarFrame {
 shard1 = ShardBarFrameShard1 {
 }
 showAnim = <unnamed> {
 }
 ClearAllPoints = <function> defined @Interface\AddOns\nUI\Plugins\nUI_Movers.lua:474
 SetPoint = <function> defined @Interface\AddOns\nUI\Plugins\nUI_Movers.lua:473
 shard2 = ShardBarFrameShard2 {
 }
 shard3 = ShardBarFrameShard3 {
 }
 SetAllPoints = <function> defined @Interface\AddOns\nUI\Plugins\nUI_Movers.lua:472
 0 = <userdata>
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index a nil value"

Hmm, now I can't recreate that error. It might have been Cogwheel's Fault (don't ask me why I had it here...)

spiel2001 10-25-10 11:01 AM

Thank you Xrystal

/hug

Xrystal 10-25-10 11:02 AM

ok nightspirit .. remove that code for now .. go back to the slightly glitched version rather than the definite error one :D

I'll see what I can figure out there rofl ..

Nightspirit 10-25-10 11:04 AM

I take it back, please read up for my insane ****up :p

Seer 10-25-10 11:33 AM

Quote:

Originally Posted by spiel2001 (Post 214000)
Thank you Xrystal

/hug

And no touchi.. ah what the hell.

*hugs Xrystal as well.

Xrystal 10-25-10 11:37 AM

Quote:

Originally Posted by Nightspirit (Post 214003)
I take it back, please read up for my insane ****up :p

Rofl, well doing a minor change as I noticed a little bug of my own :D


All times are GMT -6. The time now is 04:28 PM.

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