Skip to content

Commit

Permalink
Added initial support for Champion XP system
Browse files Browse the repository at this point in the history
  • Loading branch information
4bitfocus committed Mar 19, 2015
1 parent 564f863 commit 57e0967
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Slightly Improved Experience Bar Changelog

## Version 2.15
* Updated LibAddonMenu to version 2.0 r17
* Added initial support for Champion XP

## Version 2.14
* Updated LibAddonMenu to version 2.0 r16

Expand Down
14 changes: 13 additions & 1 deletion SlightlyImprovedExperienceBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
SIEB = {}

SIEB.name = "SlightlyImprovedExperienceBar"
SIEB.version = "2.14"
SIEB.version = "2.15"
SIEB.ignoreOnHideEvent = false
SIEB.configVersion = 5
SIEB.championPointsMax = 400000
SIEB.defaults = {
minimumAlpha = 0.8,
showPercentageText = true,
Expand Down Expand Up @@ -153,7 +154,15 @@ function SIEB.SetLabelPosition()
SIEB.experienceLabel:ClearAnchors()
SIEB.experienceLabel:SetAnchor(RIGHT, ZO_PlayerProgressBarBar, RIGHT, 0, -22)
end

if not SIEB.championLabel then
SIEB.championLabel = SIEB.NewBarLabel("SIEB_ChampionBarLabel", ZO_PlayerProgressBar, TEXT_ALIGN_CENTER)
end

SIEB.championLabel:SetHorizontalAlignment(TEXT_ALIGN_RIGHT)
SIEB.championLabel:ClearAnchors()
SIEB.championLabel:SetAnchor(RIGHT, ZO_PlayerProgressBarBar, RIGHT, -10, 30)

end

-- Initializer functions that runs once when the game is loading addons
Expand Down Expand Up @@ -247,6 +256,9 @@ end
function SIEB.RefreshLabel()

SIEB.experienceLabel:SetText(SIEB.FormatLabelText(SIEB.GetPlayerXP(), SIEB.GetPlayerXPMax()))
if IsUnitVeteran("player") then
SIEB.championLabel:SetText(SIEB.FormatLabelText(GetPlayerChampionXP(), SIEB.championPointsMax))
end

end

Expand Down
2 changes: 1 addition & 1 deletion SlightlyImprovedExperienceBar.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Title: Slightly Improved Experience Bar
## Description: Adds numerical values to the experience bar and prevents it from auto hiding.
## APIVersion: 100010
## APIVersion: 100011
## OptionalDependsOn: LibAddonMenu-2.0 Azurah
## SavedVariables: SIEBVars

Expand Down

0 comments on commit 57e0967

Please sign in to comment.