【七界试炼】提交

dev_chengFeng
ZhangBiao 2021-09-23 16:08:02 +08:00
parent 524521d526
commit 0422b5c738
6 changed files with 48 additions and 25 deletions

View File

@ -1074,6 +1074,7 @@ JumpType = {
JumpServerHightLadder = 82,--灵兽山
HongMengZhen = 86,-- 鸿蒙阵
FightLevel = 107,-- 山河社稷图
QiJieShiLian = 112,--七界试炼
BuyVigor = 10000, --体力购买
BuyGold = 10001, --金币购买
@ -1113,7 +1114,6 @@ JumpType = {
firstRecharge = 30001,
ZhiZunJiangShi = 30002,
SurpriseBox = 40001,--惊喜礼盒
QiJieShiLian = 40026,--七界试炼
linglongShangShi = 20005,
}

View File

@ -105,15 +105,33 @@ function GeneralTreasurePanel:showTaskList(isTop,isAni)
end,not isTop,not isAni)
--4 未达成 3 可再次领取 2 可领取 1 已领取 -1 完美领取(充钱领取过的)
--定位打开界面时位置
local t = 0
local State = self.treasureData.treasureState == 0 and 2 or 3
for i = 1, #self.treasureData.dataList do
if self.treasureData.dataList[i].State == State or self.treasureData.dataList[i].State == 4 then
t = i
break
-- if isTop then
local t = 0
if self.treasureData.treasureState == 0 then
for i = 1, #self.treasureData.dataList do
if self.treasureData.dataList[i].State == 2 then
t = i
break
end
end
else
for i = 1, #self.treasureData.dataList do
if self.treasureData.dataList[i].State == 2 or self.treasureData.dataList[i].State == 3 then
t = i
break
end
end
end
end
self.ScrollView:SetIndex(t-1)
if t == 0 then
for i = 1, #self.treasureData.dataList do
if self.treasureData.dataList[i].State == 4 then
t = i
break
end
end
end
self.ScrollView:SetIndex(t-1)
-- end
end
--单个任务

View File

@ -96,7 +96,7 @@ end
function QiJieTreasure:Refresh(_tabNum)
self.dataList = QiJieShiLianManager.FormatTreasureData(_tabNum)
self.treasureNum.text = string.format( "%s/%s",#QiJieShiLianManager.treasureActiveList,#QiJieShiLianManager.treasureList)
self.treasureNum.text = string.format( "解锁遗物:%s/%s",#QiJieShiLianManager.treasureActiveList,#QiJieShiLianManager.treasureList)
self.ScrollView:SetData(self.dataList, function(index, go)
self:SetSingleData(index,go,self.dataList[index])
end)

View File

@ -290,13 +290,13 @@ function this:AddListener()
end
function this:RemoveListener()
Game.GlobalEvent:AddEvent(GameEvent.QiJieShiLian.CloseBuyTreasure, self.CheckClose,self)
Game.GlobalEvent:RemoveEvent(GameEvent.QiJieShiLian.CloseBuyTreasure, self.CheckClose,self)
end
--界面关闭时调用(用于子类重写)
function this:CheckClose()
if curType == 4 then
this:ClosePanel()
parent:ClosePanel()
end
end

View File

@ -153,7 +153,9 @@ end
function this.MixTreasureServerAndLocalData(msg)
this.treasureActiveList = {}
for i = 1, #msg.info do
table.insert(this.treasureActiveList,msg.info[i].id)
if msg.info[i].status == 1 then
table.insert(this.treasureActiveList,msg.info[i].id)
end
if this.treasureList[msg.info[i].id] then
this.treasureList[msg.info[i].id].state = msg.info[i].status
else
@ -202,22 +204,25 @@ function this.GetBattleResult()
local config = QijieStage[this.curLevelId]
local data = {}
data[1] = "<color=#F9E7D3>阵容加成:</color> <color=#3DE181>"..(#this.battleResult.teamBuffIds)*(config.ConditionValue[1][2]/100).."%</color>\n<color=#AE7B20>("..#this.battleResult.teamBuffIds.."条)</color>"
data[2] = "<color=#F9E7D3>遗物加成:</color> <color=#3DE181>"..(#this.battleResult.relicIds*10).."%</color>\n<color=#AE7B20>("..#this.battleResult.relicIds.."个)</color>"
local bonue = config.RoundReward[1][2]
for i = 1, #config.RoundReward do
if this.battleResult.round > config.RoundReward[i][1] then
data[2] = "<color=#F9E7D3>遗物加成:</color> <color=#3DE181>"..(this.GetBttleResultRelicdsAddition(this.battleResult.relicIds)).."%</color>\n<color=#AE7B20>("..#this.battleResult.relicIds.."个)</color>"
local bonue = 0
for i = #config.RoundReward, 1, -1 do
if this.battleResult.round <= config.RoundReward[i][1] then
bonue = config.RoundReward[i][2]
if config.RoundReward[i+1] then
bonue = config.RoundReward[i][2]
else
bonue = 0
end
end
end
data[3] = "<color=#F9E7D3>回合加成:</color> <color=#3DE181>"..(bonue/100).."%</color>\n<color=#AE7B20>("..this.battleResult.round.."回合)</color>"
return data
end
function this.GetBttleResultRelicdsAddition(treasureList)
local num = 0
for i = 1, #treasureList do
num = num + QijieHolyConfig[treasureList[i]].Addition
end
return num/100
end
--获取遗物效果
function this.GetTreasureEffect(treasureList)
local moneyString = ""
@ -276,13 +281,13 @@ function this.GetSring(stringList,type)
local str = ""
for k,v in pairs(stringList) do
-- LogPink("Desc1:"..tostring(v.title))
str = str..v.title
for m,n in pairs(v) do
if tonumber(m) then
str = str..v.title
-- LogBlue("m2:"..tostring(tonumber(m)))
-- LogBlue("Desc2:"..tostring(n.Desc))
-- LogBlue("Value2:"..tostring(n.Value))
str = str..string.format(n.Desc,"<color=#d70f09>"..n.Value.."%</color>")
str = str..string.format(n.Desc,n.Value.."%")
if type and type == 1 then
str = str.."\n"
end

View File

@ -313,7 +313,7 @@ function this.SetHeadsInfo(data,root,index,name,level)
elseif sData.rankType == RANK_TYPE.WORLDARENA then--玉虚论道
UIManager.OpenPanel(UIName.WorldArenaOtherTeamPanel, data.uid,2)
elseif sData.rankType == RANK_TYPE.QIJIESHILIAN_RANK then--七界试炼
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid,PLAYER_INFO_VIEW_TYPE.QIJIESHILIAN,data.serverName and data.serverName or nil)
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid,PLAYER_INFO_VIEW_TYPE.NORMAL,data.serverName and data.serverName or nil)
else
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid)
end