山河设计图分页请求修改

dev_chengFeng
yuanshuai 2022-05-05 16:46:33 +08:00
parent 4ef723e229
commit 1e6d693209
6 changed files with 44 additions and 13 deletions

View File

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

View File

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

View File

@ -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
--获取整个章节信息

View File

@ -325,7 +325,6 @@ function this.GetFormationPower(formationId)
-- 刷新后端战斗力
if power2 > PlayerManager.maxForce then
Log("发送队伍战力改变 ~~~~~~~~~~~~~~ ")
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)--targetTeamId
PlayerManager.maxForce = power2
end

View File

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

View File

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