【心愿抽卡】增加所有抽卡类型和输出

dev_chengFeng
ZhangBiao 2021-06-30 10:36:48 +08:00
parent ecb43803f4
commit 37e854190b
7 changed files with 65 additions and 12 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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("<color=red>%s次</color>神将召唤后,开启心愿抽卡!",data - RecruitManager.drawTimes))
PopupTipPanel.ShowTip(string.format("%s次神将召唤后开启心愿抽卡",data - RecruitManager.drawTimes[1]))
end
end)
end