无尽修改提交

dev_chengFeng
jiaoyangna 2021-05-28 11:29:27 +08:00
parent 5c3c32be15
commit 81761b26af
2 changed files with 33 additions and 18 deletions

View File

@ -730,7 +730,7 @@ function this.GetShiQiValue()
local moraleLv1 = 0
local itemCount = BagManager.GetItemCountById(this.shiQiValue)
for k,v in ConfigPairs(endlessMorale) do
if not v.Exp or #v.Exp < 1 then
if not v.Exp or #v.Exp < 2 then
moraleLv1 = v.Level
id = v.Id
break
@ -773,7 +773,8 @@ function this.GetTreasureLevel()
local moraleLv1 = 0
local itemCount = BagManager.GetItemCountById(this.scoreValueId)
for k,v in ConfigPairs(endlessTreasure) do
if not v.Integral or #v.Integral < 1 then
LogGreen("itemCount:"..itemCount.." v.Integral:"..tostring(v.Integral))
if not v.Integral or #v.Integral < 1 or #v.Integral[1] < 2 then
moraleLv1 = v.Level
id = v.Id
break
@ -781,7 +782,7 @@ function this.GetTreasureLevel()
moraleLv1 = v.Level
id = v.Id
break
end
end
end
return id,moraleLv1
end

View File

@ -126,37 +126,51 @@ function EndLessMapView:BindEvent()
return
end
if not this:CanClick() then return end
local u = function(pro)
local s = function(pro)
local str = ""
for i = 1,#pro do
if i ~= 1 then
str = str .. ","
end
local config = ConfigManager.GetConfigData(ConfigName.PropertyConfig,pro[i][1])
local index = 1
for k,v in pairs(pro) do
local config = ConfigManager.GetConfigData(ConfigName.PropertyConfig,k)
if not config then
return ""
else
if index ~= 1 then
str = str .. ","
end
str = str .. config.Info .. "+"
str = str .. GetEquipPropertyFormatStr(config.Style,pro[i][2])
str = str .. GetEquipPropertyFormatStr(config.Style,v)
index = index + 1
end
end
return str
end
local u = function(id,isAppend,pros)
for i = (isAppend and id or 1), id do
local pro = endlessMorale[i].Props
for k,v in ipairs(pro) do
if not pros[v[1]] then
pros[v[1]] = 0
end
pros[v[1]] = pros[v[1]] + v[2]
end
end
return pros
end
local s = function(index)
local id, lv = EndLessMapManager.GetShiQiValue()
local pro1,nextPro = nil
--local pro1,nextPro = nil
local pro = {}
if index == 1 then --属性加成
pro1 = (endlessMorale[id].Props and #endlessMorale[id].Props > 0) and endlessMorale[id].Props or {}
local str = u(pro1)
local pros = {}
local pros = u(id,false,pros)
local str = s(pros)
if str and str ~= "" then
table.insert(pro,string.format("本级加成:全体神将<color=#55c688>%s</color>",str))
end
nextPro = (endlessMorale[id + 1] and endlessMorale[id + 1].Props and #endlessMorale[id + 1].Props > 0) and endlessMorale[id + 1].Props or {}
LogGreen("#nextPro:"..#nextPro)
local str = u(nextPro)
id = id + 1
local pros = u(id,true,pros)
local str = s(pros)
if str and str ~= "" then
table.insert(pro,string.format("下级加成:全体神将<color=#55c688>%s</color>",str))
table.insert(pro,string.format("下级加成:全体神将<color=#55c688>%s</color>",str))
end
else --特殊加成
for k,v in ConfigPairs(endlessMorale) do