Thread Tools Display Modes
02-20-14, 12:07 PM   #1
Falleneu
A Deviate Faerie Dragon
Join Date: Aug 2010
Posts: 12
Small bug in my nameplate addon, need help of lua genius to fix.

Hey, let me start off with, i am a total noob when it comes to this, I can read and understand most of it and change small things around but writing my own piece of lua is completely out of my reach.
I understand I could swap nameplates but I am simply quite fond of these.


I use sh_nameplates, i changed a bunch of things around to make the look suit my taste.
Only problem is ever since blizzard introduced showing spellcasts on all nameplates and not just the primary target they dont update the spell name correctly on all nameplates bar my primary target, the addon hasn't been updated in ages. Example, if i target a shaman casting elemental blast, everyone around me will cast elemental blast when they cast a spell. The icon DOES update correctly, but the color indicator for interrupting and the spell name does not. If I then stop targeting alltogether all nameplates will still show the last spell i saw on my primary target, so in this case elemental blast. If I haven't targeted anything which has casted a spell from the moment I loggedin, then it will simply not show a name.

Thanks in advance for any help.

The attachment is my adjusted version of the nameplates.
Attached Files
File Type: zip shNameplates.zip (267.3 KB, 210 views)

Last edited by Falleneu : 02-20-14 at 12:10 PM.
  Reply With Quote
02-20-14, 09:09 PM   #2
Oppugno
A Fallenroot Satyr
Join Date: Sep 2012
Posts: 22
Give this a whirl.
Attached Files
File Type: lua shNameplates.lua (28.2 KB, 183 views)
  Reply With Quote
02-21-14, 07:07 AM   #3
Falleneu
A Deviate Faerie Dragon
Join Date: Aug 2010
Posts: 12
Originally Posted by Oppugno View Post
Give this a whirl.
Spellnames no longer shows all together, BUT the color interrupt indicator of the castbar does update correctly now.

Thank you for all the help so far <3.
  Reply With Quote
02-21-14, 10:09 AM   #4
Oppugno
A Fallenroot Satyr
Join Date: Sep 2012
Posts: 22
Did you replace the previous 'shNameplates.lua' file in the addon folder with the attached one?
Does the cast time / remaining time still show up?

It was working fine during my tests. I'll need some feedback/sleep before I do more.
  Reply With Quote
02-21-14, 05:18 PM   #5
Falleneu
A Deviate Faerie Dragon
Join Date: Aug 2010
Posts: 12
Originally Posted by Oppugno View Post
Did you replace the previous 'shNameplates.lua' file in the addon folder with the attached one?
Does the cast time / remaining time still show up?

It was working fine during my tests. I'll need some feedback/sleep before I do more.
I deleted my shnameplates.lua and then put yours there.

Cast time remaining still shows up, i'm assuming you used my config.lua that was in the file that i attached?

http://www.consequence-eu.com/wp-con...nameplates.png

Here is a screeny.

Last edited by Falleneu : 02-21-14 at 05:31 PM.
  Reply With Quote
02-22-14, 01:12 AM   #6
Oppugno
A Fallenroot Satyr
Join Date: Sep 2012
Posts: 22
Originally Posted by Falleneu View Post
i'm assuming you used my config.lua that was in the file that i attached?
I did indeed.

I also just finished a SoO and couldn't reproduce it during the raid. Are you getting any errors?

Give this version a go. If it still doesn't work there are probably half a dozen things that we can try but with this ~7 hour gap in a time zones it could take awhile. Time that could be better spent configuring another nameplate addon that is actively maintained.
Attached Files
File Type: zip shNameplates.zip (267.5 KB, 203 views)
  Reply With Quote
02-22-14, 10:59 AM   #7
Falleneu
A Deviate Faerie Dragon
Join Date: Aug 2010
Posts: 12
Originally Posted by Oppugno View Post
I did indeed.

I also just finished a SoO and couldn't reproduce it during the raid. Are you getting any errors?

Give this version a go. If it still doesn't work there are probably half a dozen things that we can try but with this ~7 hour gap in a time zones it could take awhile. Time that could be better spent configuring another nameplate addon that is actively maintained.
I will give it a go when I am home on monday, I will start trial and erroring without any addons if the problem persists, thanks for everythign so far. I was not getting any errors btw.

Edit: I do use a font folder in the root of my wow folder to hardedit the font, could it be that?

Last edited by Falleneu : 02-22-14 at 05:09 PM.
  Reply With Quote
02-24-14, 12:21 PM   #8
Falleneu
A Deviate Faerie Dragon
Join Date: Aug 2010
Posts: 12
It works excellent news, gonna raid with it tonight and see what occurs.

What code did you add / change if I may ask?

Edit: no problems whatsoever, you have made me a happy camper.

Last edited by Falleneu : 02-24-14 at 06:19 PM.
  Reply With Quote
02-24-14, 06:21 PM   #9
Oppugno
A Fallenroot Satyr
Join Date: Sep 2012
Posts: 22
In the most recent revision I removed a ClearAllPoints() call on the castbar's spell name (castBar.cname).

Overall I removed the events and handler that dealt with spell casts.
Code:
575:    -- castBar:SetScript("OnEvent", CastbarEvents)
576:    -- castBar:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE")
577:    -- castBar:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE")
578:    -- castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
579:    -- castBar:RegisterEvent("UNIT_SPELLCAST_START")
Added references to the spell name and spell backdrop regions that already exist and hid them.
Code:
492:    local _, castbarOverlay, shieldedRegion, spellIconRegion, spellName, spellBackdrop = castBar:GetRegions()

569:    castBar.spellName = spellName
570:    spellName:Hide()

703:    spellBackdrop:SetTexture("")
And made the castbar's spell name text make use of the spellName region that already exists.
Code:
111:   local oldname = self.spellName:GetText()
112:   self.cname:SetText(oldname and (len(oldname) > 20) and gsub(oldname, "%s?(.[\128-\191]*)%S+%s", "%1. ") or oldname)
I also removed (commented out) or fixed anything that made use of castBar's channeling, casting, and controller variables as they're no longer needed.

Last edited by Oppugno : 02-24-14 at 06:24 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Small bug in my nameplate addon, need help of lua genius to fix.


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