Skip to content

Commit

Permalink
Fix max player level condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Aug 16, 2024
1 parent e6a045f commit 4b6bc60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ read_globals = {
"GetInventoryItemTexture",
"GetLocale",
"GetLootMethod",
"GetMaxLevelForPlayerExpansion",
"GetNumArenaOpponentSpecs",
"GetPartyAssignment",
"GetPetExperience",
Expand Down Expand Up @@ -205,7 +206,6 @@ read_globals = {
"MAX_BOSS_FRAMES",
"MAX_COMBO_POINTS",
"MAX_PARTY_MEMBERS",
"MAX_PLAYER_LEVEL",
"MAX_RAID_MEMBERS",
"MAX_TOTEMS",
"MEMBERS_PER_RAID_GROUP",
Expand Down
2 changes: 1 addition & 1 deletion modules/movers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ local function createConfigEnv()
UnitIsUnit = function(unitA, unitB) return unitB == "player" and true or false end,
UnitIsDeadOrGhost = function(unit) return false end,
UnitIsConnected = function(unit) return true end,
UnitLevel = function(unit) return MAX_PLAYER_LEVEL end,
UnitLevel = function(unit) return GetMaxLevelForPlayerExpansion() end,
UnitIsPlayer = function(unit) return unit ~= "boss" and unit ~= "pet" and not string.match(unit, "(%w+)pet") end,
UnitHealth = function(unit) return getValue("UnitHealth", unit, math.random(20000, 50000)) end,
UnitIsQuestBoss = function(unit) return unit == "target" or unit == "focus" end,
Expand Down
2 changes: 1 addition & 1 deletion modules/xp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ end

function XP:UpdateXP(frame)
-- At the level cap or XP is disabled, or the pet is actually a vehicle right now, swap to reputation bar (or hide it)
if( UnitLevel(frame.unitOwner) == MAX_PLAYER_LEVEL or IsXPUserDisabled() or ( frame.unitOwner == "pet" and UnitExists("vehicle") ) ) then
if( UnitLevel(frame.unitOwner) == GetMaxLevelForPlayerExpansion() or IsXPUserDisabled() or ( frame.unitOwner == "pet" and UnitExists("vehicle") ) ) then
frame.xpBar.xp:Hide()
return
end
Expand Down

0 comments on commit 4b6bc60

Please sign in to comment.