EC: Show the account age in years and months in the Profile gump
In the EC when you click on the profile scroll in the paperdoll it just shows the number of months the account has been opened. The following code will include the number of years and months the account has been opened. This will help when determining when you get your next set of vet rewards and what level they can be.
I tried to get it localized but the string data coming into the gump is in English for all languages and when I tried to localize the output it only displayed properly in English and Korean. Which might be why the EC originally showed it in English.
To the function PaperdollWindow.UpdateCharProfile in the file source\PaperdollWindow.lua add the following code
I tried to get it localized but the string data coming into the gump is in English for all languages and when I tried to localize the output it only displayed properly in English and Korean. Which might be why the EC originally showed it in English.
To the function PaperdollWindow.UpdateCharProfile in the file source\PaperdollWindow.lua add the following code
TextEditBoxSetText(tabName.."ProfileEditScrollWChildText",WindowData.CharProfile.Info)
--start of added code
local startString = L"This account is "
local strAge = wstring.gsub(WindowData.CharProfile.Age, startString, L"", 1)
local age = tonumber(strAge)
if(age > 11) then
local months = age % 12
local years = (age - months) / 12
local YearsMonthsOld = startString..years..L" years and "..months..L" months old"
Debug.PrintToChat(YearsMonthsOld)
WindowData.CharProfile.Age = WindowData.CharProfile.Age..L" old\n"..YearsMonthsOld
end
--end of added code
LabelSetText(tabName.."Age",WindowData.CharProfile.Age)