From 37e854190b0d9692e640949365f079afdf9e8478 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Wed, 30 Jun 2021 10:36:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=BF=83=E6=84=BF=E6=8A=BD=E5=8D=A1?= =?UTF-8?q?=E3=80=91=E5=A2=9E=E5=8A=A0=E6=89=80=E6=9C=89=E6=8A=BD=E5=8D=A1?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=92=8C=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Message/CommonProto_pb.lua | 31 +++++++++++++++++++ .../~Lua/Message/HeroInfoProto_pb.lua | 14 ++++++++- .../~Lua/Message/PlayerInfoProto_pb.lua | 9 +++--- .../View/GeneralBigPopup_WishDraw.lua | 2 +- .../~Lua/Modules/Net/NetManager.lua | 4 +-- .../~Lua/Modules/Recruit/RecruitManager.lua | 13 ++++++-- .../~Lua/Modules/Recruit/RecruitPanel.lua | 4 +-- 7 files changed, 65 insertions(+), 12 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua b/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua index b5409ec267..8dcfddeab5 100644 --- a/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua +++ b/Assets/ManagedResources/~Lua/Message/CommonProto_pb.lua @@ -699,6 +699,9 @@ WISHDRAWCARDINFO = protobuf.Descriptor(); WISHDRAWCARDINFO_ID_FIELD = protobuf.FieldDescriptor(); WISHDRAWCARDINFO_HEROTID_FIELD = protobuf.FieldDescriptor(); WISHDRAWCARDINFO_STATUS_FIELD = protobuf.FieldDescriptor(); +RANDOMTYPENUM = protobuf.Descriptor(); +RANDOMTYPENUM_TYPE_FIELD = protobuf.FieldDescriptor(); +RANDOMTYPENUM_NUM_FIELD = protobuf.FieldDescriptor(); ERRORRESPONSE_ERRCODE_FIELD.name = "errCode" ERRORRESPONSE_ERRCODE_FIELD.full_name = ".rpc.protocols.ErrorResponse.errCode" @@ -7344,6 +7347,33 @@ WISHDRAWCARDINFO.enum_types = {} WISHDRAWCARDINFO.fields = {WISHDRAWCARDINFO_ID_FIELD, WISHDRAWCARDINFO_HEROTID_FIELD, WISHDRAWCARDINFO_STATUS_FIELD} WISHDRAWCARDINFO.is_extendable = false WISHDRAWCARDINFO.extensions = {} +RANDOMTYPENUM_TYPE_FIELD.name = "type" +RANDOMTYPENUM_TYPE_FIELD.full_name = ".rpc.protocols.randomTypeNum.type" +RANDOMTYPENUM_TYPE_FIELD.number = 1 +RANDOMTYPENUM_TYPE_FIELD.index = 0 +RANDOMTYPENUM_TYPE_FIELD.label = 1 +RANDOMTYPENUM_TYPE_FIELD.has_default_value = false +RANDOMTYPENUM_TYPE_FIELD.default_value = 0 +RANDOMTYPENUM_TYPE_FIELD.type = 5 +RANDOMTYPENUM_TYPE_FIELD.cpp_type = 1 + +RANDOMTYPENUM_NUM_FIELD.name = "num" +RANDOMTYPENUM_NUM_FIELD.full_name = ".rpc.protocols.randomTypeNum.num" +RANDOMTYPENUM_NUM_FIELD.number = 2 +RANDOMTYPENUM_NUM_FIELD.index = 1 +RANDOMTYPENUM_NUM_FIELD.label = 1 +RANDOMTYPENUM_NUM_FIELD.has_default_value = false +RANDOMTYPENUM_NUM_FIELD.default_value = 0 +RANDOMTYPENUM_NUM_FIELD.type = 5 +RANDOMTYPENUM_NUM_FIELD.cpp_type = 1 + +RANDOMTYPENUM.name = "randomTypeNum" +RANDOMTYPENUM.full_name = ".rpc.protocols.randomTypeNum" +RANDOMTYPENUM.nested_types = {} +RANDOMTYPENUM.enum_types = {} +RANDOMTYPENUM.fields = {RANDOMTYPENUM_TYPE_FIELD, RANDOMTYPENUM_NUM_FIELD} +RANDOMTYPENUM.is_extendable = false +RANDOMTYPENUM.extensions = {} ActivityInfo = protobuf.Message(ACTIVITYINFO) ActivityInfo.MissionInfo = protobuf.Message(ACTIVITYINFO_MISSIONINFO) @@ -7466,5 +7496,6 @@ blessReward = protobuf.Message(BLESSREWARD) endlessHero = protobuf.Message(ENDLESSHERO) endlessSign = protobuf.Message(ENDLESSSIGN) fiveResetTowerInfo = protobuf.Message(FIVERESETTOWERINFO) +randomTypeNum = protobuf.Message(RANDOMTYPENUM) wishDrawCardInfo = protobuf.Message(WISHDRAWCARDINFO) diff --git a/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua b/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua index 7b2e3d0055..a7b3ac7428 100644 --- a/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua +++ b/Assets/ManagedResources/~Lua/Message/HeroInfoProto_pb.lua @@ -26,6 +26,7 @@ HERORANDRESPONSE = protobuf.Descriptor(); HERORANDRESPONSE_DROP_FIELD = protobuf.FieldDescriptor(); HERORANDRESPONSE_EXTRABOX_FIELD = protobuf.FieldDescriptor(); HERORANDRESPONSE_MUSTCOUNT_FIELD = protobuf.FieldDescriptor(); +HERORANDRESPONSE_DRAWTIMES_FIELD = protobuf.FieldDescriptor(); TEAMPOSSAVEREQUEST = protobuf.Descriptor(); TEAMPOSSAVEREQUEST_TEAMPOSINFO_FIELD = protobuf.FieldDescriptor(); GETALLTEAMPOSRESPONSE = protobuf.Descriptor(); @@ -416,11 +417,22 @@ HERORANDRESPONSE_MUSTCOUNT_FIELD.default_value = 0 HERORANDRESPONSE_MUSTCOUNT_FIELD.type = 5 HERORANDRESPONSE_MUSTCOUNT_FIELD.cpp_type = 1 +HERORANDRESPONSE_DRAWTIMES_FIELD.name = "drawTimes" +HERORANDRESPONSE_DRAWTIMES_FIELD.full_name = ".rpc.protocols.HeroRandResponse.drawTimes" +HERORANDRESPONSE_DRAWTIMES_FIELD.number = 4 +HERORANDRESPONSE_DRAWTIMES_FIELD.index = 3 +HERORANDRESPONSE_DRAWTIMES_FIELD.label = 3 +HERORANDRESPONSE_DRAWTIMES_FIELD.has_default_value = false +HERORANDRESPONSE_DRAWTIMES_FIELD.default_value = {} +HERORANDRESPONSE_DRAWTIMES_FIELD.message_type = CommonProto_pb.RANDOMTYPENUM +HERORANDRESPONSE_DRAWTIMES_FIELD.type = 11 +HERORANDRESPONSE_DRAWTIMES_FIELD.cpp_type = 10 + HERORANDRESPONSE.name = "HeroRandResponse" HERORANDRESPONSE.full_name = ".rpc.protocols.HeroRandResponse" HERORANDRESPONSE.nested_types = {} HERORANDRESPONSE.enum_types = {} -HERORANDRESPONSE.fields = {HERORANDRESPONSE_DROP_FIELD, HERORANDRESPONSE_EXTRABOX_FIELD, HERORANDRESPONSE_MUSTCOUNT_FIELD} +HERORANDRESPONSE.fields = {HERORANDRESPONSE_DROP_FIELD, HERORANDRESPONSE_EXTRABOX_FIELD, HERORANDRESPONSE_MUSTCOUNT_FIELD, HERORANDRESPONSE_DRAWTIMES_FIELD} HERORANDRESPONSE.is_extendable = false HERORANDRESPONSE.extensions = {} TEAMPOSSAVEREQUEST_TEAMPOSINFO_FIELD.name = "TeamPosInfo" diff --git a/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua b/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua index d2a648352c..811a4922eb 100644 --- a/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua +++ b/Assets/ManagedResources/~Lua/Message/PlayerInfoProto_pb.lua @@ -1201,11 +1201,12 @@ GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.name = "drawTimes" GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.full_name = ".rpc.protocols.GetPlayerInfoResponse.drawTimes" GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.number = 44 GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.index = 42 -GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.label = 1 +GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.label = 3 GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.has_default_value = false -GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.default_value = 0 -GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.type = 5 -GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.cpp_type = 1 +GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.default_value = {} +GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.message_type = CommonProto_pb.RANDOMTYPENUM +GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.type = 11 +GETPLAYERINFORESPONSE_DRAWTIMES_FIELD.cpp_type = 10 GETPLAYERINFORESPONSE.name = "GetPlayerInfoResponse" GETPLAYERINFORESPONSE.full_name = ".rpc.protocols.GetPlayerInfoResponse" diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua index db4ef48114..cb1eca5b18 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua @@ -61,7 +61,7 @@ end function this:Refresh(isTop,isAni) local data = tonumber(specialConfig[119].Value) - if RecruitManager.drawTimes < data then + if RecruitManager.drawTimes[1] < data then self.parent:ClosePanel() end self.selectBtn:GetComponent("RectTransform").localPosition = self.tabListObj[self.curSelect]:GetComponent("RectTransform").localPosition diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index 33d49f009e..3bf51842e7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -111,7 +111,7 @@ function this.PlayerInfoRequest(func) PlayerManager.curMapId = msg.player.curMapId MapManager.Mapping = false --PlayerManager.curMapId ~= 0 and PlayerManager.curMapId > 100 PlayerManager.maxForce = msg.player.maxForce - RecruitManager.drawTimes = msg.drawTimes % 100 --钻石抽卡已招募次数 + RecruitManager.SetAllDrawTimes(msg.drawTimes) --所有抽卡已招募次数 RecruitManager.isTenRecruit = msg.firstTenth --首次十连 PlayerManager.userCreateTime = msg.userCreateTime PatFaceManager.SetisFirstLogVal(msg.isDayFirst) @@ -625,7 +625,7 @@ function this.RecruitRequest(type, func) local data = buffer:DataByte() local msg = HeroInfoProto_pb.HeroRandResponse() msg:ParseFromString(data) - + RecruitManager.SetAllDrawTimes(msg.drawTimes) for i = 1, #msg.drop.Hero do local singHeroData = msg.drop.Hero[i] HeroManager.UpdateHeroDatas(singHeroData) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua index f09b668861..733a19bb64 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua @@ -71,6 +71,16 @@ function this.RecruitRequest(recruitType, func, privilegeId,_itemId,_itemNum) end end +--记录所有抽卡类型的抽卡次数 +function this.SetAllDrawTimes(_allData) + for i = 1, #_allData do + if not this.drawTimes[_allData[i].type] then + this.drawTimes[_allData[i].type] = {} + end + this.drawTimes[_allData[i].type] = _allData[i].num + end +end + --5点刷新数据 function this.RefreshFreeTime() this.freeUseTimeList[38] = PrivilegeManager.GetPrivilegeRemainValue(38) @@ -431,10 +441,9 @@ function this.GetWishCardData(infoList) this.WishCardData[i].id = infoList[i].id this.WishCardData[i].heroTid = infoList[i].heroTid this.WishCardData[i].status = infoList[i].status - LogPink("Id:"..tostring(infoList[i].id).." heroIid:"..tostring(infoList[i].heroTid).." status:"..tostring(infoList[i].status)) + -- LogPink("Id:"..tostring(infoList[i].id).." heroIid:"..tostring(infoList[i].heroTid).." status:"..tostring(infoList[i].status)) this.WishCardData[i].PropertyName = infoList[i].heroTid > 0 and heroConfig[infoList[i].heroTid].PropertyName or nil end - -- this.WishCardData = infoList end function this.GetCurHeroList(curIndex) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua index c9263960fc..4fa07f0a28 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua @@ -96,10 +96,10 @@ function RecruitPanel:BindEvent() --心愿抽卡界面 Util.AddClick(this.wishBtn, function() local data = tonumber(specialConfig[119].Value) - if RecruitManager.drawTimes >= data then + if RecruitManager.drawTimes[1] >= data then UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.WishDraw) else - PopupTipPanel.ShowTip(string.format("%s次神将召唤后,开启心愿抽卡!",data - RecruitManager.drawTimes)) + PopupTipPanel.ShowTip(string.format("%s次神将召唤后,开启心愿抽卡!",data - RecruitManager.drawTimes[1])) end end) end