【七界试炼】提交
parent
524521d526
commit
0422b5c738
|
@ -1074,6 +1074,7 @@ JumpType = {
|
||||||
JumpServerHightLadder = 82,--灵兽山
|
JumpServerHightLadder = 82,--灵兽山
|
||||||
HongMengZhen = 86,-- 鸿蒙阵
|
HongMengZhen = 86,-- 鸿蒙阵
|
||||||
FightLevel = 107,-- 山河社稷图
|
FightLevel = 107,-- 山河社稷图
|
||||||
|
QiJieShiLian = 112,--七界试炼
|
||||||
|
|
||||||
BuyVigor = 10000, --体力购买
|
BuyVigor = 10000, --体力购买
|
||||||
BuyGold = 10001, --金币购买
|
BuyGold = 10001, --金币购买
|
||||||
|
@ -1113,7 +1114,6 @@ JumpType = {
|
||||||
firstRecharge = 30001,
|
firstRecharge = 30001,
|
||||||
ZhiZunJiangShi = 30002,
|
ZhiZunJiangShi = 30002,
|
||||||
SurpriseBox = 40001,--惊喜礼盒
|
SurpriseBox = 40001,--惊喜礼盒
|
||||||
QiJieShiLian = 40026,--七界试炼
|
|
||||||
|
|
||||||
linglongShangShi = 20005,
|
linglongShangShi = 20005,
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,15 +105,33 @@ function GeneralTreasurePanel:showTaskList(isTop,isAni)
|
||||||
end,not isTop,not isAni)
|
end,not isTop,not isAni)
|
||||||
--4 未达成 3 可再次领取 2 可领取 1 已领取 -1 完美领取(充钱领取过的)
|
--4 未达成 3 可再次领取 2 可领取 1 已领取 -1 完美领取(充钱领取过的)
|
||||||
--定位打开界面时位置
|
--定位打开界面时位置
|
||||||
|
-- if isTop then
|
||||||
local t = 0
|
local t = 0
|
||||||
local State = self.treasureData.treasureState == 0 and 2 or 3
|
if self.treasureData.treasureState == 0 then
|
||||||
for i = 1, #self.treasureData.dataList do
|
for i = 1, #self.treasureData.dataList do
|
||||||
if self.treasureData.dataList[i].State == State or self.treasureData.dataList[i].State == 4 then
|
if self.treasureData.dataList[i].State == 2 then
|
||||||
t = i
|
t = i
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
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
|
||||||
|
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)
|
self.ScrollView:SetIndex(t-1)
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
--单个任务
|
--单个任务
|
||||||
|
|
|
@ -96,7 +96,7 @@ end
|
||||||
|
|
||||||
function QiJieTreasure:Refresh(_tabNum)
|
function QiJieTreasure:Refresh(_tabNum)
|
||||||
self.dataList = QiJieShiLianManager.FormatTreasureData(_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.ScrollView:SetData(self.dataList, function(index, go)
|
||||||
self:SetSingleData(index,go,self.dataList[index])
|
self:SetSingleData(index,go,self.dataList[index])
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -290,13 +290,13 @@ function this:AddListener()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:RemoveListener()
|
function this:RemoveListener()
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.QiJieShiLian.CloseBuyTreasure, self.CheckClose,self)
|
Game.GlobalEvent:RemoveEvent(GameEvent.QiJieShiLian.CloseBuyTreasure, self.CheckClose,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function this:CheckClose()
|
function this:CheckClose()
|
||||||
if curType == 4 then
|
if curType == 4 then
|
||||||
this:ClosePanel()
|
parent:ClosePanel()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,9 @@ end
|
||||||
function this.MixTreasureServerAndLocalData(msg)
|
function this.MixTreasureServerAndLocalData(msg)
|
||||||
this.treasureActiveList = {}
|
this.treasureActiveList = {}
|
||||||
for i = 1, #msg.info do
|
for i = 1, #msg.info do
|
||||||
|
if msg.info[i].status == 1 then
|
||||||
table.insert(this.treasureActiveList,msg.info[i].id)
|
table.insert(this.treasureActiveList,msg.info[i].id)
|
||||||
|
end
|
||||||
if this.treasureList[msg.info[i].id] then
|
if this.treasureList[msg.info[i].id] then
|
||||||
this.treasureList[msg.info[i].id].state = msg.info[i].status
|
this.treasureList[msg.info[i].id].state = msg.info[i].status
|
||||||
else
|
else
|
||||||
|
@ -202,22 +204,25 @@ function this.GetBattleResult()
|
||||||
local config = QijieStage[this.curLevelId]
|
local config = QijieStage[this.curLevelId]
|
||||||
local data = {}
|
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[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>"
|
data[2] = "<color=#F9E7D3>遗物加成:</color> <color=#3DE181>"..(this.GetBttleResultRelicdsAddition(this.battleResult.relicIds)).."%</color>\n<color=#AE7B20>("..#this.battleResult.relicIds.."个)</color>"
|
||||||
local bonue = config.RoundReward[1][2]
|
local bonue = 0
|
||||||
for i = 1, #config.RoundReward do
|
for i = #config.RoundReward, 1, -1 do
|
||||||
if this.battleResult.round > config.RoundReward[i][1] then
|
if this.battleResult.round <= config.RoundReward[i][1] then
|
||||||
bonue = config.RoundReward[i][2]
|
bonue = config.RoundReward[i][2]
|
||||||
if config.RoundReward[i+1] then
|
|
||||||
bonue = config.RoundReward[i][2]
|
|
||||||
else
|
|
||||||
bonue = 0
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
data[3] = "<color=#F9E7D3>回合加成:</color> <color=#3DE181>"..(bonue/100).."%</color>\n<color=#AE7B20>("..this.battleResult.round.."回合)</color>"
|
data[3] = "<color=#F9E7D3>回合加成:</color> <color=#3DE181>"..(bonue/100).."%</color>\n<color=#AE7B20>("..this.battleResult.round.."回合)</color>"
|
||||||
return data
|
return data
|
||||||
end
|
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)
|
function this.GetTreasureEffect(treasureList)
|
||||||
local moneyString = ""
|
local moneyString = ""
|
||||||
|
@ -276,13 +281,13 @@ function this.GetSring(stringList,type)
|
||||||
local str = ""
|
local str = ""
|
||||||
for k,v in pairs(stringList) do
|
for k,v in pairs(stringList) do
|
||||||
-- LogPink("Desc1:"..tostring(v.title))
|
-- LogPink("Desc1:"..tostring(v.title))
|
||||||
str = str..v.title
|
|
||||||
for m,n in pairs(v) do
|
for m,n in pairs(v) do
|
||||||
if tonumber(m) then
|
if tonumber(m) then
|
||||||
|
str = str..v.title
|
||||||
-- LogBlue("m2:"..tostring(tonumber(m)))
|
-- LogBlue("m2:"..tostring(tonumber(m)))
|
||||||
-- LogBlue("Desc2:"..tostring(n.Desc))
|
-- LogBlue("Desc2:"..tostring(n.Desc))
|
||||||
-- LogBlue("Value2:"..tostring(n.Value))
|
-- 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
|
if type and type == 1 then
|
||||||
str = str.."\n"
|
str = str.."\n"
|
||||||
end
|
end
|
||||||
|
|
|
@ -313,7 +313,7 @@ function this.SetHeadsInfo(data,root,index,name,level)
|
||||||
elseif sData.rankType == RANK_TYPE.WORLDARENA then--玉虚论道
|
elseif sData.rankType == RANK_TYPE.WORLDARENA then--玉虚论道
|
||||||
UIManager.OpenPanel(UIName.WorldArenaOtherTeamPanel, data.uid,2)
|
UIManager.OpenPanel(UIName.WorldArenaOtherTeamPanel, data.uid,2)
|
||||||
elseif sData.rankType == RANK_TYPE.QIJIESHILIAN_RANK then--七界试炼
|
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
|
else
|
||||||
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid)
|
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue