Originally Posted by syncrow
For WoD, I plan to use the exp-bar otherwise at maxlvl.
|
Lua Code:
--[[
For finding the maximum attainable player level:
0: WoW Classic. Level 60
1: The Burning Cruade. Level 70
2: Wrath of the Lich King. Level 80
3: Cataclysm. Level 85
4: Mists of Pandaria. Level 90
5: Warlords of Draenor. Level 100
--]]
local maxPlayerLevel = MAX_PLAYER_LEVEL_TABLE[GetExpansionLevel()]
-- Check if player is already max level
local displayXP = true
if UnitLevel("player") == maxPlayerLevel then
displayXP = false
end
-- Disable XP bar upon hitting max level
local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_LEVEL_UP")
frame:SetScript("OnEvent", function(self, event, level)
if level == maxPlayerLevel then
displayXP = false
end
end)
If I've misunderstood, please clarify.