【七界试炼】结算界面提交

dev_chengFeng
ZhangBiao 2021-09-17 14:38:05 +08:00
parent ad4c218f01
commit 2925de34e8
4 changed files with 1475 additions and 1454 deletions

File diff suppressed because it is too large Load Diff

View File

@ -393,7 +393,7 @@ function this.BattleEnd(result)
drop = {},
}
-- LogGreen("fightType:"..fightType)
LogGreen("fightType:"..fightType)
-- 需要和服务器确认结果
if fightType == BATTLE_TYPE.MAP_FIGHT
or fightType == BATTLE_TYPE.MONSTER_CAMP
@ -505,9 +505,6 @@ function this.ShowBattleResult(result, msg)
--罗浮争锋
elseif fightType == BATTLE_TYPE.JumpServerhightLadder then
this.ShowBattleResultByJumpServerHightLadder(result)
-- --无尽副本
-- elseif fightType == BATTLE_TYPE.MAP_FIGHT and CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
-- this.ShowBattleResultByMapFight()
--新回放功能(判断上次战斗是什么类型并做什么内容 逻辑和正常战斗处理一样)
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.GuildTranscript then-- 公会副本结算界面特殊显示
@ -522,21 +519,21 @@ function this.ShowBattleResult(result, msg)
this.ShowBattleResultByTaSuiLingXiao()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.JumpServerhightLadder then
this.ShowBattleResultByJumpServerHightLadder(result)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.QIJIE_FIGHT then
this.ShowBattleResultByQiJieShiLian()
else
if result == 0 then -- 失败
local haveRecord = BattleRecordManager.isHaveRecord()
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
else -- 胜利
LogRed("isBack:"..tostring(isBack))
UIManager.OpenPanel(UIName.BattleWinPopup, this, isBack, fightType, this.lastBattleResult)
end
end
elseif fightType == BATTLE_TYPE.TASUILINGXIAO then
this.ShowBattleResultByTaSuiLingXiao()
elseif fightType == BATTLE_TYPE.QIJIE_FIGHT then
this.ShowBattleResultByQiJieShiLian()
-- elseif fightType == BATTLE_TYPE.QIJIE_FIGHT then
-- this.ShowBattleResultByQiJieShiLian()
else
LogRed("result:"..tostring(result))
if result == 0 then -- 失败
local haveRecord = BattleRecordManager.isHaveRecord()
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
@ -672,27 +669,6 @@ function this.ShowBattleResultByTaSuiLingXiao()
end, 0.1):Start()
end
-- 七界试炼结算界面特殊显示
function this.ShowBattleResultByQiJieShiLian()
Timer.New(function()
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
if bestData then
-- 胜利显示本场比赛的表现最好的英雄
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, QiJieShiLianManager.battleResult.drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
this:ClosePanel()
end
end, 10,true,true)
end)
end
end, 0.1):Start()
end
-- 战斗波次变化回调
function this.OnOrderChanged(order)
-- body

View File

@ -24,7 +24,6 @@ function BattleWinPopup:BindEvent()
Util.AddClick(this.btnWin, function ()
self:ClosePanel()
-- self:NextStep()
if m_fightType == BATTLE_TYPE.Test then
if m_battlePanel then
m_battlePanel:ClosePanel()
@ -68,6 +67,8 @@ function BattleWinPopup:NextStep()
this.JumpServerHithtLadder()
elseif m_fightType == BATTLE_TYPE.EndlessMpaFight then--无尽地图战斗
this.ShowBattleResultByEndless()
elseif m_fightType == BATTLE_TYPE.QIJIE_FIGHT then--七界试炼战斗
this.ShowBattleResultByQiJie()
--新回放功能
elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then-- 新关卡战斗
@ -86,6 +87,8 @@ function BattleWinPopup:NextStep()
this.ShowBattleResultByFightLevelAssistantType(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.JumpServerhightLadder then
this.JumpServerHithtLadder()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.QIJIE_FIGHT then
this.ShowBattleResultByQiJie()
end
end
end
@ -112,6 +115,28 @@ function this.ShowBattleResultByMapFight()
end
end
--七界试炼战斗界面特殊显示
function this.ShowBattleResultByQiJie()
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
if bestData then
-- 胜利显示本场比赛的表现最好的英雄
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, QiJieShiLianManager.battleResult.drop, 1,function(isBackBattle)
if not isBackBattle then
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
this:ClosePanel()
end
end, 10, true,true)
end)
end
end
--无尽副本战斗界面特殊显示
function this.ShowBattleResultByEndless()
local bestData, allDamage= BattleRecordManager.GetBattleBestData()

View File

@ -37,19 +37,15 @@ function RewardItemPopup:InitComponent()
this.dropGrid2= Util.GetGameObject(self.gameObject, "ScrollView/Content/grid2/scorll/grid")
--关卡等级经验
this.lvAndExpGo=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/lvAndExpGo")
this.lv=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/lvAndExpGo/lv"):GetComponent("Text")
this.exp=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/lvAndExpGo/exp"):GetComponent("Slider")
this.expText=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/lvAndExpGo/exp/Text"):GetComponent("Text")
this.lvUpImage=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/lvAndExpGo/lvUpImage")
-- 地图探索按钮
this.btnMapBack = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/btnBack")
this.lvAndExpGo=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/lvAndExpGo")
this.lv=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/lvAndExpGo/lv"):GetComponent("Text")
this.exp=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/lvAndExpGo/exp"):GetComponent("Slider")
this.expText=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/lvAndExpGo/exp/Text"):GetComponent("Text")
this.lvUpImage=Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/lvAndExpGo/lvUpImage")
-- 战斗结果按钮
this.btnResult = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/btnResult")
this.btnBattleBack = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/btnBattleBack")
this.btnResult = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/Btns/btnResult")
this.btnBattleBack = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/Btns/btnBattleBack")
-- 战斗回放按钮
-- 任意位置继续
this.btnGoOn = Util.GetGameObject(self.gameObject, "btnBack/Image")
--车迟斗法 显示
this.guildCarDelay = Util.GetGameObject(self.gameObject, "ScrollView/Content/Show/guildCarDelay")
@ -74,13 +70,8 @@ function RewardItemPopup:InitComponent()
this.noRewardText = Util.GetGameObject(this.tasuilingxiao,"Text")
--山河社稷图主
this.GXHD=Util.GetGameObject(self.gameObject,"ScrollView/Content/bg/Image")
-- this.FightLevel=Util.GetGameObject(self.gameObject,"ScrollView/Content/bg/FightLevel")
this.FightLevel2=Util.GetGameObject(self.gameObject,"ScrollView/Content/Show/FightLevel")
this.FightLevel3=Util.GetGameObject(self.gameObject,"FightLevel3")
-- this.FightLevelStarGos = {}
-- for i = 1, 3 do
-- this.FightLevelStarGos[i] = Util.GetGameObject(this.FightLevel,"star ("..i..")")
-- end
--山河社稷图副关卡
this.FightLevelAssistant=Util.GetGameObject(self.gameObject,"ScrollView/Content/Show/FightLevelAssistant")
starListEffect = {}
@ -91,7 +82,7 @@ function RewardItemPopup:InitComponent()
end
this.isFirstEffect = Util.GetGameObject(this.FightLevel3,"isFirst")
--七界试炼挑战条件信息
this.qiJieCondition = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/qiJieInfo")
this.qiJieCondition = Util.GetGameObject(self.gameObject, "ScrollView/Content/bottom/grid/qiJieInfo")
end
--绑定事件(用于子类重写)
@ -107,9 +98,6 @@ function RewardItemPopup:BindEvent()
end
end
end)
Util.AddClick(this.btnMapBack, function ()
self:ClosePanel()
end)
Util.AddClick(this.btnResult, function ()
UIManager.OpenPanel(UIName.DamageResultPanel, 1)
end)
@ -171,7 +159,6 @@ function RewardItemPopup:OnOpen(...)
-- 设置背景遮罩的显隐
local isHideBG = args[6]
this.btnBack:GetComponent("Image").color = Color.New(0, 0, 0, isHideBG and 0 or 0.8)
this.btnGoOn:SetActive(not isHideBG)
if compShowType == 3 then
this.GuildCarDelayShow()
@ -261,12 +248,10 @@ function this.SetComPShowState(type)
this.ScrollView:SetActive(#itemDataList >= 1 )
this.lvAndExpGo:SetActive(type == 1)
this.btnMapBack:SetActive(type == 2)
this.guildCarDelay:SetActive(type == 3)
this.guildDeathPos:SetActive(type == 4)
this.guildTranscript:SetActive(type == 6)
this.tasuilingxiao:SetActive(type == 7)
-- this.FightLevel:SetActive(type == 8)
if type == 7 then
this.noRewardText:SetActive(#itemDataList < 1)
end
@ -312,14 +297,7 @@ function this.TaSuiLingXiaoShow()
end
--山河社稷图
function this.FightLevelShow()
-- local GetHardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
-- for i = 1, #this.FightLevelStarGos do
-- local noStarImage = Util.GetGameObject(this.FightLevelStarGos[i], "noStarImage")
-- local getStarImage = Util.GetGameObject(this.FightLevelStarGos[i], "getStarImage")
-- noStarImage:SetActive(not FightLevelManager.GetCurLevelStarState(GetHardStageFightResponseMsg.stars,i))
-- getStarImage:SetActive(FightLevelManager.GetCurLevelStarState(GetHardStageFightResponseMsg.stars,i))
-- Util.GetGameObject(this.FightLevelStarGos[i], "Text"):GetComponent("Text").text = i
-- end
local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
local oldBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData()
local curBattlefightLevelData = FightLevelManager.GetChapterLevelData(oldBattlefightLevelData.config.Chapter,oldBattlefightLevelData.nodeId)
@ -327,7 +305,6 @@ function this.FightLevelShow()
this.isFirstEffect:SetActive(HardStageFightResponseMsg.currentIsHonour)
if starListEffect and #starListEffect > 0 then
for i=1,#starListEffect do
-- Util.AddParticleSortLayer(starListEffect[i], this.sortingOrder - (sortingOrder - 1))
Util.SetParticleSortLayer(starListEffect[i], this.sortingOrder + 1)
end
end
@ -392,14 +369,12 @@ function RewardItemPopup:OnSortingOrderChange()
if itemListPrefab[i] and itemDataList[i] then
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
-- view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)
view:SetEffectLayer(self.sortingOrder)
end
end
end
if starListEffect and #starListEffect > 0 then
for i=1,#starListEffect do
-- Util.AddParticleSortLayer(starListEffect[i], self.sortingOrder - (sortingOrder - 1))
Util.SetParticleSortLayer(starListEffect[i], self.sortingOrder + 1)
end
sortingOrder = self.sortingOrder
@ -413,15 +388,7 @@ function RewardItemPopup:SetItemShow(drop)
itemDataList[i].itemConfig = itemConfig[itemDataList[i].sId]
end
self:ItemDataListSort(itemDataList)
-- for i = 1, math.max(#itemDataList, #itemListPrefab) do
-- local go = itemListPrefab[i]
-- if not go then
-- go = SubUIManager.Open(SubUIConfig.ItemView, this.dropGrid.transform)
-- go.gameObject.name = "frame"..i
-- itemListPrefab[i] = go
-- end
-- go.gameObject:SetActive(false)
-- end
if #itemDataList <= 25 then
callList:Clear()
callList:Push(function ()
@ -436,7 +403,6 @@ function RewardItemPopup:SetItemShow(drop)
end
end, 0.5):Start()
--在关卡界面获得装备 刷新下btview成员红点
-- Game.GlobalEvent:DispatchEvent(GameEvent.Equip.EquipChange)
end)
for i = #itemDataList, 1, -1 do
isPlayerAniEnd = false
@ -453,7 +419,6 @@ function RewardItemPopup:SetItemShow(drop)
btn.enabled = true
end)
--改为后端更新
--this.SetItemData2(itemDataList[i])
Timer.New(function ()
isPopGetSSR = false
callList:Pop()()
@ -468,8 +433,6 @@ function RewardItemPopup:SetItemShow(drop)
UIManager.OpenPanel(UIName.DropGetSSRHeroShopPanel,curItemData.backData, func)
elseif curItemData.configData and curItemData.itemType==1 and
(curItemData.configData.ItemType == ItemType.Title or curItemData.configData.ItemType == ItemType.Ride) then--皮肤 坐骑
-- isPopGetSSR = true
-- UIManager.OpenPanel(UIName.DropGetPlayerDecorateShopPanel,curItemData.backData, func)
func()
else
func()
@ -511,11 +474,8 @@ function this.SetItemData2(itemdata)
end
elseif itemdata.itemType==5 then
if bagType==1 then
--SoulPrintManager.InitServerData(itemdata.data)
EquipTreasureManager.InitSingleTreasureData(itemdata.backData)
elseif bagType==2 then
--SoulPrintManager.InitMapShotTimeSoulPrintBagData(itemdata.backData)
--SoulPrintManager.StoreData(itemdata.data)
end
elseif itemdata.itemType==6 then
if bagType==1 then
@ -526,7 +486,6 @@ function this.SetItemData2(itemdata)
end
--关卡通关掉落时展示经验等级信息
function this.ShowLvAndExp()
--this.lvAndExpGo:SetActive(compShowType == 1)
if compShowType == 1 then
this.exp.value=PlayerManager.exp/userLevelData[PlayerManager.level].Exp
this.expText.text=PlayerManager.exp.."/"..userLevelData[PlayerManager.level].Exp