View Single Post
06-16-17, 10:19 PM   #6
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 247
Originally Posted by Fizzlemizz View Post
Register the PLAYER_SPECIALIZATION_CHANGED event.
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:
  1. GetSpecialization()

returns nil on the first login. So when I am checking in my code for

Lua Code:
  1. elseif (K.Class == "PALADIN" and K.Spec == SPEC_PALADIN_RETRIBUTION) then

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:
  1. AddOn.Spec = GetSpecialization() or 0

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.
  Reply With Quote