【修行】属性顺序

dev_chengFeng
ZhangBiao 2021-05-26 18:32:03 +08:00
parent d799a102dc
commit 53703a8f2e
2 changed files with 27 additions and 14 deletions

View File

@ -86,7 +86,7 @@ function MainPlayerView:SetAutoMove()
end
function MainPlayerView:SetName()
self.NameText.text = PlayerManager.nickName
self.NameText.text = PracticeManager.SetNameColor(PlayerManager.nickName,PracticeManager.PracticeLevel)
end
function MainPlayerView:SetWalkDir(dir)

View File

@ -37,7 +37,19 @@ local guildSkill = nil
--界面打开时调用(用于子类重写)
function RoleProInfoPopup:OnOpen(_allAddProVal,_configData,_isShowGuild,_guildSkill)
allAddProVal = _allAddProVal
local allAddProVal = {}
for _proId, _val in pairs(_allAddProVal) do
if propertyConfig[_proId] and propertyConfig[_proId].SortId > 0 then
local data = {}
data.proId = _proId
data.val = _val
data.sort = propertyConfig[_proId].SortId
table.insert(allAddProVal,data)
end
end
table.sort(allAddProVal,function (a,b)
return propertyConfig[a.proId].SortId < propertyConfig[b.proId].SortId
end)
heroSConFig = _configData
isShowGuild = _isShowGuild--图鉴不显示公会技能等级特殊操作
guildSkill = _guildSkill and _guildSkill or nil--其他玩家公会技能等级特殊操作
@ -46,22 +58,23 @@ function RoleProInfoPopup:OnOpen(_allAddProVal,_configData,_isShowGuild,_guildSk
allPro[i] = {}
end
--加基础 和 辅助属性
for proId, val in pairs(allAddProVal) do
if propertyConfig[proId] then
if propertyConfig[proId].IfShow ~= 0 then
local curLength = #allPro[propertyConfig[proId].IfShow] > 0 and #allPro[propertyConfig[proId].IfShow] or 1
if not allPro[propertyConfig[proId].IfShow][curLength] then
allPro[propertyConfig[proId].IfShow][curLength] = {}
table.insert(allPro[propertyConfig[proId].IfShow][curLength],{proId = proId,proVal = val})
elseif allPro[propertyConfig[proId].IfShow][curLength] and #allPro[propertyConfig[proId].IfShow][curLength] < 2 then
table.insert(allPro[propertyConfig[proId].IfShow][curLength],{proId = proId,proVal = val})
elseif allPro[propertyConfig[proId].IfShow][curLength] and #allPro[propertyConfig[proId].IfShow][curLength] >= 2 then
allPro[propertyConfig[proId].IfShow][curLength + 1] = {}
table.insert(allPro[propertyConfig[proId].IfShow][curLength + 1],{proId = proId,proVal = val})
for index, value in ipairs(allAddProVal) do
if propertyConfig[value.proId] then
if propertyConfig[value.proId].IfShow ~= 0 then
local curLength = #allPro[propertyConfig[value.proId].IfShow] > 0 and #allPro[propertyConfig[value.proId].IfShow] or 1
if not allPro[propertyConfig[value.proId].IfShow][curLength] then
allPro[propertyConfig[value.proId].IfShow][curLength] = {}
table.insert(allPro[propertyConfig[value.proId].IfShow][curLength],{proId = value.proId,proVal = value.val})
elseif allPro[propertyConfig[value.proId].IfShow][curLength] and #allPro[propertyConfig[value.proId].IfShow][curLength] < 2 then
table.insert(allPro[propertyConfig[value.proId].IfShow][curLength],{proId = value.proId,proVal = value.val})
elseif allPro[propertyConfig[value.proId].IfShow][curLength] and #allPro[propertyConfig[value.proId].IfShow][curLength] >= 2 then
allPro[propertyConfig[value.proId].IfShow][curLength + 1] = {}
table.insert(allPro[propertyConfig[value.proId].IfShow][curLength + 1],{proId = value.proId,proVal = value.val})
end
end
end
end
if isShowGuild then
--加公会技能特殊属性
allPro[3][1] = {}