Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions MY_!Base/src/lib/Constant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ local CONSTANT = {
MENU_DIVIDER = X.FreezeTable({ bDevide = true }),
EMPTY_TABLE = X.FreezeTable({}),
XML_LINE_BREAKER = GetFormatText('\n'),
MAX_PLAYER_LEVEL = 50,
MAX_PLAYER_LEVEL = X.IsFunction(_G.GetMaxPlayerLevel) and GetMaxPlayerLevel() or 50,
UI_OBJECT = UI_OBJECT or X.FreezeTable({
NONE = -1, -- 空Box
ITEM = 0 , -- 身上有的物品。nUiId, dwBox, dwX, nItemVersion, nTabType, nIndex
Expand Down Expand Up @@ -1242,10 +1242,9 @@ local CONSTANT = {

-- 更新最高玩家等级数据
RegisterEvent('PLAYER_ENTER_SCENE', function()
CONSTANT.MAX_PLAYER_LEVEL = math.max(
CONSTANT.MAX_PLAYER_LEVEL,
X.GetClientPlayer().nMaxLevel
)
if X.IsFunction(_G.GetMaxPlayerLevel) then
CONSTANT.MAX_PLAYER_LEVEL = GetMaxPlayerLevel()
end
end)

X.CONSTANT = setmetatable({}, { __index = CONSTANT, __newindex = function() end })
Expand Down
2 changes: 1 addition & 1 deletion MY_!Base/src/lib/Game.Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function X.IsBetterEquipment(kItem, dwPackage, dwBox)
if not equipedItem then
return false
end
if me.nLevel < me.nMaxLevel then
if me.nLevel < X.CONSTANT.MAX_PLAYER_LEVEL then
return kItem.nEquipScore > equipedItem.nEquipScore
end
return (kItem.nEquipScore > equipedItem.nEquipScore) or (kItem.nLevel > equipedItem.nLevel and kItem.nQuality >= equipedItem.nQuality)
Expand Down
2 changes: 1 addition & 1 deletion MY_TeamTools/src/MY_JBEventVote.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ end

function D.OnPanelActivePartial(ui, nPaddingX, nPaddingY, nW, nH, nLH, nX, nY, nLFY)
local me = X.GetClientPlayer()
if me and me.nMaxLevel == me.nLevel then
if me and me.nLevel == X.CONSTANT.MAX_PLAYER_LEVEL then
nX = nPaddingX
nY = nLFY
nY = nY + ui:Append('Text', { x = nX, y = nY, text = _L['Dungeon Vote'], font = 27 }):Height() + 2
Expand Down
Loading