Fix minor init bug
Sasky [04-09-15 - 06:43]
diff --git a/ChampionBar.lua b/ChampionBar.lua
index 6c08058..806bf08 100644
--- a/ChampionBar.lua
+++ b/ChampionBar.lua
@@ -105,6 +105,7 @@ end
function ChampionBar.onLevelup(_, unit, vr)
if unit == "player" and vr == 14 then
ChampionBar.initMaxLevel()
+ EVENT_MANAGER:UnregisterForEvent("ChampionBar", EVENT_VETERAN_RANK_UPDATE)
end
end
@@ -128,9 +129,9 @@ function ChampionBar.init()
--Only show for max VR characters
if GetUnitLevel("player") ~= 50 or GetUnitVeteranRank("player") ~= 14 then
ChampionBar.initLowerLevel()
- return
+ else
+ ChampionBar.initMaxLevel()
end
- ChampionBar.initMaxLevel()
EVENT_MANAGER:UnregisterForEvent("ChampionBar", EVENT_PLAYER_ACTIVATED)
end
diff --git a/ChampionBar.txt b/ChampionBar.txt
index 9e70524..95bd7b8 100644
--- a/ChampionBar.txt
+++ b/ChampionBar.txt
@@ -1,6 +1,6 @@
## APIVersion: 100011
## Title: ChampionBar
-## Version: 1.0.0
+## Version: 1.0.1
## Author: Sasky
lang/en.lua
diff --git a/VPMaxBar.lua b/VPMaxBar.lua
index 1c5976d..7a5cc96 100644
--- a/VPMaxBar.lua
+++ b/VPMaxBar.lua
@@ -96,10 +96,6 @@ function VPMaxBarType:GetShownAttribute()
return GetChampionPointAttributeForRank(level)
end
-function VPMaxBarType:GetBarGradient()
- return ZO_CP_BAR_GRADIENT_COLORS[self:GetShownAttribute()]
-end
-
local CHAMPION_ATTRIBUTE_HUD_ICONS =
{
[ATTRIBUTE_HEALTH] = "EsoUI/Art/Champion/champion_points_health_icon-HUD-32.dds",