Go to Page... |
Thread Tools | Display Modes |
06-16-17, 12:32 AM | #1 |
Paladin class bar wont show first login
Hey, everyone. I do not post here very often though I do lurk a lot. As I love seeing what add-ons people are making. I'm going to ask for a bit of help and guidance here so bare with me.
Currently, my paladin class bar (HolyPower) won't show on the first login. If you reload it will show. I will show the code I am using for this and where I am placing the code. Currently, for the modules for class power, I am using this. Lua Code:
Now I have to spawn this all in my unit frame code which is very long. I'm going to just place it in a gist if you all do not mind. https://gist.github.com/Kkthnx/4b1e3...5764bfd7aa9220 Idk why it will not spawn on the first login. Any advice would help. Thank you kindly. Oh here is where I place the code. https://gist.github.com/Kkthnx/4b1e3...rames-lua-L239 https://gist.github.com/Kkthnx/4b1e3...rames-lua-L252 https://gist.github.com/Kkthnx/4b1e3...rames-lua-L600
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
Last edited by Kkthnx : 06-16-17 at 12:51 PM. |
|
06-16-17, 12:20 PM | #2 |
Maybe I'm missing it, but I don't see a register to PLAYER_LOGIN or PLAYER_ENTERING_WORLD, either of which would spawn the frame on first login
|
|
06-16-17, 12:40 PM | #3 |
Doesn't change it. I just tried that and it still won't spawn per first login.
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
|
|
06-16-17, 09:44 PM | #4 |
Alright so after some testing. It seems like
Lua Code:
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
|
|
06-16-17, 09:57 PM | #5 |
Register the PLAYER_SPECIALIZATION_CHANGED event.
Where are you using GetSpecialization()? It's not in the code shown. PLAYER_SPECIALIZATION_CHANGED fires before PLAYER_LOGIN so GetSpecialization() should be usable by then even on a cold login.
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. Last edited by Fizzlemizz : 06-16-17 at 10:19 PM. |
|
06-16-17, 10:19 PM | #6 |
I can see needing this for when changing specs though really wasn't an issue though it could help later on. As for my current issue which still stands. It seems like
Lua Code:
returns nil on the first login. So when I am checking in my code for Lua Code:
K.Spec being GetSpecialization() it won't work first login. Preventing the HolyPowerBar from appearing until the player manually /reload their UI and it will work fine from then on out. I run it out of my Init.lua file. Lua Code:
Going further into this. If I comment the code out checking for the spec. It works first login. So this is why I feel like Its not there on a first login.
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
Last edited by Kkthnx : 06-16-17 at 10:22 PM. |
|
06-16-17, 10:28 PM | #7 |
I don't see where
Code:
AddOn.Spec = GetSpecialization() or 0
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. |
|
06-16-17, 11:01 PM | #8 | |
Lua Code:
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
|
||
06-17-17, 12:09 AM | #9 |
All that Addon.xxx = yyy (well, anything requiring character or other addon data) should at least go into the OnEvent script under a
Code:
if event == "PLAYER_LOGIN" then Addon.xxx = yyy end you will have to change Code:
Loading:SetScript("OnEvent", function() Code:
Loading:SetScript("OnEvent", function(self, event)
__________________
Fizzlemizz Maintainer of Discord Unit Frames and Discord Art. Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus. Last edited by Fizzlemizz : 06-17-17 at 01:13 AM. |
|
06-17-17, 04:55 AM | #10 |
In the long run you are better off to create your own special power bar frame rather then reusing the existing Blizzard ones, i havn't done this for every special bar but here is my combo frame, which looks (even better since the default combo frame using broken textures)/behaves exacly as the default one, just this is your own:
Lua Code:
All you have to do is to :SetParent, :SetPoint after this and it works out of the box. |
|
06-17-17, 05:06 AM | #11 |
I had a similar issue with my "arrows" a few weeks back.
Here's my code for my class bars, hope it helps Lua Code:
|
|
WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Paladin class bar wont show first login |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|