View Single Post
11/10/14, 08:05 AM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Just guessing here... Since veteran points functions still exist, I'd say they made that change more on the presentation level, while API remained nearly the same.

Lua Code:
  1. -- from playerprogressbar.lua
  2. function ZO_PlayerProgressBarCurrentFragment:RefreshBaseType()
  3.     if(self:IsShowing()) then
  4.         if(GetUnitVeteranRank("player") > 0) then
  5.             PLAYER_PROGRESS_BAR:SetBaseType(PPB_VP)
  6.         else
  7.             PLAYER_PROGRESS_BAR:SetBaseType(PPB_XP)
  8.         end
  9.     else
  10.         PLAYER_PROGRESS_BAR:ClearBaseType()
  11.     end
  12. end

PPB_VP uses GetUnitVeteranPoints("player"), GetUnitVeteranRank("player"), GetNumVeteranPointsInRank(rank) where
PPB_XP uses GetUnitXP("player"), GetUnitLevel("player"), GetNumExperiencePointsInLevel(rank)

edit: a bit strange that they use GetUnitVeteranRank("player") > 0 to check you're veteran, in other places they still use IsUnitVeteran("player") so that function wasn't removed, either.

Last edited by merlight : 11/10/14 at 08:09 AM.
  Reply With Quote