My apologies if this has been covered before, but I didn't see anything off hand.
First, Code Knowledge. While I'm a novice of XML and LUA code, I'm quite adept at LPC which is somewhat similar, so I'm at least able to decipher the code.
Now, I'm working on a PlayerFrame that resembles the one from W3. I've got many things working that I didn't think I'd be able to figure out, like a 3D model of the current character and stats listed on the widget. My problem lies in that when I first log in, the portrait is empty and the stats/level are set to 0. Only after I reload the ui does the 3d portrait show and the stats and level update to the current values.
I have tried running the Portrait and stats through OnLoad and OnShow with each pointing to:
function UpdatePortrait()
Set3DPortrait(PlayerWindow_PortraitFrame_Portrait3D, "player")
end
function Set_Strings()
NameText:SetText(UnitName("player"));
LevelText:SetText(format(TEXT(PLAYER_LEVEL),UnitLevel("player"), UnitRace("player"), UnitClass("player")));
Get_Stats()
end
|
The Player name and stat labels show up just fine, it's just the numerical data and the portrait that aren't loading.
Any suggestions on where I might look for getting the data to load correctly?