【山河社稷图】提交
parent
54fa0110e5
commit
78e1a2b5a4
|
|
@ -363,7 +363,6 @@ function this.GetBattleServerData(msg, isFightPlayer)
|
|||
if not isFightPlayer then
|
||||
local monsterConfig = ConfigManager.GetConfigData(ConfigName.MonsterConfig, tonumber(data2.fightUnitList[j].unitId))
|
||||
local position = tonumber(data2.fightUnitList[j].position)
|
||||
LogYellow("position "..position)
|
||||
local star = tonumber(data2.fightUnitList[j].star)
|
||||
local skin=tonumber(data2.fightUnitList[j].skinId)
|
||||
skills = string.split(data2.fightUnitList[j].unitSkillIds, "#")
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ function FightLevelChapterPanel:OnSortingOrderChange()
|
|||
end
|
||||
--界面打开时调用(用于子类重写)
|
||||
function FightLevelChapterPanel:OnOpen()
|
||||
-- LogYellow("sssssssssssssssss")
|
||||
-- LogYellow(bit.band(1,3))
|
||||
-- LogYellow(bit.band(2,3))
|
||||
-- LogYellow(bit.band(4,3))
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ function this.Initialize()
|
|||
HardStageNode.nodeId = curChapterAllLevel[j].Id
|
||||
HardStageNode.type = curChapterAllLevel[j].StageType--类型:0.大节点1.小节点
|
||||
HardStageNode.state = 0--状态:0-7星级状态,8为荣耀三星,0为小节点未通过1为小节点通过
|
||||
HardStageNode.isFirst = false--是否是第一次荣耀
|
||||
HardStageNode.config = curChapterAllLevel[j]--表
|
||||
singleChapterData.node[HardStageNode.nodeId] = HardStageNode
|
||||
end
|
||||
LogYellow("LengthOfTable(singleChapterData.node) "..LengthOfTable(singleChapterData.node))
|
||||
singleChapterData.reward = {}
|
||||
singleChapterData.curMaxStarNum = curMaxStarNum--章节总星数
|
||||
allChapterData[config.Id] = singleChapterData
|
||||
|
|
@ -49,13 +49,11 @@ function this.Initialize()
|
|||
end
|
||||
--后端更新章节信息
|
||||
function this.UpdataChapterData(msg,_isShowChapterOpenPopup)
|
||||
LogYellow("msg.chapter "..#msg.chapter)
|
||||
local oldChapterId = this.GetCurChapterId()
|
||||
if msg then
|
||||
for i = 1, #msg.chapter do
|
||||
local singleHardStageChapter = allChapterData[msg.chapter[i].chapterId]
|
||||
LogYellow("msg.chapter[i].chapterId "..msg.chapter[i].chapterId.." "..msg.chapter[i].stars.." node num "..#msg.chapter[i].node.." reward num "..#msg.chapter[i].reward)
|
||||
LogYellow("singleHardStageChapter.stars "..singleHardStageChapter.stars)
|
||||
LogYellow("msg.chapter[i].chapterId "..msg.chapter[i].chapterId.." "..msg.chapter[i].stars.." node num "..#msg.chapter[i].node.." reward num "..#msg.chapter[i].reward.." singleHardStageChapter.stars "..singleHardStageChapter.stars)
|
||||
singleHardStageChapter.chapterId = msg.chapter[i].chapterId
|
||||
if singleHardStageChapter.chapterId > oldChapterId and _isShowChapterOpenPopup then
|
||||
this.SetisShowChapterOpenPopup(true)
|
||||
|
|
@ -68,6 +66,7 @@ function this.UpdataChapterData(msg,_isShowChapterOpenPopup)
|
|||
HardStageNode.nodeId = msg.chapter[i].node[j].nodeId
|
||||
HardStageNode.type = msg.chapter[i].node[j].type--类型:0.大节点1.小节点
|
||||
HardStageNode.state = msg.chapter[i].node[j].state--状态:0-7星级状态,8为荣耀三星,0为小节点未通过1为小节点通过
|
||||
HardStageNode.isFirst= msg.chapter[i].node[j].isFirst--是否是第一次荣耀
|
||||
HardStageNode.config = HardStage[msg.chapter[i].node[j].nodeId]--表
|
||||
this.SetCurChapterLevelId(HardStageNode.nodeId)
|
||||
singleHardStageChapter.node[HardStageNode.nodeId] = HardStageNode
|
||||
|
|
@ -76,8 +75,6 @@ function this.UpdataChapterData(msg,_isShowChapterOpenPopup)
|
|||
for k = 1, #msg.chapter[i].reward do
|
||||
local HardStageChapterReward = {}
|
||||
HardStageChapterReward.id = msg.chapter[i].reward[k].id
|
||||
LogYellow("msg.chapter[i].reward[k].id "..msg.chapter[i].reward[k].id)
|
||||
LogYellow("msg.chapter[i].reward[k].state "..msg.chapter[i].reward[k].state)
|
||||
HardStageChapterReward.state = msg.chapter[i].reward[k].state--0.未领取1.已领取
|
||||
HardStageChapterReward.config = HardStageReward[msg.chapter[i].reward[k].id]--表
|
||||
table.insert(singleHardStageChapter.reward,HardStageChapterReward)
|
||||
|
|
@ -87,6 +84,7 @@ function this.UpdataChapterData(msg,_isShowChapterOpenPopup)
|
|||
CheckRedPointStatus(RedPointType.FightLevel)
|
||||
end
|
||||
end
|
||||
--获取整个章节信息
|
||||
function this.GetChapterData(allChapterId)
|
||||
if allChapterId and allChapterId > 0 then
|
||||
return allChapterData[allChapterId]
|
||||
|
|
@ -94,6 +92,14 @@ function this.GetChapterData(allChapterId)
|
|||
return allChapterData
|
||||
end
|
||||
end
|
||||
--获取整个章节中一小关信息
|
||||
function this.GetChapterLevelData(allChapterId,levelId)
|
||||
if allChapterId and allChapterId > 0 and levelId and levelId > 0 then
|
||||
if allChapterData[allChapterId] then
|
||||
return allChapterData[allChapterId].node[levelId]
|
||||
end
|
||||
end
|
||||
end
|
||||
function this.SetCurChapterId(ChapterId)
|
||||
curChapterId = ChapterId
|
||||
end
|
||||
|
|
@ -108,7 +114,6 @@ function this.GetisShowChapterOpenPopup()
|
|||
return isShowChapterOpenPopup
|
||||
end
|
||||
function this.SetCurChapterLevelId(ChapterLevelId)
|
||||
LogYellow("设置最新开启的小关id "..ChapterLevelId)
|
||||
curChapterLevelId = ChapterLevelId
|
||||
end
|
||||
function this.GetCurChapterLevelId()
|
||||
|
|
@ -127,7 +132,6 @@ function this.GetCurLevelStarState(starNum,index)
|
|||
end
|
||||
--请求回放
|
||||
function this.HardStageReportRequset(_fightLevelData, callBack)
|
||||
LogYellow(" _fightLevelData.nodeId ".. _fightLevelData.nodeId)
|
||||
NetManager.HardStageReportRequset( _fightLevelData.nodeId,function (msg)--FIGHT_LEVEL _fightLevelData.config.Chapter,
|
||||
if msg.player and #msg.player > 0 then
|
||||
UIManager.OpenPanel(UIName.FightLevelSingleLevelInfoPopup,FIGHTLEVEL_POPUP_TYPE.BackBattle,msg.player)
|
||||
|
|
@ -140,14 +144,9 @@ end
|
|||
local HardStageFightResponseMsg = {}
|
||||
local curBattlefightLevelData = {}
|
||||
function this.FightLevelFightBattle(_fightLevelData, callBack)
|
||||
LogYellow("山河社稷图请求战斗 星级 ".._fightLevelData.nodeId)
|
||||
LogYellow("UIManager.IsOpen(UIName.FightLevelSingleLevelInfoPopup) "..tostring(UIManager.IsOpen(UIName.FightLevelSingleLevelInfoPopup)))
|
||||
-- if UIManager.IsOpen(UIName.FightLevelSingleLevelInfoPopup) then
|
||||
UIManager.ClosePanel(UIName.FightLevelSingleLevelInfoPopup)
|
||||
-- end
|
||||
UIManager.ClosePanel(UIName.FightLevelSingleLevelInfoPopup)
|
||||
NetManager.HardStageFightRequest(_fightLevelData.nodeId, FormationTypeDef.FIGHT_LEVEL,function (msg)--FIGHT_LEVEL
|
||||
LogYellow("山河社稷图回复战斗 星级 "..msg.stars)
|
||||
LogYellow("山河社稷图回复战斗 drop "..#msg.drop.itemlist)
|
||||
LogYellow("山河社稷图回复战斗 星级 "..msg.stars.." drop "..#msg.drop.itemlist)
|
||||
HardStageFightResponseMsg = msg
|
||||
curBattlefightLevelData = _fightLevelData
|
||||
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then
|
||||
|
|
@ -180,11 +179,11 @@ function this.GetChapterRewardBoxRedPoint()
|
|||
for i = 1, #allChapterData do
|
||||
local curChapterIsShowRed = this.GetSingleChapterRewardBoxRedPoint(i)
|
||||
if curChapterIsShowRed then
|
||||
LogYellow("山河社稷图入口 redpoint true")
|
||||
-- LogYellow("山河社稷图入口 redpoint true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
LogYellow("山河社稷图入口 redpoint false")
|
||||
-- LogYellow("山河社稷图入口 redpoint false")
|
||||
return false
|
||||
end
|
||||
--章节入口红点判断
|
||||
|
|
@ -193,13 +192,13 @@ function this.GetSingleChapterRewardBoxRedPoint(chapterId)
|
|||
if allChapterData[chapterId].reward and #allChapterData[chapterId].reward > 0 then
|
||||
for k = 1, #allChapterData[chapterId].reward do
|
||||
if allChapterData[chapterId].reward[k].state == 0 and allChapterData[chapterId].stars >= allChapterData[chapterId].reward[k].config.Star then
|
||||
LogYellow("chapterId true redpoint: "..chapterId)
|
||||
-- LogYellow("chapterId true redpoint: "..chapterId)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
LogYellow("chapterId false redpoint: "..chapterId)
|
||||
-- LogYellow("chapterId false redpoint: "..chapterId)
|
||||
return false
|
||||
end
|
||||
--编队数据判断
|
||||
|
|
|
|||
|
|
@ -65,12 +65,10 @@ function this.OnShowPanel()
|
|||
this.chapterNameImage.sprite = Util.LoadSprite(chapterData.config.BigNumber)
|
||||
if chapterData.node and LengthOfTable(chapterData.node) > 0 then
|
||||
local curchapterData = {}
|
||||
LogYellow(" "..LengthOfTable(chapterData.node))
|
||||
for key, value in pairs(chapterData.node) do
|
||||
table.insert(curchapterData,value)
|
||||
end
|
||||
table.sort(curchapterData, function(a,b) return a.nodeId < b.nodeId end)
|
||||
LogYellow("curchapterData "..#curchapterData)
|
||||
this.SetSingleLevel(curchapterData)
|
||||
end
|
||||
if chapterData.reward and LengthOfTable(chapterData.reward) > 0 then
|
||||
|
|
@ -92,16 +90,13 @@ function this.SetSingleLevel(levelDatas)
|
|||
end
|
||||
for i = 1, #levelDatas do
|
||||
local levelData = levelDatas[i]
|
||||
LogYellow("i "..i)
|
||||
levelList[i]:SetActive(true)
|
||||
levelList[i].transform.localPosition = Vector3.New(levelDatas[i].config.LevelPointPosition[1],levelDatas[i].config.LevelPointPosition[2],0)
|
||||
local prb1 = Util.GetGameObject(levelList[i], "prb1")
|
||||
local prb2 = Util.GetGameObject(levelList[i], "prb2")
|
||||
local isOpen = this.GetCurLevelIsOpen(levelDatas[i])-- -1 未开启 0 开启 1 需解锁上一关 2 等级不足
|
||||
LogYellow("isOpen "..isOpen.." "..tostring(not (isOpen == 0)))
|
||||
prb1:SetActive(false)
|
||||
prb2:SetActive(false)
|
||||
-- levelList[i]:SetActive(not (levelDatas[i].nodeId > FightLevelManager.GetCurChapterLevelId()))
|
||||
if levelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then --主关卡
|
||||
prb1:SetActive(true)
|
||||
Util.GetGameObject(prb1, "nameBg/levelName"):GetComponent("Text").text = levelData.config.Name
|
||||
|
|
@ -187,7 +182,7 @@ function this.SetlevelBox(_rewardBoxDatas)
|
|||
-- Util.GetGameObject(boxList[i], "UI_Effect_BaoXiang_KeKaiQi"):SetActive(v.state==SingleDailyMissionState.Finish)
|
||||
Util.GetGameObject(boxList[i], "getFinish"):SetActive(false)
|
||||
Util.GetGameObject(boxList[i], "redPoint"):SetActive(false)
|
||||
LogYellow("missionConfigData.state ".._rewardBoxDatas[i].state.." chapterData.stars "..chapterData.stars.." missionConfigData.Star "..missionConfigData.Star)
|
||||
-- LogYellow("missionConfigData.state ".._rewardBoxDatas[i].state.." chapterData.stars "..chapterData.stars.." missionConfigData.Star "..missionConfigData.Star)
|
||||
if _rewardBoxDatas[i].state == 0 then
|
||||
if chapterData.stars >= missionConfigData.Star then
|
||||
Util.GetGameObject(boxList[i], "redPoint"):SetActive(true)
|
||||
|
|
@ -222,24 +217,18 @@ function this.LeftOrRightBtnClickEvent(index)
|
|||
-- chapterData = FightLevelManager.GetChapterData(chapterId)
|
||||
local upChapterId = chapterData.chapterId - 1
|
||||
local upChapterData = FightLevelManager.GetChapterData(upChapterId)
|
||||
LogYellow("upChapterId "..upChapterId.." FightLevelManager.GetCurChapterId() "..FightLevelManager.GetCurChapterId())
|
||||
if upChapterData and upChapterId <= FightLevelManager.GetCurChapterId() then
|
||||
LogYellow("this.leftBtn:SetActive(true)")
|
||||
this.leftBtn:SetActive(true)
|
||||
else
|
||||
LogYellow("this.leftBtn:SetActive(false)")
|
||||
this.leftBtn:SetActive(false)
|
||||
end
|
||||
|
||||
local downChapterId = chapterData.chapterId + 1
|
||||
LogYellow("downChapterId "..downChapterId.." FightLevelManager.GetCurChapterId() "..FightLevelManager.GetCurChapterId())
|
||||
local downChapterData = FightLevelManager.GetChapterData(downChapterId)
|
||||
if downChapterData and downChapterId <= FightLevelManager.GetCurChapterId() then
|
||||
this.rightBtn:SetActive(true)
|
||||
LogYellow(" this.rightBtn:SetActive(true)")
|
||||
else
|
||||
this.rightBtn:SetActive(false)
|
||||
LogYellow(" this.rightBtn:SetActive(false)")
|
||||
end
|
||||
if index and index == 1 then--左
|
||||
chapterId = upChapterId
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ function this.SetInfo(root,data,index)
|
|||
if not this.playerScrollHead[root] then
|
||||
this.playerScrollHead[root]=CommonPool.CreateNode(POOL_ITEM_TYPE.PLAYER_HEAD,headObj)
|
||||
end
|
||||
LogYellow("data.head "..data.head)
|
||||
this.playerScrollHead[root]:Reset()
|
||||
this.playerScrollHead[root]:SetHead(data.head)
|
||||
this.playerScrollHead[root]:SetFrame(data.headFrame)
|
||||
|
|
@ -67,7 +66,7 @@ function this.SetInfo(root,data,index)
|
|||
this.playerScrollHead[root]:SetEffectScale(0.75)
|
||||
|
||||
Util.GetGameObject(root,"name"):GetComponent("Text").text = data.userName
|
||||
-- Util.GetGameObject(root,"warPower/Text"):GetComponent("Text").text = data.warPower
|
||||
Util.GetGameObject(root,"warPower/Text"):GetComponent("Text").text = data.power
|
||||
if data.type == 1 then
|
||||
Util.GetGameObject(root,"ClickBtn/tip"):GetComponent("Text").text = "首次三星通关"
|
||||
elseif data.type == 2 then
|
||||
|
|
|
|||
|
|
@ -893,7 +893,6 @@ function this.BackPatFaceData(buffer)
|
|||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.PushWelfareResponse()
|
||||
msg:ParseFromString(data)
|
||||
LogError("后端拍脸推送")
|
||||
PatFaceManager.SetPatFaceDaqta(msg)
|
||||
end
|
||||
--后端拍脸推送
|
||||
|
|
@ -901,7 +900,6 @@ function this.HardStageResponse(buffer)
|
|||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.HardStageResponse()
|
||||
msg:ParseFromString(data)
|
||||
LogError("后端 山河社稷图 推送")
|
||||
FightLevelManager.UpdataChapterData(msg.info,true)
|
||||
end
|
||||
return this
|
||||
|
|
@ -44,7 +44,6 @@ function BattleWinPopup:NextStep()
|
|||
self:ClosePanel()
|
||||
return
|
||||
end
|
||||
LogYellow("m_fightType "..m_fightType)
|
||||
if m_fightType == BATTLE_TYPE.MAP_FIGHT then --副本战斗结算
|
||||
|
||||
-- local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||
|
|
@ -261,8 +260,10 @@ function this.ShowBattleResultByFightLevelType(drop)
|
|||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
|
||||
LogYellow("山河社稷图战斗获得星级 "..HardStageFightResponseMsg.stars)
|
||||
if HardStageFightResponseMsg.isFirst then
|
||||
local oldBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData()
|
||||
local curBattlefightLevelData = FightLevelManager.GetChapterLevelData(oldBattlefightLevelData.config.Chapter,oldBattlefightLevelData.nodeId)
|
||||
LogYellow("山河社稷图战斗获得星级 "..HardStageFightResponseMsg.stars.." curBattlefightLevelData.isFirst "..tostring(curBattlefightLevelData.isFirst))
|
||||
if curBattlefightLevelData.isFirst then
|
||||
PopupTipPanel.ShowTip("荣耀三星!")
|
||||
end
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||
|
|
@ -276,14 +277,10 @@ function this.ShowBattleResultByFightLevelType(drop)
|
|||
this:ClosePanel()
|
||||
if FightLevelManager.GetisShowChapterOpenPopup() then
|
||||
UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId(),function()
|
||||
-- Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
-- end, 1):Start()
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end)
|
||||
else
|
||||
-- Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
-- end, 1):Start()
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end
|
||||
end
|
||||
end, 8,true,true)
|
||||
|
|
@ -311,9 +308,7 @@ function this.ShowBattleResultByFightLevelAssistantType(drop)
|
|||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
this:ClosePanel()
|
||||
Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end, 1):Start()
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end
|
||||
end)
|
||||
elseif curBattlefightLevelData.state == 1 then
|
||||
|
|
@ -326,9 +321,7 @@ function this.ShowBattleResultByFightLevelAssistantType(drop)
|
|||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
this:ClosePanel()
|
||||
Timer.New(function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end, 1):Start()
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
||||
end
|
||||
end, 9,true,true)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@ function RewardItemPopup:OnOpen(...)
|
|||
this.tasuilingxiao:SetActive(compShowType == 7)--踏碎凌霄
|
||||
this.FightLevel:SetActive(compShowType == 8)--山河社稷图
|
||||
this.GXHD:SetActive(not (compShowType == 8))
|
||||
LogYellow("compShowType "..compShowType)
|
||||
this.FightLevel2:SetActive(compShowType == 8 and (not drop or (#drop.itemlist < 1 and #drop.equipId < 1 and #drop.Hero < 1 and #drop.soulEquip < 1 and #drop.pokemon < 1)))
|
||||
this.FightLevelAssistant:SetActive(compShowType == 9)
|
||||
this.dropGrid:SetActive(false)
|
||||
|
|
@ -197,7 +196,6 @@ function RewardItemPopup:OnOpen(...)
|
|||
table.insert(itemDataList, v)
|
||||
end
|
||||
end
|
||||
LogGreen("Init #itemDataList:"..tostring(#itemDataList))
|
||||
this.InitGrid()
|
||||
if #itemDataList < 1 then
|
||||
self:ClosePanel()
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function this.ReceiveRankingData(msg,fun)
|
|||
--滚动数据
|
||||
local length=#this.curRankingData
|
||||
for i, rank in ipairs(msg.ranks) do
|
||||
LogGreen("UserRank "..rank.rankInfo.rank.." userName "..rank.userName.." rank.rankInfo.param1 "..rank.rankInfo.param1)
|
||||
-- LogGreen("UserRank "..rank.rankInfo.rank.." userName "..rank.userName.." rank.rankInfo.param1 "..rank.rankInfo.param1)
|
||||
this.curRankingData[length+i]=rank
|
||||
end
|
||||
if #msg.ranks < 20 or #this.curRankingData >= 100 then
|
||||
|
|
|
|||
Loading…
Reference in New Issue