修行增加主角属性

wangzhenxing 2023-11-24 18:30:31 +08:00
parent 8240f1e631
commit 3f49232c84
2 changed files with 64 additions and 23 deletions

View File

@ -143,6 +143,19 @@ function this.GetSinglePointAdd()
end
singlePointAddList[TotalPros[i][1]] = TotalPros[i][2]
end
local player=XiuXianConfig[this.PracticeLevel].PlayerProperty
if player and #player>0 and type(player[1][1])~="userdata" then
for i=1,#player do
if not singlePointAddList[player[i][1]] then
singlePointAddList[player[i][1]] = 0
end
singlePointAddList[player[i][1]] = singlePointAddList[player[i][1]] + player[i][2]
end
end
--end
return singlePointAddList
end
@ -163,7 +176,14 @@ function this.GetCurAllGetAdd()
end
end
end
if XiuXianConfig[i].PlayerProperty and #XiuXianConfig[i].PlayerProperty>0 and type(XiuXianConfig[i].PlayerProperty[1][1])~="userdata" then
local player=XiuXianConfig[i].PlayerProperty
for i=1,#player do
PropertyList[player[i][1]] = PropertyList[player[i][1]] + player[i][2]
end
end
end
return PropertyList
end
@ -184,22 +204,13 @@ function this.GetCurAllGetAddForShow()
end
end
end
end
return PropertyList
end
--获取各个大境界中所有小属性加成的总和 +模板的
function this.GetAddsListWithTemplate()
local PropertyList = this.BuildAddTemplate()
local addsList = {}
for i, v in ConfigPairs(XiuXianConfig) do
if v.TotalPros then
local Pros = v.TotalPros
for i = 1, #Pros do
if PropertyConfig[Pros[i][1]].Style == 1 then
PropertyList[Pros[i][1]] = PropertyList[Pros[i][1]] + Pros[i][2]
elseif PropertyConfig[Pros[i][1]].Style == 2 then
PropertyList[Pros[i][1]] = PropertyList[Pros[i][1]] + Pros[i][2]
if XiuXianConfig[i].PlayerProperty and #XiuXianConfig[i].PlayerProperty>0 and type(XiuXianConfig[i].PlayerProperty[1][1])~="userdata" then
local player=XiuXianConfig[i].PlayerProperty
for i=1,#player do
if PropertyConfig[player[i][1]].Style == 1 then
PropertyList[player[i][1]] = PropertyList[player[i][1]] + player[i][2]
elseif PropertyConfig[player[i][1]].Style == 2 then
PropertyList[player[i][1]] = PropertyList[player[i][1]] + player[i][2]/100
end
end
end
@ -207,10 +218,12 @@ function this.GetAddsListWithTemplate()
return PropertyList
end
--获取各个大境界中所有小属性加成的总和 不加模板的
function this.GetAddsListWithOutTemplate()
local addsList = {}
for i, v in ConfigPairs(XiuXianConfig) do
for key, v in ConfigPairs(XiuXianConfig) do
if not addsList[v.RealmId] then
addsList[v.RealmId] = {}
end
@ -227,6 +240,20 @@ function this.GetAddsListWithOutTemplate()
end
end
end
if v.PlayerProperty and #v.PlayerProperty>0 and type(v.PlayerProperty[1][1])~="userdata" then
local player=v.PlayerProperty
for i=1,#player do
if not addsList[v.RealmId][player[i][1]] then
addsList[v.RealmId][player[i][1]] = 0
end
if PropertyConfig[player[i][1]].Style == 1 then
addsList[v.RealmId][player[i][1]] = addsList[v.RealmId][player[i][1]] + player[i][2]
elseif PropertyConfig[player[i][1]].Style == 2 then
addsList[v.RealmId][player[i][1]] = addsList[v.RealmId][player[i][1]] + player[i][2]/100
end
end
end
end
return addsList
end
@ -258,11 +285,20 @@ end
--返回预览界面文字
function this.GetPreviewSingleText(id,value)
if PropertyConfig[id].Style == 1 then
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value)
elseif PropertyConfig[id].Style == 2 then
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value).."%"
if id>112 then
if PropertyConfig[id].Style == 1 then
return string.format("%s",PropertyConfig[id].Info),string.format("+%s",value)
elseif PropertyConfig[id].Style == 2 then
return string.format("%s",PropertyConfig[id].Info),string.format("+%s",value).."%"
end
else
if PropertyConfig[id].Style == 1 then
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value)
elseif PropertyConfig[id].Style == 2 then
return string.format("全体神将%s",PropertyConfig[id].Info),string.format("+%s",value).."%"
end
end
end
--获取所有神印信息

View File

@ -33,9 +33,14 @@ function RoleProInfoPopup:InitComponent()
-- 构建数据
local ProDataList = {}
for _, propConfig in ConfigPairs(propertyConfig) do
if propConfig.IfShow == 1 or propConfig.IfShow == 2 then
table.insert(ProDataList, propConfig)
--不显示主角属性
if propConfig.PropertyId<114 then
if propConfig.IfShow == 1 or propConfig.IfShow == 2 then
table.insert(ProDataList, propConfig)
--LogError("propConfig.Id============="..propConfig.Id)
end
end
end
table.sort(ProDataList, function (a,b)return a.SortId < b.SortId end)