【前端拍脸修改】提交——1

dev_chengFeng
zhangqiang 2021-04-26 13:44:31 +08:00
parent 26e63d7c9e
commit b4ed183fc6
5 changed files with 273 additions and 189 deletions

File diff suppressed because one or more lines are too long

View File

@ -502,6 +502,8 @@ EQUIPUPLEVELREQUEST_ITEMNUM_FIELD = protobuf.FieldDescriptor();
EQUIPUPLEVELRESPONSE = protobuf.Descriptor();
EQUIPUPLEVELRESPONSE_RESULT_FIELD = protobuf.FieldDescriptor();
EQUIPUPLEVELRESPONSE_DROP_FIELD = protobuf.FieldDescriptor();
PUSHWELFARERESPONSE = protobuf.Descriptor();
PUSHWELFARERESPONSE_ID_FIELD = protobuf.FieldDescriptor();
ERRORMSGRESPONSE_MSG_FIELD.name = "msg"
ERRORMSGRESPONSE_MSG_FIELD.full_name = ".rpc.protocols.ErrorMsgResponse.msg"
@ -5084,6 +5086,23 @@ EQUIPUPLEVELRESPONSE.enum_types = {}
EQUIPUPLEVELRESPONSE.fields = {EQUIPUPLEVELRESPONSE_RESULT_FIELD, EQUIPUPLEVELRESPONSE_DROP_FIELD}
EQUIPUPLEVELRESPONSE.is_extendable = false
EQUIPUPLEVELRESPONSE.extensions = {}
PUSHWELFARERESPONSE_ID_FIELD.name = "id"
PUSHWELFARERESPONSE_ID_FIELD.full_name = ".rpc.protocols.PushWelfareResponse.id"
PUSHWELFARERESPONSE_ID_FIELD.number = 1
PUSHWELFARERESPONSE_ID_FIELD.index = 0
PUSHWELFARERESPONSE_ID_FIELD.label = 3
PUSHWELFARERESPONSE_ID_FIELD.has_default_value = false
PUSHWELFARERESPONSE_ID_FIELD.default_value = {}
PUSHWELFARERESPONSE_ID_FIELD.type = 5
PUSHWELFARERESPONSE_ID_FIELD.cpp_type = 1
PUSHWELFARERESPONSE.name = "PushWelfareResponse"
PUSHWELFARERESPONSE.full_name = ".rpc.protocols.PushWelfareResponse"
PUSHWELFARERESPONSE.nested_types = {}
PUSHWELFARERESPONSE.enum_types = {}
PUSHWELFARERESPONSE.fields = {PUSHWELFARERESPONSE_ID_FIELD}
PUSHWELFARERESPONSE.is_extendable = false
PUSHWELFARERESPONSE.extensions = {}
ActiveUserMountRequest = protobuf.Message(ACTIVEUSERMOUNTREQUEST)
ActiveUserMountResponse = protobuf.Message(ACTIVEUSERMOUNTRESPONSE)
@ -5171,6 +5190,7 @@ NextActivityResponse = protobuf.Message(NEXTACTIVITYRESPONSE)
NotifyPaySuccessfulIndicaiton = protobuf.Message(NOTIFYPAYSUCCESSFULINDICAITON)
PlayerBackCInfoIndication = protobuf.Message(PLAYERBACKCINFOINDICATION)
PrivilegeIndication = protobuf.Message(PRIVILEGEINDICATION)
PushWelfareResponse = protobuf.Message(PUSHWELFARERESPONSE)
QuestionIndication = protobuf.Message(QUESTIONINDICATION)
QuickBuyTreasureLevelRequest = protobuf.Message(QUICKBUYTREASURELEVELREQUEST)
RandomNameResponse = protobuf.Message(RANDOMNAMERESPONSE)

View File

@ -52,8 +52,9 @@ function this.SetisFirstLogVal(isDayFirst,setPatFaceFinishTabs)
end
--3 类型就拍一次
end
--前端检测拍脸
local patFaceAllData = {}
function this.GetPatFaceAllDataTabs()
function this.GetFrontPatFaceAllDataTabs()
if this.isLogin then return end
patFaceAllData = {}
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.LoginPosterConfig)) do
@ -64,6 +65,17 @@ function this.GetPatFaceAllDataTabs()
end
return patFaceAllData
end
--检测所有拍脸
function this.GetPatFaceAllDataTabs()
local backData = this.GetBackPatFaceDaqta()
local FrontData = this.GetFrontPatFaceAllDataTabs()
if FrontData and #FrontData > 0 then
for i = 1, #FrontData do
table.insert(backData,FrontData[i])
end
end
return backData
end
function this.PatFaceSpecialMonitorOpenRules(v,patFaceAllData,type,starUpGiftNum)
--1等级 2关卡 3特劝等级 4功能开启时 5活动开启时 6公会战状态 7条件触发(事件)
if v.OpenRules[1] == 1 then
@ -317,6 +329,11 @@ function this.GetGuildFightTime()
end
--事件触发拍脸 (如五星成长礼)
function this.OnAddPatFaceData(faceConFigType, starUpGiftNum)
if faceConFigType == FacePanelType.GrowGift or faceConFigType == FacePanelType.UpgradePac or faceConFigType == FacePanelType.MonsterWave or faceConFigType == FacePanelType.MainLevel
or faceConFigType == FacePanelType.TimeLimitSkin then
LogError("此种拍脸已删除 faceConFigType "..faceConFigType)
return
end
if this.isLogin then return end--上来就弹新关卡界面 所以不弹
if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不弹
@ -326,22 +343,23 @@ function this.OnAddPatFaceData(faceConFigType, starUpGiftNum)
this.PatFaceSpecialMonitorOpenRules(allTypeFaceConFig[i],patFaceAllData,2, starUpGiftNum)
end
if patFaceAllData and not GuideManager.IsFunctionGuideExist() then
this.OpenPatFacePanel()
this.OpenPatFacePanel(patFaceAllData)
end
end
this.patFaceCallList = Stack.New()
function this.OpenPatFacePanel()
function this.OpenPatFacePanel(_patFaceAllData)
--LogGreen("#patFaceAllData 事件 " .. #patFaceAllData)
if #patFaceAllData > 0 then
if #_patFaceAllData > 0 then
this.patFaceCallList:Clear()
this.patFaceCallList:Push(function()
--Log("结束了!!!")
this.DeleBackPatFaceDaqta()
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSendFinish)
end)
for i = #patFaceAllData, 1, -1 do
for i = #_patFaceAllData, 1, -1 do
this.patFaceCallList:Push(function()
PatFaceManager.SetisFirstLogVal(1, { patFaceAllData[i] })
UIManager.OpenPanel(UIName.PatFacePanel, patFaceAllData[i], function()
PatFaceManager.SetisFirstLogVal(1, { _patFaceAllData[i] })
UIManager.OpenPanel(UIName.PatFacePanel, _patFaceAllData[i], function()
local time2 = Timer.New(function()
this.patFaceCallList:Pop()()
end, 0.5)
@ -354,4 +372,34 @@ function this.OpenPatFacePanel()
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSendFinish)
end
end
--后端礼包拍脸逻辑
this.backPatFaceAllData = {}
function this.SetPatFaceDaqta(PatFaceDatas)
if PatFaceDatas and PatFaceDatas.id and #PatFaceDatas.id > 0 then
for i = 1, #PatFaceDatas.id do
LogYellow("后端推送礼包拍脸 礼包id "..PatFaceDatas.id[i])
local curRechargeCommodityConfig = ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig,PatFaceDatas.id[i])
if curRechargeCommodityConfig and curRechargeCommodityConfig.PosterUiId then
LogYellow("后端推送礼包拍脸 拍脸ID "..curRechargeCommodityConfig.PosterUiId)
table.insert(this.backPatFaceAllData, ConfigManager.GetConfigData(ConfigName.LoginPosterConfig,curRechargeCommodityConfig.PosterUiId))
end
end
end
if this.isLogin then return end--登录界面不拍
if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不拍
if GuideManager.IsFunctionGuideExist() then return end--功能引导不拍
if UIManager.IsOpen(UIName.SingleRecruitPanel) or UIManager.IsOpen(UIName.TenRecruitPanel) or UIManager.IsOpen(UIName.RecruitPanel) then return end--抽卡界面不拍
if this.backPatFaceAllData then
this.OpenPatFacePanel(this.backPatFaceAllData)
end
end
function this.GetBackPatFaceDaqta()
return this.backPatFaceAllData
end
function this.DeleBackPatFaceDaqta()
LogYellow("后端推送礼包拍脸 清空 ")
this.backPatFaceAllData = {}
end
return this

View File

@ -1317,6 +1317,7 @@ function this.RefreshShowPatPaceActivity()
this.patFaceCallList:Clear()
this.patFaceCallList:Push(function()
Log("结束了!!!")
PatFaceManager.DeleBackPatFaceDaqta()
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSendFinish)
AdventureManager.GetIsMaxTime()
end)

View File

@ -124,6 +124,8 @@ function this.RegisterMessage(network)
socket:RegistNetMessage(MessageTypeProto_pb.WorldLevelIndication, this.WorldLevelIndication)
-- 充值成功订单推送
socket:RegistNetMessage(MessageTypeProto_pb.RECHARGE_SUCCESS_INDICATION, this.RechargeSuccessOrder)
-- 礼包拍脸推送
socket:RegistNetMessage(MessageTypeProto_pb.PUSH_WELFARE_RESPONSE, this.BackPatFaceData)
end
function this.OpenHongMengTowerGuideIndication(buffer)
local data = buffer:DataByte()
@ -884,4 +886,12 @@ function this.RechargeSuccessOrder(buffer)
msg:ParseFromString(data)
PayManager.RechargeSuccessOrder(msg)
end
--后端拍脸推送
function this.BackPatFaceData(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.PushWelfareResponse()
msg:ParseFromString(data)
LogError("后端拍脸推送")
PatFaceManager.SetPatFaceDaqta(msg)
end
return this