Thread Tools Display Modes
Unread 10-25-10, 08:20 AM   #1
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
Temporary Fix to new class bars

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.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_102510_145819.jpg
Views:	828
Size:	276.0 KB
ID:	5082  Click image for larger version

Name:	WoWScrnShot_102510_145845.jpg
Views:	795
Size:	259.2 KB
ID:	5083  Click image for larger version

Name:	WoWScrnShot_102510_145907.jpg
Views:	792
Size:	222.0 KB
ID:	5084  
Attached Files
File Type: zip nUI_Plugin_TempMovers.zip (1.4 KB, 599 views)
__________________
Xrystal is offline  
Unread 10-25-10, 08:54 AM   #2
Nightspirit
A Cyclonian
 
Nightspirit's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 44
YAY! First time I see my shards since 4.0.1 hit

Or do I? It always shows 2 shards for some reason. nUI error, Blizzard error or user error (aka PEBKAC)?
Nightspirit is offline  
Unread 10-25-10, 09:09 AM   #3
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
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 My apologies again for missing out that vital ingredient

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.
Attached Files
File Type: zip nUI_Plugin_TempMovers (2).zip (1.4 KB, 504 views)
__________________

Last edited by Xrystal : 10-25-10 at 09:42 AM.
Xrystal is offline  
Unread 10-25-10, 09:15 AM   #4
Nightspirit
A Cyclonian
 
Nightspirit's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 44
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
Nightspirit is offline  
Unread 10-25-10, 09:41 AM   #5
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 816
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
__________________


"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
tinyu is offline  
Unread 10-25-10, 09:43 AM   #6
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
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.
__________________
Xrystal is offline  
Unread 10-25-10, 09:49 AM   #7
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 816
sounds great cant wait for the upload
__________________


"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
tinyu is offline  
Unread 10-25-10, 09:53 AM   #8
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
okay, new file .. I posted in the earlier reply but I'll post here as well
Attached Files
File Type: zip nUI_Plugin_TempMovers (2).zip (1.4 KB, 515 views)
__________________
Xrystal is offline  
Unread 10-25-10, 10:04 AM   #9
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 816
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
__________________


"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
tinyu is offline  
Unread 10-25-10, 10:10 AM   #10
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
Hmm weird, playing my pally now doing dailies with no errors .. can you remember what you're doing when that happens ?
__________________
Xrystal is offline  
Unread 10-25-10, 10:10 AM   #11
Nightspirit
A Cyclonian
 
Nightspirit's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 44
It works for Warlocks now, as long as I changed target at least once. Fair enough for such quick code.

Thank you very much!
Nightspirit is offline  
Unread 10-25-10, 10:14 AM   #12
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 816
Originally Posted by Xrystal View Post
Hmm weird, playing my pally now doing dailies with no errors .. can you remember what you're doing when that happens ?
logging in
__________________


"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
tinyu is offline  
Unread 10-25-10, 10:19 AM   #13
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
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;
__________________

Last edited by Xrystal : 10-25-10 at 10:28 AM.
Xrystal is offline  
Unread 10-25-10, 10:35 AM   #14
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 816
Originally Posted by Xrystal View Post
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.
__________________


"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
tinyu is offline  
Unread 10-25-10, 10:56 AM   #15
Nightspirit
A Cyclonian
 
Nightspirit's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 44
Originally Posted by Xrystal View Post
self.unit = PlayerFrame.unit;
Does work. I can now be a good Warlock

Edit: Bad news! I logged out with 0 shards, logged in with, well... 0 ofc 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...)

Last edited by Nightspirit : 10-25-10 at 11:07 AM.
Nightspirit is offline  
Unread 10-25-10, 11:01 AM   #16
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Thank you Xrystal

/hug
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 10-25-10, 11:02 AM   #17
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
ok nightspirit .. remove that code for now .. go back to the slightly glitched version rather than the definite error one

I'll see what I can figure out there rofl ..
__________________
Xrystal is offline  
Unread 10-25-10, 11:04 AM   #18
Nightspirit
A Cyclonian
 
Nightspirit's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 44
I take it back, please read up for my insane ****up

Last edited by Nightspirit : 10-25-10 at 11:11 AM.
Nightspirit is offline  
Unread 10-25-10, 11:33 AM   #19
Seer
A Molten Giant
Join Date: Dec 2007
Posts: 649
Originally Posted by spiel2001 View Post
Thank you Xrystal

/hug
And no touchi.. ah what the hell.

*hugs Xrystal as well.
__________________
Take it as you want or leave it as it is.
Seer is offline  
Unread 10-25-10, 11:37 AM   #20
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,035
Originally Posted by Nightspirit View Post
I take it back, please read up for my insane ****up
Rofl, well doing a minor change as I noticed a little bug of my own
__________________
Xrystal is offline  
 

Go BackWoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Support » nUI: Bug Reports » Temporary Fix to new class bars

Thread Tools
Display Modes

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