From 1e6d693209adec5a7141166ccdb400562ec2cfa6 Mon Sep 17 00:00:00 2001 From: yuanshuai <243578945@qq.com> Date: Thu, 5 May 2022 16:46:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20=E5=B1=B1=E6=B2=B3=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=9B=BE=E5=88=86=E9=A1=B5=E8=AF=B7=E6=B1=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Message/PlayerInfoProto_pb.lua | 26 +++++++++++++++++-- .../~Lua/Modules/Bag/BagPanel.lua | 4 +-- .../Modules/FightLevel/FightLevelManager.lua | 9 ++++--- .../Modules/Formation/FormationManager.lua | 1 - .../~Lua/Modules/Net/NetManager.lua | 16 +++++++++--- .../~Lua/Modules/Practice/PracticePanel.lua | 1 - 6 files changed, 44 insertions(+), 13 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua b/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua index cb7106ad42..1c4e457e51 100644 --- a/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua +++ b/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua @@ -572,9 +572,11 @@ WELFAREREDPACKETSENDREQUEST_ID_FIELD = protobuf.FieldDescriptor(); WELFAREREDPACKETSENDRESPONSE = protobuf.Descriptor(); WELFAREREDPACKETSENDRESPONSE_REDPACKET_FIELD = protobuf.FieldDescriptor(); HARDSTAGEREQUEST = protobuf.Descriptor(); +HARDSTAGEREQUEST_PAGE_FIELD = protobuf.FieldDescriptor(); HARDSTAGERESPONSE = protobuf.Descriptor(); HARDSTAGERESPONSE_INFO_FIELD = protobuf.FieldDescriptor(); HARDSTAGERESPONSE_ISTAKE_FIELD = protobuf.FieldDescriptor(); +HARDSTAGERESPONSE_ISEND_FIELD = protobuf.FieldDescriptor(); HARDSTAGEFIGHTREQUEST = protobuf.Descriptor(); HARDSTAGEFIGHTREQUEST_NODEID_FIELD = protobuf.FieldDescriptor(); HARDSTAGEFIGHTREQUEST_TEAMID_FIELD = protobuf.FieldDescriptor(); @@ -5940,11 +5942,21 @@ WELFAREREDPACKETSENDRESPONSE.enum_types = {} WELFAREREDPACKETSENDRESPONSE.fields = {WELFAREREDPACKETSENDRESPONSE_REDPACKET_FIELD} WELFAREREDPACKETSENDRESPONSE.is_extendable = false WELFAREREDPACKETSENDRESPONSE.extensions = {} +HARDSTAGEREQUEST_PAGE_FIELD.name = "page" +HARDSTAGEREQUEST_PAGE_FIELD.full_name = ".rpc.protocols.HardStageRequest.page" +HARDSTAGEREQUEST_PAGE_FIELD.number = 1 +HARDSTAGEREQUEST_PAGE_FIELD.index = 0 +HARDSTAGEREQUEST_PAGE_FIELD.label = 1 +HARDSTAGEREQUEST_PAGE_FIELD.has_default_value = false +HARDSTAGEREQUEST_PAGE_FIELD.default_value = 0 +HARDSTAGEREQUEST_PAGE_FIELD.type = 5 +HARDSTAGEREQUEST_PAGE_FIELD.cpp_type = 1 + HARDSTAGEREQUEST.name = "HardStageRequest" HARDSTAGEREQUEST.full_name = ".rpc.protocols.HardStageRequest" HARDSTAGEREQUEST.nested_types = {} HARDSTAGEREQUEST.enum_types = {} -HARDSTAGEREQUEST.fields = {} +HARDSTAGEREQUEST.fields = {HARDSTAGEREQUEST_PAGE_FIELD} HARDSTAGEREQUEST.is_extendable = false HARDSTAGEREQUEST.extensions = {} HARDSTAGERESPONSE_INFO_FIELD.name = "info" @@ -5968,11 +5980,21 @@ HARDSTAGERESPONSE_ISTAKE_FIELD.default_value = false HARDSTAGERESPONSE_ISTAKE_FIELD.type = 8 HARDSTAGERESPONSE_ISTAKE_FIELD.cpp_type = 7 +HARDSTAGERESPONSE_ISEND_FIELD.name = "isEnd" +HARDSTAGERESPONSE_ISEND_FIELD.full_name = ".rpc.protocols.HardStageResponse.isEnd" +HARDSTAGERESPONSE_ISEND_FIELD.number = 3 +HARDSTAGERESPONSE_ISEND_FIELD.index = 2 +HARDSTAGERESPONSE_ISEND_FIELD.label = 1 +HARDSTAGERESPONSE_ISEND_FIELD.has_default_value = false +HARDSTAGERESPONSE_ISEND_FIELD.default_value = 0 +HARDSTAGERESPONSE_ISEND_FIELD.type = 5 +HARDSTAGERESPONSE_ISEND_FIELD.cpp_type = 1 + HARDSTAGERESPONSE.name = "HardStageResponse" HARDSTAGERESPONSE.full_name = ".rpc.protocols.HardStageResponse" HARDSTAGERESPONSE.nested_types = {} HARDSTAGERESPONSE.enum_types = {} -HARDSTAGERESPONSE.fields = {HARDSTAGERESPONSE_INFO_FIELD, HARDSTAGERESPONSE_ISTAKE_FIELD} +HARDSTAGERESPONSE.fields = {HARDSTAGERESPONSE_INFO_FIELD, HARDSTAGERESPONSE_ISTAKE_FIELD, HARDSTAGERESPONSE_ISEND_FIELD} HARDSTAGERESPONSE.is_extendable = false HARDSTAGERESPONSE.extensions = {} HARDSTAGEFIGHTREQUEST_NODEID_FIELD.name = "nodeId" diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua index 07c8c544b0..1c7bf09278 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua @@ -91,7 +91,6 @@ function BagPanel:BindEvent() return end sortIndex = i - LogError("i==="..i) this.OnClickTabBtn(sortIndex, tabs1[sortIndex]) end end) @@ -236,7 +235,6 @@ function this.OnClickTabBtn(_index, _clickBtn, isTop,isNotAni,_tabIndex) itemData = {} local itemNumText = this.itemNumText:GetComponent("Text") this:SetSelectBtn(_clickBtn) - print("_index ".._index) if _index == ItemBaseType.Equip then local allEquipData = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip) -- local allEquipNum = 0 @@ -524,7 +522,7 @@ function this.SingleItemDataShow(_go, _itemData) local redPoint = Util.GetGameObject(_go.gameObject, "GameObject/redPoint") Util.AddOnceClick(Util.GetGameObject(_go.gameObject, "GameObject/item/frame"), function() if _itemData.itemConfig then - LogError("_itemData.itemConfig.ItemBaseType==".._itemData.itemConfig.ItemBaseType) + -- LogError("_itemData.itemConfig.ItemBaseType==".._itemData.itemConfig.ItemBaseType) if _itemData.itemConfig.ItemBaseType == ItemBaseType.Equip then UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2,this, _itemData,1,true,true,nil,function() this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true) diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua index a43f1b98cb..c3c30614eb 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua @@ -51,7 +51,7 @@ function this.Initialize() this.curSelect = 0 end --后端更新章节信息 -function this.UpdataChapterData(msg,_isShowChapterOpenPopup) +function this.UpdataChapterData(msg,isEnd,_isShowChapterOpenPopup) local oldChapterId = this.GetCurChapterId() if msg then for i = 1, #msg.chapter do @@ -86,8 +86,11 @@ function this.UpdataChapterData(msg,_isShowChapterOpenPopup) table.sort(singleHardStageChapter.reward, function(a,b) return a.id < b.id end) allChapterData[msg.chapter[i].chapterId] = singleHardStageChapter end - CheckRedPointStatus(RedPointType.FightLevelBoxReward) - PracticeManager.StarNum = FightLevelManager.GetAllChapterStars() + if isEnd==1 then + CheckRedPointStatus(RedPointType.FightLevelBoxReward) + PracticeManager.StarNum = FightLevelManager.GetAllChapterStars() + end + end end --获取整个章节信息 diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index d178b4fcf2..b0cf370106 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -325,7 +325,6 @@ function this.GetFormationPower(formationId) -- 刷新后端战斗力 if power2 > PlayerManager.maxForce then - Log("发送队伍战力改变 ~~~~~~~~~~~~~~ ") NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)--targetTeamId PlayerManager.maxForce = power2 end diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index cc9c2679a8..a346172f76 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -5534,17 +5534,27 @@ function NetManager.HardStageFightRequest(_nodeId,_teamId,func) end end) end +local page=1 --山河社稷图初始化数据 function NetManager.HardStageRequest(func) local data = PlayerInfoProto_pb.HardStageRequest() + data.page=page + -- LogBlue("~~~~~~~~~~~~~~~~"..page) local msg = data:SerializeToString() Network:SendMessageWithCallBack(MessageTypeProto_pb.HARD_STAGE_INFO_REQUEST, MessageTypeProto_pb.HARD_STAGE_INFO_RESPONSE, msg, function(buffer) local data = buffer:DataByte() local msg = PlayerInfoProto_pb.HardStageResponse() msg:ParseFromString(data) - FightLevelManager.UpdataChapterData(msg.info) - if func then - func(msg) + FightLevelManager.UpdataChapterData(msg.info,msg.isEnd,false) + -- LogBlue("~~~~~~~~~~~~~~~~"..msg.isEnd) + if msg.isEnd==1 then + page=1 + if func then + func(msg) + end + else + page=page+1 + this.HardStageRequest(func) end end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua index 07835101cc..d9dedc4e62 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua @@ -318,7 +318,6 @@ function Practice:OnShow() CheckRedPointStatus(RedPointType.Practice_Cultivation) FormationManager.RefreshMainFormationPower() self.curLevelConfig = PracticeManager.GetCurConfigData() - Log("当前修行等级Id:"..tostring(PracticeManager.PracticeLevel)) oldPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) oldBigLevel = PracticeManager.PracticeBigLevel self.pointData = PracticeManager.GetPointsData() From eca9a7d052641e939ad6a5f0ec33fd78570661da Mon Sep 17 00:00:00 2001 From: yuanshuai <243578945@qq.com> Date: Thu, 5 May 2022 17:16:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=BC=8F=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index 1d0ae4b9d0..c9bf6e9331 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -1017,7 +1017,7 @@ function this.HardStageResponse(buffer) local data = buffer:DataByte() local msg = PlayerInfoProto_pb.HardStageResponse() msg:ParseFromString(data) - FightLevelManager.UpdataChapterData(msg.info,true) + FightLevelManager.UpdataChapterData(msg.info,msg.isEnd,true) end --神印信息推送