Branch_DNA
parent
daa07cad74
commit
4279bff446
|
|
@ -3,7 +3,7 @@ OpenSeverWelfarePanel = Inherit(BasePanel)
|
|||
local this = OpenSeverWelfarePanel
|
||||
local activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
|
||||
local sortingOrder
|
||||
local isFirstOn = true--是否首次打开页面
|
||||
local isFirstOn = true --是否首次打开页面
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function OpenSeverWelfarePanel:InitComponent()
|
||||
|
|
@ -13,11 +13,12 @@ function OpenSeverWelfarePanel:InitComponent()
|
|||
this.timeTextGo = Util.GetGameObject(self.transform, "timeText")
|
||||
this.rewardPre = Util.GetGameObject(self.gameObject, "rewardPre")
|
||||
local v = Util.GetGameObject(self.gameObject, "rect"):GetComponent("RectTransform").rect
|
||||
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, Util.GetGameObject(self.gameObject, "rect").transform,
|
||||
this.rewardPre, nil, Vector2.New(v.width, v.height), 1, 1, Vector2.New(0,10))
|
||||
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView,
|
||||
Util.GetGameObject(self.gameObject, "rect").transform,
|
||||
this.rewardPre, nil, Vector2.New(v.width, v.height), 1, 1, Vector2.New(0, 10))
|
||||
this.ScrollView.moveTween.MomentumAmount = 1
|
||||
this.ScrollView.moveTween.Strength = 1
|
||||
this.NoviceItemList = {}--存储itemview 重复利用
|
||||
this.NoviceItemList = {} --存储itemview 重复利用
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
|
@ -45,6 +46,7 @@ function OpenSeverWelfarePanel:OnShow()
|
|||
isFirstOn = true
|
||||
this.OnShowPanelData()
|
||||
end
|
||||
|
||||
function OpenSeverWelfarePanel:OnSortingOrderChange()
|
||||
sortingOrder = self.sortingOrder
|
||||
for i, v in pairs(this.NoviceItemList) do
|
||||
|
|
@ -55,6 +57,7 @@ function OpenSeverWelfarePanel:OnSortingOrderChange()
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
local isShowNeedGetUpTextId = 0
|
||||
local activityData = {}
|
||||
|
||||
|
|
@ -65,9 +68,9 @@ function this.OnShowPanelData()
|
|||
|
||||
local allActivity = {}
|
||||
if activityData then
|
||||
this.RemainTimeDown(this.timeTextGo,this.timeText,activityData.endTime - GetTimeStamp())
|
||||
this.RemainTimeDown(this.timeTextGo, this.timeText, activityData.endTime - GetTimeStamp())
|
||||
ActivityGiftManager.OpenSeverWelfareRewardTabsSort(activityData.mission)
|
||||
this.ScrollView:SetData(activityData.mission, function (index, go)
|
||||
this.ScrollView:SetData(activityData.mission, function(index, go)
|
||||
this.SingleDataShow(go, activityData.mission[index])
|
||||
allActivity[index] = go
|
||||
end)
|
||||
|
|
@ -79,7 +82,7 @@ function this.OnShowPanelData()
|
|||
end
|
||||
end
|
||||
|
||||
function this.SingleDataShow(go,rewardData)
|
||||
function this.SingleDataShow(go, rewardData)
|
||||
local activityRewardGo = go
|
||||
-- activityRewardGo:SetActive(true)
|
||||
local sConFigData = activityRewardConfig[rewardData.missionId]
|
||||
|
|
@ -93,7 +96,8 @@ function this.SingleDataShow(go,rewardData)
|
|||
end
|
||||
for i = 1, #sConFigData.Reward do
|
||||
if this.NoviceItemList[go][i] then
|
||||
this.NoviceItemList[go][i]:OnOpen(false, {sConFigData.Reward[i][1],sConFigData.Reward[i][2]}, 0.65,false,false,true,sortingOrder)
|
||||
this.NoviceItemList[go][i]:OnOpen(false, { sConFigData.Reward[i][1], sConFigData.Reward[i][2] }, 0.65,
|
||||
false, false, true, sortingOrder)
|
||||
this.NoviceItemList[go][i].gameObject:SetActive(true)
|
||||
end
|
||||
end
|
||||
|
|
@ -104,7 +108,8 @@ function this.SingleDataShow(go,rewardData)
|
|||
this.NoviceItemList[go][i].gameObject:SetActive(false)
|
||||
end
|
||||
for i = 1, #sConFigData.Reward do
|
||||
this.NoviceItemList[go][i]:OnOpen(false, {sConFigData.Reward[i][1],sConFigData.Reward[i][2]}, 0.65,false,false,true,sortingOrder)
|
||||
this.NoviceItemList[go][i]:OnOpen(false, { sConFigData.Reward[i][1], sConFigData.Reward[i][2] }, 0.65, false,
|
||||
false, true, sortingOrder)
|
||||
this.NoviceItemList[go][i].gameObject:SetActive(true)
|
||||
end
|
||||
end
|
||||
|
|
@ -141,17 +146,20 @@ function this.SingleDataShow(go,rewardData)
|
|||
PopupTipPanel.ShowTipByLanguageId(10027)
|
||||
return
|
||||
end
|
||||
NetManager.GetActivityRewardRequest(rewardData.missionId, activityData.activityId, function(drop)
|
||||
--ActivityGiftManager.GetActivityRewardRequest(ActivityTypeDef.OpenSeverWelfare,rewardData.missionId, function(msg)
|
||||
NetManager.GetActivityRewardRequest(rewardData.missionId, activityData.activityId, function(drop)
|
||||
--ActivityGiftManager.GetActivityRewardRequest(ActivityTypeDef.OpenSeverWelfare,rewardData.missionId, function(msg)
|
||||
--获得英雄表现
|
||||
LogError("领取奖励:"..tostring(rewardData.missionId))
|
||||
if drop.Hero ~= nil and #drop.Hero > 0 then
|
||||
local itemDataList = {}
|
||||
local itemDataStarList = {}
|
||||
this.gameObject:SetActive(false)
|
||||
local box = Util.GetGameObject(this.gameObject.transform.parent,"FightPointPassMainPanel/Bg/getBoxReward")
|
||||
local box = Util.GetGameObject(this.gameObject.transform.parent,
|
||||
"FightPointPassMainPanel/Bg/getBoxReward")
|
||||
box:SetActive(false)
|
||||
for i = 1, #drop.Hero do
|
||||
local heroData = ConfigManager.TryGetConfigDataByKey(ConfigName.HeroConfig, "Id", drop.Hero[i].heroId)
|
||||
local heroData = ConfigManager.TryGetConfigDataByKey(ConfigName.HeroConfig, "Id", drop.Hero[i]
|
||||
.heroId)
|
||||
if heroData.Material == 1 then
|
||||
else
|
||||
table.insert(itemDataList, heroData)
|
||||
|
|
@ -159,38 +167,48 @@ function this.SingleDataShow(go,rewardData)
|
|||
end
|
||||
end
|
||||
if #itemDataList > 0 then
|
||||
UIManager.OpenPanel(UIName.PublicGetHeroPanel,itemDataList,itemDataStarList,function ()
|
||||
UIManager.OpenPanel(UIName.PublicGetHeroPanel, itemDataList, itemDataStarList, function()
|
||||
box:SetActive(true)
|
||||
this.gameObject:SetActive(true)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1, function()
|
||||
this.OnShowPanelData()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Mission.GetOpenServerRewardRefreshFightPoint)
|
||||
if rewardData.missionId == 10004 and PlayerPrefs.GetInt("CommentReward", 0) == 0 then
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_PINGJIA })
|
||||
end
|
||||
end)
|
||||
end)
|
||||
else
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1, function()
|
||||
this.OnShowPanelData()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Mission.GetOpenServerRewardRefreshFightPoint)
|
||||
if rewardData.missionId == 10004 and PlayerPrefs.GetInt("CommentReward", 0) == 0 then
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_PINGJIA })
|
||||
end
|
||||
end)
|
||||
end
|
||||
else
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1, function()
|
||||
this.OnShowPanelData()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Mission.GetOpenServerRewardRefreshFightPoint)
|
||||
if rewardData.missionId == 10004 and PlayerPrefs.GetInt("CommentReward", 0) == 0 then
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_PINGJIA })
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
this.timer = Timer.New()
|
||||
--刷新倒计时显示
|
||||
function this.RemainTimeDown(_timeTextExpertgo,_timeTextExpert,timeDown)
|
||||
function this.RemainTimeDown(_timeTextExpertgo, _timeTextExpert, timeDown)
|
||||
if timeDown > 0 then
|
||||
if _timeTextExpertgo then
|
||||
_timeTextExpertgo:SetActive(true)
|
||||
end
|
||||
if _timeTextExpert then
|
||||
_timeTextExpert.text = GetLanguageStrById(50012)..GetLeftTimeStrByDeltaTime2(timeDown)
|
||||
_timeTextExpert.text = GetLanguageStrById(50012) .. GetLeftTimeStrByDeltaTime2(timeDown)
|
||||
end
|
||||
if this.timer then
|
||||
this.timer:Stop()
|
||||
|
|
@ -198,7 +216,7 @@ function this.RemainTimeDown(_timeTextExpertgo,_timeTextExpert,timeDown)
|
|||
end
|
||||
this.timer = Timer.New(function()
|
||||
if _timeTextExpert then
|
||||
_timeTextExpert.text = GetLanguageStrById(50012)..GetLeftTimeStrByDeltaTime2(timeDown)
|
||||
_timeTextExpert.text = GetLanguageStrById(50012) .. GetLeftTimeStrByDeltaTime2(timeDown)
|
||||
end
|
||||
if timeDown < 0 then
|
||||
if _timeTextExpertgo then
|
||||
|
|
@ -229,4 +247,4 @@ end
|
|||
function OpenSeverWelfarePanel:OnDestroy()
|
||||
end
|
||||
|
||||
return OpenSeverWelfarePanel
|
||||
return OpenSeverWelfarePanel
|
||||
|
|
|
|||
|
|
@ -56,9 +56,10 @@ function AlameinWarRewardPopup:OnShow()
|
|||
end
|
||||
|
||||
function this.FreshData()
|
||||
local starLine = {10, 20, 30}
|
||||
local starLine = {1, 2, 3}
|
||||
this.data = {}
|
||||
local chapterConfig = G_AlameinChapter[this.chapter]
|
||||
LogError(""..tostring(this.chapter).."/"..tostring(#G_AlameinChapter))
|
||||
-- 10#300103#1|10#10444#5|20#300101#1|20#6000104#1|30#300102#1|30#300104#1|30#10442#1
|
||||
for i = 1, 3 do
|
||||
local line = starLine[i]
|
||||
|
|
@ -116,15 +117,16 @@ function this.SetScrollData(go, data)
|
|||
for k, v in pairs(this.repeatItemView[go]) do
|
||||
v.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
LogError("奖励:=============")
|
||||
for i = 1, #data.item do
|
||||
if not this.repeatItemView[go][i] then
|
||||
this.repeatItemView[go][i] = SubUIManager.Open(SubUIConfig.ItemView, RewardGrid.transform)
|
||||
end
|
||||
this.repeatItemView[go][i]:OnOpen(false, {data.item[i].id, data.item[i].value}, 0.55, nil, nil, nil, nil, nil)
|
||||
this.repeatItemView[go][i].gameObject:SetActive(true)
|
||||
LogError("奖励:"..tostring(data.item[i].id))
|
||||
end
|
||||
|
||||
LogError("奖励:==================")
|
||||
|
||||
--< 0 get 1 noreach 2 alreadyget
|
||||
if data.isGet == 0 then
|
||||
|
|
|
|||
|
|
@ -173,6 +173,9 @@ function this:SetSingleReward(item, i)
|
|||
this:SetAllReward()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.EightDay.GetRewardSuccess)
|
||||
CheckRedPointStatus(RedPointType.EightTheLogin)
|
||||
if (i == 1 or i == 7) and PlayerPrefs.GetInt("CommentReward", 0) == 0 then
|
||||
SubmitExtraData({type = SDKSubMitType.TYPE_PINGJIA})
|
||||
end
|
||||
end)
|
||||
end)
|
||||
else
|
||||
|
|
@ -181,6 +184,9 @@ function this:SetSingleReward(item, i)
|
|||
this:SetAllReward()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.EightDay.GetRewardSuccess)
|
||||
CheckRedPointStatus(RedPointType.EightTheLogin)
|
||||
if (i == 1 or i == 7) and PlayerPrefs.GetInt("CommentReward", 0) == 0 then
|
||||
SubmitExtraData({type = SDKSubMitType.TYPE_PINGJIA})
|
||||
end
|
||||
end)
|
||||
end
|
||||
else
|
||||
|
|
@ -189,6 +195,9 @@ function this:SetSingleReward(item, i)
|
|||
this:SetAllReward()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.EightDay.GetRewardSuccess)
|
||||
CheckRedPointStatus(RedPointType.EightTheLogin)
|
||||
if (i == 1 or i == 7) and PlayerPrefs.GetInt("CommentReward", 0) == 0 then
|
||||
SubmitExtraData({type = SDKSubMitType.TYPE_PINGJIA})
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ function FirstRechargePanel:OnShow()
|
|||
end
|
||||
--根据渠道配置界面显示充值金额或充值积分
|
||||
if GetChannelConfig().RechargeNum_Mode == 1 then
|
||||
self.reChargeTips.text = string.format(GetLanguageStrById(50420), AccumRecharge/1000)
|
||||
self.reChargeTips.text = string.format(GetLanguageStrById(50420),MoneyUtil.GetMoney( AccumRecharge/1000))
|
||||
else
|
||||
self.reChargeTips.text = string.format(GetLanguageStrById(10663), AccumRecharge/100)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ function this.InitData(guideData)
|
|||
for i = 1, #guideData do
|
||||
local guide = guideData[i]
|
||||
local guideId = guide.id
|
||||
if guide.type == GuideType.Force then --强制引导
|
||||
openDic[GuideType.Force] = guideId
|
||||
if guide.type == GuideType.Force then --强制引导
|
||||
openDic[GuideType.Force] = guideId
|
||||
elseif guide.type == GuideType.Function then -- 功能性引导记录
|
||||
table.insert(openDic[GuideType.Function], guideId)
|
||||
table.insert(openDic[GuideType.Function], guideId)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -125,17 +125,17 @@ function GuideManager.CheckFuncGuide()
|
|||
end
|
||||
local guideId = _FuncGuideList[1]
|
||||
if GuideConfig[guideId].Type == GuideType.Function then
|
||||
LogRed("准备功能引导:"..guideId)
|
||||
LogRed("准备功能引导:" .. guideId)
|
||||
end
|
||||
--功能性引导触发发送给服务器存储
|
||||
if GuideConfig[guideId].Type == GuideType.Function then
|
||||
table.insert(openDic[GuideType.Function], guideId)
|
||||
table.insert(openDic[GuideType.Function], guideId)
|
||||
NetManager.SaveGuideDataRequest(GuideConfig[guideId].Type, guideId)
|
||||
end
|
||||
GuideManager.ShowGuide(guideId)
|
||||
table.remove(_FuncGuideList, 1)
|
||||
if GuideConfig[guideId].Type == GuideType.Function then
|
||||
LogRed("移除:"..guideId)
|
||||
LogRed("移除:" .. guideId)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -199,6 +199,7 @@ function this.ShowGuide(id, ...)
|
|||
if not this.IsInMainGuide() then
|
||||
-- 强制引导结束检测是否需要功能引导
|
||||
this.CheckFuncGuide()
|
||||
LogError("强制引导结束检测是否需要功能引导")
|
||||
end
|
||||
elseif GuideConfig[id].Type == GuideType.Function then
|
||||
-- 关闭功能引导
|
||||
|
|
@ -214,21 +215,24 @@ function this.ShowGuide(id, ...)
|
|||
-- 开始功能引导
|
||||
if GuideConfig[id].Type == GuideType.Function then
|
||||
_IsFuncGuild = true
|
||||
LogRed("开始功能引导:"..id)
|
||||
LogRed("开始功能引导:" .. id)
|
||||
end
|
||||
Log("执行引导panel"..id)
|
||||
Log("执行引导panel" .. id)
|
||||
--if id == 506 then
|
||||
--SubmitExtraData({ type = SDKSubMitType.TYPE_TUTORIAL_COMPLETED })
|
||||
--end
|
||||
-- 显示当前引导
|
||||
UIManager.OpenPanel(UIName.GuidePanel, id, onGuideClose, ...)
|
||||
end
|
||||
|
||||
-- 同步引导数据到服务器
|
||||
function this.SyncServer(id) --同步到后端
|
||||
function this.SyncServer(id) --同步到后端
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guide.NextTrigger, id)
|
||||
if GuideConfig[id].ServerNext ~= 0 then
|
||||
if GuideConfig[id].Type == GuideType.Force then
|
||||
openDic[GuideType.Force] = GuideConfig[id].ServerNext
|
||||
NetManager.SaveGuideDataRequest(GuideConfig[id].Type, GuideConfig[id].ServerNext)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -298,13 +302,15 @@ function this.RefreshTriggerListen(id, openType, openArgs)
|
|||
|
||||
GuidePanel.upArrow.transform.position = roleView.GameObject.transform.position
|
||||
local enemyView = roleView.RootPanel.GetRoleView(BattleLogic.GetAggro(roleView.role))
|
||||
GuidePanel.upArrow.transform.up = Vector3.Normalize(enemyView.GameObject.transform.position - roleView.GameObject.transform.position)
|
||||
GuidePanel.upArrow.transform.up = Vector3.Normalize(enemyView.GameObject.transform.position -
|
||||
roleView.GameObject.transform.position)
|
||||
-- Util.GetTransform(GuidePanel.upArrow, "1").localEulerAngles = -GuidePanel.upArrow.transform.localEulerAngles
|
||||
GuidePanel.upArrow:SetActive(true)
|
||||
|
||||
local canGO1 = roleView.GameObject.transform.parent.parent.gameObject:GetComponent("Canvas")
|
||||
local canGO2 = enemyView.GameObject.transform.parent.gameObject:GetComponent("Canvas")
|
||||
local canGO3 = Util.GetGameObject(roleView.RootPanel.EnemyPanel, "live_"..canGO2.name):GetComponent("Canvas")
|
||||
local canGO3 = Util.GetGameObject(roleView.RootPanel.EnemyPanel, "live_" .. canGO2.name):GetComponent(
|
||||
"Canvas")
|
||||
canGO1.overrideSorting = true
|
||||
canGO2.overrideSorting = true
|
||||
canGO3.overrideSorting = true
|
||||
|
|
@ -321,7 +327,7 @@ function this.RefreshTriggerListen(id, openType, openArgs)
|
|||
canGO2.overrideSorting = false
|
||||
canGO3.overrideSorting = false
|
||||
end
|
||||
end
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Guide.NextTrigger, trigger)
|
||||
end
|
||||
end
|
||||
|
|
@ -347,13 +353,15 @@ function this.RefreshTriggerListen(id, openType, openArgs)
|
|||
|
||||
GuidePanel.upArrow.transform.position = roleView.GameObject.transform.position
|
||||
local enemyView = roleView.RootPanel.GetRoleView(BattleLogic.GetAggro(roleView.role))
|
||||
GuidePanel.upArrow.transform.up = Vector3.Normalize(enemyView.GameObject.transform.position - roleView.GameObject.transform.position)
|
||||
GuidePanel.upArrow.transform.up = Vector3.Normalize(enemyView.GameObject.transform.position -
|
||||
roleView.GameObject.transform.position)
|
||||
-- Util.GetTransform(GuidePanel.upArrow, "1").localEulerAngles = -GuidePanel.upArrow.transform.localEulerAngles
|
||||
GuidePanel.upArrow:SetActive(true)
|
||||
|
||||
local canGO1 = roleView.GameObject.transform.parent.parent.gameObject:GetComponent("Canvas")
|
||||
local canGO2 = enemyView.GameObject.transform.parent.gameObject:GetComponent("Canvas")
|
||||
local canGO3 = Util.GetGameObject(roleView.RootPanel.EnemyPanel, "live_"..canGO2.name):GetComponent("Canvas")
|
||||
local canGO3 = Util.GetGameObject(roleView.RootPanel.EnemyPanel, "live_" .. canGO2.name):GetComponent(
|
||||
"Canvas")
|
||||
canGO1.overrideSorting = true
|
||||
canGO2.overrideSorting = true
|
||||
canGO3.overrideSorting = true
|
||||
|
|
@ -479,7 +487,7 @@ function this.RefreshTriggerListen(id, openType, openArgs)
|
|||
this.ShowGuide(id)
|
||||
end
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
|
||||
elseif openType == 14 then
|
||||
--地图点option完成触发
|
||||
local trigger
|
||||
|
|
@ -609,16 +617,16 @@ function this.RefreshTriggerListen(id, openType, openArgs)
|
|||
end
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, trigger)
|
||||
--elseif openType == 26 then
|
||||
-- --功能开启后
|
||||
-- local trigger
|
||||
-- trigger = function(panelType)
|
||||
-- if panelType == UIName.MainPanel and ActTimeCtrlManager.IsQualifiled(openArgs[1]) then
|
||||
-- Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
|
||||
-- this.ShowGuide(id)
|
||||
-- end
|
||||
-- end
|
||||
-- Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
|
||||
--elseif openType == 26 then
|
||||
-- --功能开启后
|
||||
-- local trigger
|
||||
-- trigger = function(panelType)
|
||||
-- if panelType == UIName.MainPanel and ActTimeCtrlManager.IsQualifiled(openArgs[1]) then
|
||||
-- Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger)
|
||||
-- this.ShowGuide(id)
|
||||
-- end
|
||||
-- end
|
||||
-- Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
|
||||
elseif openType == 27 then
|
||||
--天赋收集完成
|
||||
local trigger
|
||||
|
|
@ -705,7 +713,7 @@ function this.RefreshTriggerListen(id, openType, openArgs)
|
|||
end
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger)
|
||||
elseif openType == 36 then -- 第一次进入副本触发
|
||||
elseif openType == 36 then -- 第一次进入副本触发
|
||||
local trigger
|
||||
trigger = function(panelType)
|
||||
--close => BattlePanel
|
||||
|
|
@ -722,19 +730,20 @@ this.isShowGuide = false
|
|||
--弱引导
|
||||
function this.RefreshGuide()
|
||||
local task, battle = false, false
|
||||
local curGuideTaskData = TaskManager.GetCurrentGuideTask(TaskTypeDef.GuideTask)--新手任务
|
||||
local isBattle = BattleManager.IsInBackBattle()--战斗中
|
||||
local isCanBattle = FightPointPassManager.IsCanFight(FightPointPassManager.curOpenFight)--有挑战的关卡
|
||||
if not GuideManager.IsInMainGuide() or not UIManager.IsOpen(UIName.GuidePanel) then--不在强制引导
|
||||
if curGuideTaskData ~= nil then--新手任务没有结束
|
||||
if curGuideTaskData.state == 1 then --新手任务可领取
|
||||
local curGuideTaskData = TaskManager.GetCurrentGuideTask(TaskTypeDef.GuideTask) --新手任务
|
||||
local isBattle = BattleManager.IsInBackBattle() --战斗中
|
||||
local isCanBattle = FightPointPassManager.IsCanFight(FightPointPassManager.curOpenFight) --有挑战的关卡
|
||||
if not GuideManager.IsInMainGuide() or not UIManager.IsOpen(UIName.GuidePanel) then --不在强制引导
|
||||
if curGuideTaskData ~= nil then --新手任务没有结束
|
||||
if curGuideTaskData.state == 1 then --新手任务可领取
|
||||
task = true
|
||||
elseif curGuideTaskData.state ~= 1 then
|
||||
if not isBattle then
|
||||
if isCanBattle then
|
||||
battle = true
|
||||
else
|
||||
local config = ConfigManager.GetConfigData(ConfigName.GuideTaskConfig, curGuideTaskData.missionId)
|
||||
local config = ConfigManager.GetConfigData(ConfigName.GuideTaskConfig, curGuideTaskData
|
||||
.missionId)
|
||||
if config.isGuideShow == 1 then
|
||||
task = false
|
||||
else
|
||||
|
|
@ -752,4 +761,4 @@ function this.RefreshGuide()
|
|||
return task, battle
|
||||
end
|
||||
|
||||
return this
|
||||
return this
|
||||
|
|
|
|||
|
|
@ -239,13 +239,15 @@ function this.RefreshItem(go,data)
|
|||
end
|
||||
|
||||
function this.BtnClick(id)
|
||||
LogError("=====================================")
|
||||
--LogError("=====================================")
|
||||
if id == FUNCTION_OPEN_TYPE.laddersChallenge then
|
||||
local peakednessTime= LaddersArenaManager.GetLeftTime()-435600
|
||||
LogError("=====================================")
|
||||
--LogError("=====================================")
|
||||
if ActTimeCtrlManager.SingleFuncState(id) then
|
||||
LogError("=====================================")
|
||||
--LogError("=====================================")
|
||||
NetManager.WorldArenaUnLockRequest(function (msg)
|
||||
LogError("====================================="..tostring(msg.unLock))
|
||||
LogError("====================================="..tostring(peakednessTime))
|
||||
if msg.unLock and peakednessTime > 0 then
|
||||
local _, myRankInfo = ArenaManager.GetRankInfo()
|
||||
local myRank = myRankInfo.personInfo.rank
|
||||
|
|
|
|||
|
|
@ -25,25 +25,27 @@ function this.Initialize()
|
|||
else
|
||||
defaultLoginWay = 0
|
||||
end
|
||||
this.CurLoginWay = PlayerPrefs.GetInt(this.GameName.."LoginWay",defaultLoginWay)
|
||||
this.CurAccount = PlayerPrefs.GetString(this.GameName.."Account",'')
|
||||
this.CurSession = PlayerPrefs.GetString(this.GameName.."Session",'')
|
||||
this.CurLoginWay = PlayerPrefs.GetInt(this.GameName .. "LoginWay", defaultLoginWay)
|
||||
this.CurAccount = PlayerPrefs.GetString(this.GameName .. "Account", '')
|
||||
this.CurSession = PlayerPrefs.GetString(this.GameName .. "Session", '')
|
||||
|
||||
SDKMgr.onMessageCallback = function(msg)
|
||||
local contents = string.split(msg, "&")
|
||||
if #contents > 1 then
|
||||
if tonumber(contents[1]) == 0 then
|
||||
MsgPanel.ShowOne(contents[2])
|
||||
elseif tonumber(contents[1]) == 1 then--AiKen渠道手机绑定
|
||||
elseif tonumber(contents[1]) == 1 then --AiKen渠道手机绑定
|
||||
if ActivityGiftManager.phoneBuildingRewardIsGet ~= 2 then
|
||||
ActivityGiftManager.phoneBuildingRewardIsGet = contents[2]
|
||||
end
|
||||
elseif tonumber(contents[1]) == 2 then--AiKen渠道分享
|
||||
elseif tonumber(contents[1]) == 2 then --AiKen渠道分享
|
||||
if ActivityGiftManager.phoneBuildingRewardIsGet ~= 2 then
|
||||
ActivityGiftManager.phoneBuildingRewardIsGet = contents[2]
|
||||
end
|
||||
end
|
||||
else
|
||||
elseif PlayerPrefs.GetInt("CommentReward", 0) == 0 then
|
||||
PlayerPrefs.SetInt("CommentReward", 1)
|
||||
NetManager.GetGoogleCommentReward()
|
||||
MsgPanel.ShowOne(msg)
|
||||
end
|
||||
end
|
||||
|
|
@ -57,18 +59,18 @@ function this.Initialize()
|
|||
SDKMgr.onLoginCallback = function(loginResp)
|
||||
-- 获取登录信息
|
||||
local result = string.split(loginResp, "#")
|
||||
result[1] = tonumber(result[1])
|
||||
result[1] = tonumber(result[1])
|
||||
if result[1] == SDK_RESULT.SUCCESS then
|
||||
AppConst.SdkId = result[2]
|
||||
--AppConst.AppID = result[3] --第三个参数是签名
|
||||
AppConst.TokenStr = result[4]
|
||||
-- AppConst.SdkChannel = result[5]
|
||||
AppConst.SdkChannel = AppConst.ChannelType
|
||||
AppConst.SdkPackageName = UnityEngine.Application.identifier--AndroidDeviceInfo.Instance:GetPackageName()
|
||||
AppConst.SdkPackageName = UnityEngine.Application.identifier --AndroidDeviceInfo.Instance:GetPackageName()
|
||||
|
||||
-- 发送登录成功事件
|
||||
this.RequestRegistSDK(AppConst.SdkId,AppConst.SdkChannel,result[3],AppConst.TokenStr,function ()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.LoginSuccess.OnLoginSuccess,result[1])
|
||||
this.RequestRegistSDK(AppConst.SdkId, AppConst.SdkChannel, result[3], AppConst.TokenStr, function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.LoginSuccess.OnLoginSuccess, result[1])
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -120,14 +122,16 @@ function this.SaveLoginInfo(user, pw)
|
|||
PlayerPrefs.SetString(this.GameName.."Account", this.CurAccount);
|
||||
PlayerPrefs.SetString(this.GameName.."Session", this.CurSession);
|
||||
PlayerPrefs.Save();
|
||||
]]--
|
||||
]]
|
||||
--
|
||||
--sdkMgr:SaveSession(this.CurLoginWay)
|
||||
end
|
||||
|
||||
function this.RequestRegist(name, pw, call)
|
||||
local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign))
|
||||
RequestPanel.Show(GetLanguageStrById(11115))
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .."registerUser?userName="..name .."&password="..pw.."&repeat="..pw.."&sign="..sign,
|
||||
networkMgr:SendGetHttp(
|
||||
LoginRoot_Url .. "registerUser?userName=" .. name .. "&password=" .. pw .. "&repeat=" .. pw .. "&sign=" .. sign,
|
||||
function(str)
|
||||
RequestPanel.Hide()
|
||||
if str == nil then
|
||||
|
|
@ -138,13 +142,14 @@ function this.RequestRegist(name, pw, call)
|
|||
if call then
|
||||
call(data.code)
|
||||
end
|
||||
end,nil,nil,nil)
|
||||
end, nil, nil, nil)
|
||||
end
|
||||
|
||||
function this.RequestRegistSDK(uid, channel ,sdksign ,sdktoken, call)
|
||||
function this.RequestRegistSDK(uid, channel, sdksign, sdktoken, call)
|
||||
RequestPanel.Show(GetLanguageStrById(11117))
|
||||
local LoginRoot_PackageVersion = VersionManager:GetVersionInfo("sdkLodingUrl")
|
||||
local LoginStr = LoginRoot_PackageVersion.."/verify?userId="..uid.."&channel="..channel.."&sdksign="..sdksign.."&sdktoken="..sdktoken
|
||||
local LoginStr = LoginRoot_PackageVersion ..
|
||||
"/verify?userId=" .. uid .. "&channel=" .. channel .. "&sdksign=" .. sdksign .. "&sdktoken=" .. sdktoken
|
||||
Log(LoginStr)
|
||||
networkMgr:SendGetHttp(LoginStr,
|
||||
function(str)
|
||||
|
|
@ -163,7 +168,7 @@ function this.RequestRegistSDK(uid, channel ,sdksign ,sdktoken, call)
|
|||
--特殊参数
|
||||
AppConst.AppID = data.guid or ""
|
||||
if data.code == 1 then
|
||||
PopupTipPanel.ShowTip(GetLanguageStrById(11116)..name.." "..data.msg)
|
||||
PopupTipPanel.ShowTip(GetLanguageStrById(11116) .. name .. " " .. data.msg)
|
||||
else
|
||||
--PopupTipPanel.ShowTip("账号:"..name.." "..data.msg)
|
||||
end
|
||||
|
|
@ -176,25 +181,26 @@ end
|
|||
function this.RequestUser(name, pw, call)
|
||||
local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign))
|
||||
RequestPanel.Show(GetLanguageStrById(11117))
|
||||
networkMgr:SendGetHttp(LoginRoot_Url.."userLogin?userName="..name.."&password="..pw.."&sign="..sign, function(str)
|
||||
RequestPanel.Hide()
|
||||
if str == nil then
|
||||
return
|
||||
end
|
||||
local json = require 'cjson'
|
||||
local data = json.decode(str)
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .. "userLogin?userName=" .. name .. "&password=" .. pw .. "&sign=" .. sign,
|
||||
function(str)
|
||||
RequestPanel.Hide()
|
||||
if str == nil then
|
||||
return
|
||||
end
|
||||
local json = require 'cjson'
|
||||
local data = json.decode(str)
|
||||
|
||||
if data.code == 0 then
|
||||
--PopupTipPanel.ShowTip(data.msg)
|
||||
this.openId = data.parms.openId
|
||||
this.token = data.parms.token
|
||||
else
|
||||
PopupTipPanel.ShowTip(data.msg)
|
||||
end
|
||||
if call then
|
||||
call(data.code)
|
||||
end
|
||||
end,nil,nil,nil)
|
||||
if data.code == 0 then
|
||||
--PopupTipPanel.ShowTip(data.msg)
|
||||
this.openId = data.parms.openId
|
||||
this.token = data.parms.token
|
||||
else
|
||||
PopupTipPanel.ShowTip(data.msg)
|
||||
end
|
||||
if call then
|
||||
call(data.code)
|
||||
end
|
||||
end, nil, nil, nil)
|
||||
end
|
||||
|
||||
--注销
|
||||
|
|
@ -207,10 +213,11 @@ function this.LogOut()
|
|||
PlayerPrefs.DeleteKey(this.GameName.."LoginWay")
|
||||
PlayerPrefs.DeleteKey(this.GameName.."Account")
|
||||
PlayerPrefs.DeleteKey(this.GameName.."Session")
|
||||
]]--
|
||||
]]
|
||||
--
|
||||
Framework.Dispose()
|
||||
--sdkMgr:LogOutTime(tostring(PlayerManager.player.id));
|
||||
App.Instance:ReStart()
|
||||
end
|
||||
|
||||
return this
|
||||
return this
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ function this:InitComponent()
|
|||
-- this.UserBtn = Util.GetGameObject(this.loginPart, "userBtn")
|
||||
-- this.UserBtnText = Util.GetGameObject(this.loginPart, "userBtn/Text"):GetComponent("Text")
|
||||
|
||||
this.btnAgreement = Util.GetGameObject(this.loginPart, "btns/btnAgreement")--协议
|
||||
this.btnNotice = Util.GetGameObject(this.loginPart, "btns/btnNotice")--公告
|
||||
this.btnUser = Util.GetGameObject(this.loginPart, "btns/btnUser")--切换账号
|
||||
this.btnCustomerService = Util.GetGameObject(this.loginPart, "btns/btnCustomerService")--客服(游戏内)
|
||||
this.LoginPanel_Btn1 = Util.GetGameObject(this.loginPart, "btns/LoginPanel_Btn1")--使用条款
|
||||
this.LoginPanel_Btn2 = Util.GetGameObject(this.loginPart, "btns/LoginPanel_Btn2")--个人信息
|
||||
this.btnLogout = Util.GetGameObject(this.loginPart, "btns/btnLogout")--登出
|
||||
this.btnCustomerService2 = Util.GetGameObject(this.loginPart, "btns/btnCustomerService2")--客服(SDK)
|
||||
this.btnAgreement = Util.GetGameObject(this.loginPart, "btns/btnAgreement") --协议
|
||||
this.btnNotice = Util.GetGameObject(this.loginPart, "btns/btnNotice") --公告
|
||||
this.btnUser = Util.GetGameObject(this.loginPart, "btns/btnUser") --切换账号
|
||||
this.btnCustomerService = Util.GetGameObject(this.loginPart, "btns/btnCustomerService") --客服(游戏内)
|
||||
this.LoginPanel_Btn1 = Util.GetGameObject(this.loginPart, "btns/LoginPanel_Btn1") --使用条款
|
||||
this.LoginPanel_Btn2 = Util.GetGameObject(this.loginPart, "btns/LoginPanel_Btn2") --个人信息
|
||||
this.btnLogout = Util.GetGameObject(this.loginPart, "btns/btnLogout") --登出
|
||||
this.btnCustomerService2 = Util.GetGameObject(this.loginPart, "btns/btnCustomerService2") --客服(SDK)
|
||||
|
||||
---selectServerPart
|
||||
this.serverSelectPart = Util.GetGameObject(this.loginPart, "serverSelect")
|
||||
|
|
@ -61,11 +61,11 @@ function this:InitComponent()
|
|||
|
||||
this.sdkLoginBtn = Util.GetGameObject(this.loginPart, "loginBtn")
|
||||
this.AgeTip = Util.GetGameObject(this.loginPart, "ageTip")
|
||||
this.AdbAgeTip = Util.GetGameObject(this.loginPart,"adb_ageTip")
|
||||
this.AdbAgeTip = Util.GetGameObject(this.loginPart, "adb_ageTip")
|
||||
this.SetLoginPart(false)
|
||||
|
||||
this.versionText = Util.GetGameObject(this.loginPart, "version"):GetComponent("Text")
|
||||
this.versionText.text = GetLanguageStrById(11119)..LoginRoot_Version
|
||||
this.versionText.text = GetLanguageStrById(11119) .. LoginRoot_Version
|
||||
|
||||
|
||||
this.declaration = Util.GetGameObject(this.loginPart, "declaration")
|
||||
|
|
@ -77,7 +77,7 @@ end
|
|||
|
||||
--绑定事件(用于子类重写)
|
||||
function this:BindEvent()
|
||||
Util.AddClick(this.sdkAgainLogin,function()
|
||||
Util.AddClick(this.sdkAgainLogin, function()
|
||||
if AppConst.ChannelType == "None" then
|
||||
return
|
||||
end
|
||||
|
|
@ -89,7 +89,7 @@ function this:BindEvent()
|
|||
|
||||
if GetChannelConfig().PrivacyAgreement then
|
||||
if PlayerPrefs.GetInt("IsAgreePrivacy") == 0 then
|
||||
UIManager.OpenPanel(UIName.PermissionPanel, function ()
|
||||
UIManager.OpenPanel(UIName.PermissionPanel, function()
|
||||
fun()
|
||||
end)
|
||||
else
|
||||
|
|
@ -112,9 +112,10 @@ function this:BindEvent()
|
|||
end)
|
||||
Util.AddClick(this.btnNotice, function()
|
||||
RequestPanel.Show(GetLanguageStrById(11128))
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .. "tk/getNotice?timestamp="..timeStamp.."&sign=".. timeSign,function (str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup,str)
|
||||
end, nil, nil, nil)
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .. "tk/getNotice?timestamp=" .. timeStamp .. "&sign=" .. timeSign,
|
||||
function(str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup, str)
|
||||
end, nil, nil, nil)
|
||||
end)
|
||||
Util.AddClick(this.LoginPanel_Btn1, function()
|
||||
if IsSDKLogin then
|
||||
|
|
@ -158,7 +159,7 @@ function this:BindEvent()
|
|||
lastServer = this.lastServer,
|
||||
recommend = this.recommend,
|
||||
callback = function(index)
|
||||
LogError("收到:"..index)
|
||||
LogError("收到:" .. index)
|
||||
local list = this.serverList[index]
|
||||
PlayerPrefs.SetInt(lastServerIndex, index)
|
||||
PlayerPrefs.SetString("lastServerName", this.serverList[index].name)
|
||||
|
|
@ -182,16 +183,17 @@ function this:BindEvent()
|
|||
end)
|
||||
|
||||
Util.AddClick(this.AgeTip, function()
|
||||
UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.Txt,GetLanguageStrById(50211),GetLanguageStrById(50210))
|
||||
UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.Txt, GetLanguageStrById(50211),
|
||||
GetLanguageStrById(50210))
|
||||
end)
|
||||
|
||||
Util.AddClick(this.btnAgreement, function ()
|
||||
|
||||
Util.AddClick(this.btnAgreement, function()
|
||||
-- if PlayerPrefs.GetInt("IsAgreePrivacy") == 0 then
|
||||
-- PlayerPrefs.SetInt("IsAgreePrivacy", 1)
|
||||
--else
|
||||
-- PlayerPrefs.SetInt("IsAgreePrivacy", 0)
|
||||
--end
|
||||
--this.ChangeAgreePrivacy()
|
||||
-- PlayerPrefs.SetInt("IsAgreePrivacy", 1)
|
||||
--else
|
||||
-- PlayerPrefs.SetInt("IsAgreePrivacy", 0)
|
||||
--end
|
||||
--this.ChangeAgreePrivacy()
|
||||
UIManager.OpenPanel(UIName.PrivacyPanel)
|
||||
end)
|
||||
|
||||
|
|
@ -199,10 +201,10 @@ function this:BindEvent()
|
|||
-- UIManager.OpenPanel(UIName.PrivacyPanel)
|
||||
-- end)
|
||||
|
||||
Util.AddClick(this.btnCustomerService, function ()
|
||||
Util.AddClick(this.btnCustomerService, function()
|
||||
UIManager.OpenPanel(UIName.CustomerServicePanel)
|
||||
end)
|
||||
Util.AddClick(this.btnCustomerService2, function ()
|
||||
Util.AddClick(this.btnCustomerService2, function()
|
||||
if AppConst.isSDKLogin then
|
||||
SDKMgr:CustomerService()
|
||||
end
|
||||
|
|
@ -250,18 +252,18 @@ function this:OnSortingOrderChange()
|
|||
end
|
||||
|
||||
--改变同意隐私协议状态
|
||||
function this.ChangeAgreePrivacy()
|
||||
if not GetChannelConfig().PrivacyAgreement then
|
||||
this.btnAgreement:SetActive(false)
|
||||
return
|
||||
end
|
||||
Util.GetGameObject(this.btnAgreement, "Image"):SetActive(PlayerPrefs.GetInt("IsAgreePrivacy") == 1)
|
||||
end
|
||||
function this.ChangeAgreePrivacy()
|
||||
if not GetChannelConfig().PrivacyAgreement then
|
||||
this.btnAgreement:SetActive(false)
|
||||
return
|
||||
end
|
||||
Util.GetGameObject(this.btnAgreement, "Image"):SetActive(PlayerPrefs.GetInt("IsAgreePrivacy") == 1)
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function this:OnOpen(...)
|
||||
if AppConst.Code ~= "" then
|
||||
MsgPanel.ShowOne(AppConst.Code,function ()
|
||||
MsgPanel.ShowOne(AppConst.Code, function()
|
||||
Framework.Dispose()
|
||||
App.Instance:ReStart()
|
||||
end)
|
||||
|
|
@ -278,7 +280,7 @@ function this:OnOpen(...)
|
|||
this.btnAgreement:SetActive(GetChannelConfig().PrivacyAgreement)
|
||||
if GetChannelConfig().Bg_Logon then
|
||||
Util.GetGameObject(this.gameObject, "BG/None"):SetActive(false)
|
||||
Util.GetGameObject(this.gameObject, "BG/"..GetChannelConfig().Bg_Logon):SetActive(true)
|
||||
Util.GetGameObject(this.gameObject, "BG/" .. GetChannelConfig().Bg_Logon):SetActive(true)
|
||||
else
|
||||
Util.GetGameObject(this.gameObject, "BG/None"):SetActive(true)
|
||||
end
|
||||
|
|
@ -337,7 +339,7 @@ end
|
|||
|
||||
this.isWaiting = false
|
||||
function this.SDKLogin()
|
||||
local func = function ()
|
||||
local func = function()
|
||||
if not this.isWaiting then
|
||||
this.isWaiting = true
|
||||
Timer.New(function()
|
||||
|
|
@ -404,9 +406,10 @@ end
|
|||
function this.OnReceiveServerList(str)
|
||||
-- 获取服务器列表成功后,默认开启公告
|
||||
RequestPanel.Show(GetLanguageStrById(11128))
|
||||
networkMgr:SendGetHttp(LoginRoot_Url.."tk/getNotice?timestamp="..timeStamp.."&sign="..timeSign, function (str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup, str)
|
||||
end, nil, nil, nil)
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .. "tk/getNotice?timestamp=" .. timeStamp .. "&sign=" .. timeSign,
|
||||
function(str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup, str)
|
||||
end, nil, nil, nil)
|
||||
|
||||
if str == nil then
|
||||
return
|
||||
|
|
@ -430,7 +433,7 @@ function this.OnReceiveServerList(str)
|
|||
-- PlayerPrefs.SetString(openIdkey, str)
|
||||
-- PlayerPrefs.SetString(openIdPw, pw)
|
||||
-- end)
|
||||
UIManager.OpenPanel(UIName.LoginPopup,nil,nil, function(str, pw)
|
||||
UIManager.OpenPanel(UIName.LoginPopup, nil, nil, function(str, pw)
|
||||
-- this.UserBtnText.text = str
|
||||
PlayerPrefs.SetString(openIdkey, str)
|
||||
PlayerPrefs.SetString(openIdPw, pw)
|
||||
|
|
@ -446,8 +449,8 @@ function this.OnReceiveServerList(str)
|
|||
else
|
||||
--this.loginMask:SetActive(true)
|
||||
--Timer.New(function()
|
||||
--UIManager.OpenPanel(UIName.NoticePopup)
|
||||
-- this.loginMask:SetActive(false)
|
||||
--UIManager.OpenPanel(UIName.NoticePopup)
|
||||
-- this.loginMask:SetActive(false)
|
||||
--end, 2.5, 1):Start()
|
||||
if code == 2 then
|
||||
if LoginManager.IsOpenAddiction then
|
||||
|
|
@ -499,10 +502,10 @@ function this.SetServerList(data)
|
|||
else
|
||||
if this.lastServer then --有最近登录显示最近登录,没有显示推荐,否则显示第一个服
|
||||
for i = 1, #this.serverList do
|
||||
if this.serverList[i].server_id == this.lastServer.serverid and this.serverList[i].area == this.lastServer.area then
|
||||
lastIndex = i
|
||||
break
|
||||
end
|
||||
if this.serverList[i].server_id == this.lastServer.serverid and this.serverList[i].area == this.lastServer.area then
|
||||
lastIndex = i
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
if this.recommend then
|
||||
|
|
@ -536,8 +539,8 @@ function this.SetServerList(data)
|
|||
PlayerPrefs.SetInt(lastServerIndex, 1)
|
||||
end
|
||||
end
|
||||
if lastIndex==nil then
|
||||
lastIndex=1
|
||||
if lastIndex == nil then
|
||||
lastIndex = 1
|
||||
end
|
||||
PlayerManager.serverInfo = this.serverList[lastIndex]
|
||||
LoginManager.SocketAddress = this.serverList[lastIndex].ip
|
||||
|
|
@ -646,117 +649,342 @@ end
|
|||
function this.ExecuteLoading()
|
||||
local requestList = {}
|
||||
--table.insert(requestList, function() this.LogTime(#requestList + 1) PrivilegeTurnManager.SetPrivilrgeTurnData(LoadingPanel.OnStep) return "SetPrivilrgeTurnData" end) -- 特权转盘
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.PlayerInfoRequest(LoadingPanel.OnStep) return "PlayerInfoRequest" end) -- 基础信息
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.RequestMission(LoadingPanel.OnStep) return "RequestMission" end) -- 任务
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.PlayerInfoRequest(LoadingPanel.OnStep)
|
||||
return "PlayerInfoRequest"
|
||||
end) -- 基础信息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.RequestMission(LoadingPanel.OnStep)
|
||||
return "RequestMission"
|
||||
end) -- 任务
|
||||
-- table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.DiceInfoRequest(2,LoadingPanel.OnStep) return "DiceInfoRequest" end) -- 兵旗骰子
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.ItemInfoRequest(0, LoadingPanel.OnStep) return "ItemInfoRequest" end) -- 物品信息
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.AllEquipRequest(0, LoadingPanel.OnStep) return "AllEquipRequest" end) -- 装备
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) CombatPlanManager.RequestAllPlanData(LoadingPanel.OnStep) return "RequestAllPlanData" end) -- 作战方案
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.MedalGetAllRequest(LoadingPanel.OnStep) return "MedalGetAllRequest" end) -- 勋章信息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.ItemInfoRequest(0, LoadingPanel.OnStep)
|
||||
return "ItemInfoRequest"
|
||||
end) -- 物品信息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.AllEquipRequest(0, LoadingPanel.OnStep)
|
||||
return "AllEquipRequest"
|
||||
end) -- 装备
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
CombatPlanManager.RequestAllPlanData(LoadingPanel.OnStep)
|
||||
return "RequestAllPlanData"
|
||||
end) -- 作战方案
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.MedalGetAllRequest(LoadingPanel.OnStep)
|
||||
return "MedalGetAllRequest"
|
||||
end) -- 勋章信息
|
||||
-- table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.TotemListRequest(LoadingPanel.OnStep) return "TotemListRequest" end) -- 图腾
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) return "HeroInfoRequest" end) -- 英雄信息
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.TeamInfoRequest(LoadingPanel.OnStep) return "TeamInfoRequest" end) -- 编队
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetAllMailData(LoadingPanel.OnStep) return "GetAllMailData" end) -- 邮件
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetAllFightDataRequest(LoadingPanel.OnStep) return "GetAllFightDataRequest" end)
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetActivityAllRewardRequest(LoadingPanel.OnStep) return "GetActivityAllRewardRequest" end) -- 活动奖励
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.RequestBaseArenaData(LoadingPanel.OnStep) return "RequestBaseArenaData" end) -- 竞技场
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) ShopManager.InitData(LoadingPanel.OnStep) return "ShopManager.InitData" end) -- 商店
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.HeroInfoRequest(0, LoadingPanel.OnStep)
|
||||
return "HeroInfoRequest"
|
||||
end) -- 英雄信息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.TeamInfoRequest(LoadingPanel.OnStep)
|
||||
return "TeamInfoRequest"
|
||||
end) -- 编队
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetAllMailData(LoadingPanel.OnStep)
|
||||
return "GetAllMailData"
|
||||
end) -- 邮件
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetAllFightDataRequest(LoadingPanel.OnStep)
|
||||
return "GetAllFightDataRequest"
|
||||
end)
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetActivityAllRewardRequest(LoadingPanel.OnStep)
|
||||
return "GetActivityAllRewardRequest"
|
||||
end) -- 活动奖励
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.RequestBaseArenaData(LoadingPanel.OnStep)
|
||||
return "RequestBaseArenaData"
|
||||
end) -- 竞技场
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
ShopManager.InitData(LoadingPanel.OnStep)
|
||||
return "ShopManager.InitData"
|
||||
end) -- 商店
|
||||
-- table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetWorkShopInfoRequest(LoadingPanel.OnStep) return "GetWorkShopInfoRequest" end) -- 工坊
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) ChatManager.InitData(LoadingPanel.OnStep) return "ChatManager.InitData" end) -- 聊天
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetAllFunState(LoadingPanel.OnStep) return "GetAllFunState" end) -- 功能开启信息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
ChatManager.InitData(LoadingPanel.OnStep)
|
||||
return "ChatManager.InitData"
|
||||
end) -- 聊天
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetAllFunState(LoadingPanel.OnStep)
|
||||
return "GetAllFunState"
|
||||
end) -- 功能开启信息
|
||||
--table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.RequestGetFriendInfo(1, LoadingPanel.OnStep) return "RequestGetFriendInfo1" end) -- 好友
|
||||
-- table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.RequestGetFriendInfo(2, LoadingPanel.OnStep) return "RequestGetFriendInfo2" end) -- 好友搜索
|
||||
--table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.RequestGetFriendInfo(3, LoadingPanel.OnStep) return "RequestGetFriendInfo3" end) -- 好友申请
|
||||
-- table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.RequestGetFriendInfo(4, LoadingPanel.OnStep) return "RequestGetFriendInfo4" end) -- 黑名单
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) FriendChatManager.InitData(LoadingPanel.OnStep) return "FriendChatManager.InitData" end) -- 好友消息
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) MyGuildManager.InitBaseData(LoadingPanel.OnStep) return "MyGuildManager.InitBaseData" end) -- 公会信息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
FriendChatManager.InitData(LoadingPanel.OnStep)
|
||||
return "FriendChatManager.InitData"
|
||||
end) -- 好友消息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
MyGuildManager.InitBaseData(LoadingPanel.OnStep)
|
||||
return "MyGuildManager.InitBaseData"
|
||||
end) -- 公会信息
|
||||
--table.insert(requestList, function() this.LogTime(#requestList + 1) MyGuildManager.RequestMyGuildMembers(LoadingPanel.OnStep) return "MyGuildManager.RequestMyGuildMembers" end) -- 公会成员申请
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) GuildFightManager.InitBaseData(LoadingPanel.OnStep) return "GuildFightManager.InitBaseData" end) -- 公会战
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetAllGuildSkillData(LoadingPanel.OnStep) return "GetAllGuildSkillData" end) -- 公会技能
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.InitFightPointLevelInfo(LoadingPanel.OnStep) return "InitFightPointLevelInfo" end) -- 关卡
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GuildHelpGetAllRequest(LoadingPanel.OnStep) return "GuildHelpGetAllRequest" end) -- 公会援助
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) GuildBattleManager.InitData(LoadingPanel.OnStep) return "GuideBattlePanel.InitData" end) -- 公会战
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
GuildFightManager.InitBaseData(LoadingPanel.OnStep)
|
||||
return "GuildFightManager.InitBaseData"
|
||||
end) -- 公会战
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetAllGuildSkillData(LoadingPanel.OnStep)
|
||||
return "GetAllGuildSkillData"
|
||||
end) -- 公会技能
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.InitFightPointLevelInfo(LoadingPanel.OnStep)
|
||||
return "InitFightPointLevelInfo"
|
||||
end) -- 关卡
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GuildHelpGetAllRequest(LoadingPanel.OnStep)
|
||||
return "GuildHelpGetAllRequest"
|
||||
end) -- 公会援助
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
GuildBattleManager.InitData(LoadingPanel.OnStep)
|
||||
return "GuideBattlePanel.InitData"
|
||||
end) -- 公会战
|
||||
-- table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.TreasureOfHeavenScoreRequest(LoadingPanel.OnStep) return "TreasureOfHeavenScoreRequest" end) -- 天宫秘宝积分
|
||||
--table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.RankFirstRequest({3,22,20,4,21},{0,0,0,0,20},LoadingPanel.OnStep) return "RankFirstRequest" end) -- 排行榜数据
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetAllAdjutantInfo(LoadingPanel.OnStep) return "GetAllAdjutantInfo" end) -- 守护数据
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.VirtualBattleGetInfo(LoadingPanel.OnStep) return "VirtualBattleGetInfo" end) -- 爬塔数据
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetSituationInfoRequest(LoadingPanel.OnStep) return "GetSituationInfoRequest" end) -- 阿登战役数据
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) SupportManager.GetServerData(LoadingPanel.OnStep) return "GetServerData" end) -- 支援
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) GuildCarDelayManager.InitBaseData(LoadingPanel.OnStep) return "GuildCarDelayManager.InitBaseData" end) -- 明斯克战役
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) AircraftCarrierManager.GetLeadData(LoadingPanel.OnStep) return "ReqCVInfo" end) -- 神眷者
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) AircraftCarrierManager.GetAllPlaneReq(LoadingPanel.OnStep) return "GetAllPlaneReq" end) -- 神眷者基因
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.DefTrainingGetInfo(LoadingPanel.OnStep) return "DefTrainingGetInfo" end) -- 防守训练
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.chenghaoRequest(LoadingPanel.OnStep) return "chenghaoRequest" end) -- 称号信息
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) ArenaTopMatchManager.RequestTopMatchBaseInfo(LoadingPanel.OnStep) return "ArenaTopMatchRequest" end) -- 巅峰赛数据
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.CarChallengeProgressIndication(LoadingPanel.OnStep) return "WorldBossRequest" end) -- 梦魇入侵数据
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) PlayerManager.RefreshreceivedList(LoadingPanel.OnStep) return "LineupRecommendRequest" end) -- 阵容推荐
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetWorldArenaInfoRequest(false,false,LoadingPanel.OnStep) return "GetWorldArenaInfoRequest" end) -- 跨服
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) RankingManager.InitRankingRewardList(LoadingPanel.OnStep) return "InitRankingRewardList" end) -- 全服奖励数据
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) CardActivityManager.InitWish(LoadingPanel.OnStep) return "InitWish" end) -- 卡牌主题活动
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) OperatingManager.GetAllWarOrderData(LoadingPanel.OnStep) return "GetAllWarOrderData" end) -- 战令
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) PrivilegeManager.GetWelfareCurrencyInfo(LoadingPanel.OnStep) return "GetWelfareCurrencyInfo" end) -- 福利币
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) PrivilegeManager.InitPrivilegeCard(LoadingPanel.OnStep) return "InitPrivilegeCard" end) -- 特权卡
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) ChaosManager.SetCampWarState(LoadingPanel.OnStep) return "SetCampWarState" end) -- 混乱之治状态
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) EnergyBaseManager.SetBaseFacilityInfo(LoadingPanel.OnStep) return "SetBaseFacilityInfo" end) -- 能源基地
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetAccountVerify(1, LoadingPanel.OnStep) return "GetAccountVerify1" end) -- 手机绑定
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) NetManager.GetAccountVerify(4, LoadingPanel.OnStep) return "GetAccountVerify4" end) -- FB分享
|
||||
table.insert(requestList, function() this.LogTime(#requestList + 1) PowerCenterManager.GetPowerCenterInfo(LoadingPanel.OnStep) return "GetPowerCenterInfo" end) -- 异能中心
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetAllAdjutantInfo(LoadingPanel.OnStep)
|
||||
return "GetAllAdjutantInfo"
|
||||
end) -- 守护数据
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.VirtualBattleGetInfo(LoadingPanel.OnStep)
|
||||
return "VirtualBattleGetInfo"
|
||||
end) -- 爬塔数据
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetSituationInfoRequest(LoadingPanel.OnStep)
|
||||
return "GetSituationInfoRequest"
|
||||
end) -- 阿登战役数据
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
SupportManager.GetServerData(LoadingPanel.OnStep)
|
||||
return "GetServerData"
|
||||
end) -- 支援
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
GuildCarDelayManager.InitBaseData(LoadingPanel.OnStep)
|
||||
return "GuildCarDelayManager.InitBaseData"
|
||||
end) -- 明斯克战役
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
AircraftCarrierManager.GetLeadData(LoadingPanel.OnStep)
|
||||
return "ReqCVInfo"
|
||||
end) -- 神眷者
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
AircraftCarrierManager.GetAllPlaneReq(LoadingPanel.OnStep)
|
||||
return "GetAllPlaneReq"
|
||||
end) -- 神眷者基因
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.DefTrainingGetInfo(LoadingPanel.OnStep)
|
||||
return "DefTrainingGetInfo"
|
||||
end) -- 防守训练
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.chenghaoRequest(LoadingPanel.OnStep)
|
||||
return "chenghaoRequest"
|
||||
end) -- 称号信息
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
ArenaTopMatchManager.RequestTopMatchBaseInfo(LoadingPanel.OnStep)
|
||||
return "ArenaTopMatchRequest"
|
||||
end) -- 巅峰赛数据
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.CarChallengeProgressIndication(LoadingPanel.OnStep)
|
||||
return "WorldBossRequest"
|
||||
end) -- 梦魇入侵数据
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
PlayerManager.RefreshreceivedList(LoadingPanel.OnStep)
|
||||
return "LineupRecommendRequest"
|
||||
end) -- 阵容推荐
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetWorldArenaInfoRequest(false, false, LoadingPanel.OnStep)
|
||||
return "GetWorldArenaInfoRequest"
|
||||
end) -- 跨服
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
RankingManager.InitRankingRewardList(LoadingPanel.OnStep)
|
||||
return "InitRankingRewardList"
|
||||
end) -- 全服奖励数据
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
CardActivityManager.InitWish(LoadingPanel.OnStep)
|
||||
return "InitWish"
|
||||
end) -- 卡牌主题活动
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
OperatingManager.GetAllWarOrderData(LoadingPanel.OnStep)
|
||||
return "GetAllWarOrderData"
|
||||
end) -- 战令
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
PrivilegeManager.GetWelfareCurrencyInfo(LoadingPanel.OnStep)
|
||||
return "GetWelfareCurrencyInfo"
|
||||
end) -- 福利币
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
PrivilegeManager.InitPrivilegeCard(LoadingPanel.OnStep)
|
||||
return "InitPrivilegeCard"
|
||||
end) -- 特权卡
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
ChaosManager.SetCampWarState(LoadingPanel.OnStep)
|
||||
return "SetCampWarState"
|
||||
end) -- 混乱之治状态
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
EnergyBaseManager.SetBaseFacilityInfo(LoadingPanel.OnStep)
|
||||
return "SetBaseFacilityInfo"
|
||||
end) -- 能源基地
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetAccountVerify(1, LoadingPanel.OnStep)
|
||||
return "GetAccountVerify1"
|
||||
end) -- 手机绑定
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
NetManager.GetAccountVerify(4, LoadingPanel.OnStep)
|
||||
return "GetAccountVerify4"
|
||||
end) -- FB分享
|
||||
table.insert(requestList,
|
||||
function()
|
||||
this.LogTime(#requestList + 1)
|
||||
PowerCenterManager.GetPowerCenterInfo(LoadingPanel.OnStep)
|
||||
return "GetPowerCenterInfo"
|
||||
end) -- 异能中心
|
||||
|
||||
table.insert(requestList, function()-- 登录请求最终接口,所有请求放在此接口之前
|
||||
if AppConst.isGuide then
|
||||
if GuideManager.GetCurId(GuideType.Force) == 1 and PlayerManager.nickName == tostring(PlayerManager.uid) then
|
||||
--创号阶段先进入剧情对话,进入假战斗,然后对话起名,最后进入主界面
|
||||
-- local exBattle = function ()
|
||||
-- PatFaceManager.isLogin = true
|
||||
-- UIManager.OpenPanelAsync(UIName.MainPanel, function ()
|
||||
-- UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||
-- LoadingPanel.End()
|
||||
-- end)
|
||||
-- end
|
||||
-- StoryManager.EventTrigger(100001, exBattle)
|
||||
local func = function ()
|
||||
-- StoryManager.EventTrigger(300007)
|
||||
table.insert(requestList,
|
||||
function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
if AppConst.isGuide then
|
||||
if GuideManager.GetCurId(GuideType.Force) == 1 and PlayerManager.nickName == tostring(PlayerManager.uid) then
|
||||
--创号阶段先进入剧情对话,进入假战斗,然后对话起名,最后进入主界面
|
||||
-- local exBattle = function ()
|
||||
-- PatFaceManager.isLogin = true
|
||||
-- UIManager.OpenPanelAsync(UIName.MainPanel, function ()
|
||||
-- UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||
-- LoadingPanel.End()
|
||||
-- end)
|
||||
-- end
|
||||
-- StoryManager.EventTrigger(100001, exBattle)
|
||||
local func = function()
|
||||
-- StoryManager.EventTrigger(300007)
|
||||
StoryManager.EventTrigger(100001)
|
||||
end
|
||||
StoryManager.EventTrigger(100001)
|
||||
--UIManager.OpenPanel(UIName.VideoPanel,"X1_video_Scene01_01",func)
|
||||
--UIManager.OpenPanel(UIName.BackGroundInfoPanel,GetLanguageStrById(22551),func)
|
||||
--StoryManager.EventTrigger(300007)
|
||||
else
|
||||
PatFaceManager.isLogin = true
|
||||
UIManager.OpenPanelAsync(UIName.MainPanel, function()
|
||||
if GuideManager.GetCurId(GuideType.Force) ~= -1 then
|
||||
UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||
end
|
||||
LoadingPanel.End()
|
||||
end)
|
||||
end
|
||||
StoryManager.EventTrigger(100001)
|
||||
--UIManager.OpenPanel(UIName.VideoPanel,"X1_video_Scene01_01",func)
|
||||
--UIManager.OpenPanel(UIName.BackGroundInfoPanel,GetLanguageStrById(22551),func)
|
||||
--StoryManager.EventTrigger(300007)
|
||||
else
|
||||
PatFaceManager.isLogin = true
|
||||
UIManager.OpenPanelAsync(UIName.MainPanel, function ()
|
||||
if GuideManager.GetCurId(GuideType.Force) ~= -1 then
|
||||
UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||
UIManager.OpenPanelAsync(UIName.MainPanel, function()
|
||||
if RoomManager.RoomAddress == nil or RoomManager.RoomAddress == "" then
|
||||
RoomManager.IsMatch = 0
|
||||
elseif RoomManager.RoomAddress == "1" then
|
||||
RoomManager.IsMatch = 1
|
||||
UIManager.OpenPanel(UIName.GMPanel)
|
||||
PopupTipPanel.ShowTipByLanguageId(11122)
|
||||
else
|
||||
if RoomManager.CurRoomType == 1 then
|
||||
RoomManager.RoomReGetGameRequest(RoomManager.RoomAddress)
|
||||
end
|
||||
end
|
||||
LoadingPanel.End()
|
||||
end)
|
||||
end
|
||||
else
|
||||
UIManager.OpenPanelAsync(UIName.MainPanel, function()
|
||||
if RoomManager.RoomAddress == nil or RoomManager.RoomAddress == "" then
|
||||
RoomManager.IsMatch = 0
|
||||
elseif RoomManager.RoomAddress == "1" then
|
||||
RoomManager.IsMatch = 1
|
||||
UIManager.OpenPanel(UIName.GMPanel)
|
||||
PopupTipPanel.ShowTipByLanguageId(11122)
|
||||
else
|
||||
if RoomManager.CurRoomType == 1 then
|
||||
-- 登录成功刷新红点数据
|
||||
RedpotManager.CheckAllRedPointStatus()
|
||||
-- 检查新字状态
|
||||
FunctionOpenMananger.InitCheck()
|
||||
this.SubmitGameData()
|
||||
DataCenterManager.CommitBootStatus()
|
||||
end)
|
||||
|
||||
RoomManager.RoomReGetGameRequest(RoomManager.RoomAddress)
|
||||
end
|
||||
end
|
||||
LoadingPanel.End()
|
||||
end)
|
||||
end
|
||||
-- 登录成功刷新红点数据
|
||||
RedpotManager.CheckAllRedPointStatus()
|
||||
-- 检查新字状态
|
||||
FunctionOpenMananger.InitCheck()
|
||||
this.SubmitGameData()
|
||||
DataCenterManager.CommitBootStatus()
|
||||
end)
|
||||
|
||||
--
|
||||
--
|
||||
for _, func in ipairs(requestList) do
|
||||
LoadingPanel.AddStep(func)
|
||||
end
|
||||
|
|
@ -828,26 +1056,26 @@ function this.OnConnect(network)
|
|||
RequestPanel.Show(GetLanguageStrById(11125))
|
||||
if IsSDKLogin then
|
||||
local str = LoginRoot_Url
|
||||
.."getUserInfo?openId="..AppConst.OpenId
|
||||
.."&serverId="..LoginManager.ServerId
|
||||
.."&token="..AppConst.MiTokenStr
|
||||
.."&platform="..1
|
||||
.."&sub_channel="..LoginRoot_SubChannel
|
||||
.."&pid="..AppConst.SdkChannel--LoginManager.pt_pId
|
||||
.."&gid="..AppConst.SdkPackageName--LoginManager.pt_gId
|
||||
.."&version="..LoginRoot_PackageVersion
|
||||
.."&area="..LoginManager.area
|
||||
.. "getUserInfo?openId=" .. AppConst.OpenId
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
.. "&token=" .. AppConst.MiTokenStr
|
||||
.. "&platform=" .. 1
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&pid=" .. AppConst.SdkChannel --LoginManager.pt_pId
|
||||
.. "&gid=" .. AppConst.SdkPackageName --LoginManager.pt_gId
|
||||
.. "&version=" .. LoginRoot_PackageVersion
|
||||
.. "&area=" .. LoginManager.area
|
||||
Log(str)
|
||||
networkMgr:SendGetHttp(str, this.OnReceiveLogin, nil, nil, nil)
|
||||
else
|
||||
local str = LoginRoot_Url
|
||||
.."getUserInfo?openId="..LoginManager.openId
|
||||
.."&serverId="..LoginManager.ServerId
|
||||
.."&token="..LoginManager.token
|
||||
.."&platform=1"
|
||||
.."&sub_channel="..LoginRoot_SubChannel
|
||||
.."&version="..LoginRoot_PackageVersion
|
||||
.."&area="..LoginManager.area
|
||||
.. "getUserInfo?openId=" .. LoginManager.openId
|
||||
.. "&serverId=" .. LoginManager.ServerId
|
||||
.. "&token=" .. LoginManager.token
|
||||
.. "&platform=1"
|
||||
.. "&sub_channel=" .. LoginRoot_SubChannel
|
||||
.. "&version=" .. LoginRoot_PackageVersion
|
||||
.. "&area=" .. LoginManager.area
|
||||
Log(str)
|
||||
networkMgr:SendGetHttp(str, this.OnReceiveLogin, nil, nil, nil)
|
||||
end
|
||||
|
|
@ -863,20 +1091,26 @@ function this.SetLoginPart(flag)
|
|||
end
|
||||
|
||||
function this.SubmitGameData()
|
||||
ThinkingAnalyticsManager.Track("login",{
|
||||
ThinkingAnalyticsManager.Track("login", {
|
||||
channel = AppConst.ChannelType,
|
||||
server_id = LoginManager.ServerId,
|
||||
area_id = 0,
|
||||
last_login_time = System.DateTime.Now:ToString("yyyy/mm/dd HH:mm:ss.fff")
|
||||
})
|
||||
|
||||
LogError("=============uid:" .. PlayerManager.uid)
|
||||
LogError("=============uname:" .. PlayerManager.nickName)
|
||||
CustomEventManager.GameCustomEvent("进入服务器")
|
||||
local isNewRole = PlayerPrefs.GetString(tostring(PlayerManager.uid), "")
|
||||
if isNewRole == "" then
|
||||
PlayerPrefs.SetString(tostring(PlayerManager.uid), tostring(PlayerManager.uid))
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_CREATE_ROLE })
|
||||
--local isNewRole = PlayerPrefs.GetString(tostring(PlayerManager.uid), "")
|
||||
--if PlayerManager.uid == PlayerManager.nickName then
|
||||
--PlayerPrefs.SetString(tostring(PlayerManager.uid), tostring(PlayerManager.uid))
|
||||
--SubmitExtraData({ type = SDKSubMitType.TYPE_CREATE_ROLE })
|
||||
--end
|
||||
if tostring(PlayerManager.uid) == tostring(PlayerManager.nickName) then
|
||||
LogError("cccccccccccccccccccccc==uname:" .. PlayerManager.nickName)
|
||||
else
|
||||
LogError("=============uname:" .. PlayerManager.nickName)
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_ENTER_GAME })
|
||||
end
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_ENTER_GAME })
|
||||
end
|
||||
|
||||
return LoginPanel
|
||||
return LoginPanel
|
||||
|
|
|
|||
|
|
@ -5040,7 +5040,12 @@ function this.GetRefreshCountDownRequest(itemIdList,func)
|
|||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--评价奖励
|
||||
function NetManager.GetGoogleCommentReward()
|
||||
local data = PlayerInfoProto_pb.GetGoogleCommentRewardRequest()
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessage(MessageTypeProto_pb.GET_GOOGLE_COMMENT_REWARD, msg)
|
||||
end
|
||||
--请求英雄上锁
|
||||
function this.HeroLockEvent(heroId,lockState, func)
|
||||
local data = HeroInfoProto_pb.HeroLockChangeRequest()
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function HighMonthCardPage:RefreshStoneShow()
|
|||
--豪华月卡
|
||||
local curMonthCardOpenState = curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD] and curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD].endingTime ~= 0
|
||||
if GetChannelConfig().RechargeNum_Mode == 1 then
|
||||
self.smallDay1.text = GetLanguageStrById(50421) .." ".. monthCardConFig[MONTH_CARD_TYPE.LUXURYMONTHCARD].Price[2] .." ".. GetLanguageStrById(50422).." "
|
||||
self.smallDay1.text = GetLanguageStrById(50421) .." ".. MoneyUtil.GetMoney(monthCardConFig[MONTH_CARD_TYPE.LUXURYMONTHCARD].Price[2]) .." ".. GetLanguageStrById(50422).." "
|
||||
else
|
||||
self.smallDay1.text = GetLanguageStrById(11476) .." ".. monthCardConFig[MONTH_CARD_TYPE.LUXURYMONTHCARD].Price[2]*10 .." ".. GetLanguageStrById(11477).." "
|
||||
end
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ function MonthCardPage:RefreshStoneShow()
|
|||
--月卡
|
||||
local curMonthCardOpenState = curAllMonthCardData[MONTH_CARD_TYPE.MONTHCARD] and curAllMonthCardData[MONTH_CARD_TYPE.MONTHCARD].endingTime ~= 0
|
||||
if GetChannelConfig().RechargeNum_Mode == 1 then
|
||||
self.smallDay1.text = GetLanguageStrById(50421) .." ".. monthCardConFig[MONTH_CARD_TYPE.MONTHCARD].Price[2] .." ".. GetLanguageStrById(50422).." "
|
||||
self.smallDay1.text = GetLanguageStrById(50421) .." ".. MoneyUtil.GetMoney(monthCardConFig[MONTH_CARD_TYPE.MONTHCARD].Price[2]) .." ".. GetLanguageStrById(50422).." "
|
||||
else
|
||||
self.smallDay1.text = GetLanguageStrById(11476) .." ".. monthCardConFig[MONTH_CARD_TYPE.MONTHCARD].Price[2]*10 .." ".. GetLanguageStrById(11477).." "
|
||||
end
|
||||
|
|
@ -59,7 +59,7 @@ function MonthCardPage:RefreshStoneShow()
|
|||
self.activation:SetActive(true)
|
||||
self.time.text = ""
|
||||
if GetChannelConfig().RechargeNum_Mode == 1 then
|
||||
self.progress.text = GetLanguageStrById(50423)..OperatingManager.GetmonthSaveAmt() .."/"..monthCardConFig[MONTH_CARD_TYPE.MONTHCARD].Price[2]
|
||||
self.progress.text = GetLanguageStrById(50423)..MoneyUtil.GetMoney(OperatingManager.GetmonthSaveAmt()) .."/"..MoneyUtil.GetMoney(monthCardConFig[MONTH_CARD_TYPE.MONTHCARD].Price[2])
|
||||
else
|
||||
self.progress.text = GetLanguageStrById(12564)..OperatingManager.GetmonthSaveAmt()*10 .."/"..monthCardConFig[MONTH_CARD_TYPE.MONTHCARD].Price[2]*10
|
||||
end
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ function this.SDKPayFun(discountID, context, func)
|
|||
payData.RechargeId = RechargeId--channelRechargeIdConfig[AppConst.ChannelType]
|
||||
payData.devaluateId = discountID
|
||||
this.RequestPay(payData)
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_PURCHE })
|
||||
end
|
||||
|
||||
function this.RequestPay(context)
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ function this.ChangeUserName(type, name, teamPosId, sex, callBack)
|
|||
this.roleSex = sex
|
||||
this.roleName = name
|
||||
PlayerManager.nickName = name
|
||||
|
||||
|
||||
-- 打点静态数据修改
|
||||
-- ThinkingAnalyticsManager.SetSuperProperties({
|
||||
-- role_name = PlayerManager.nickName,
|
||||
|
|
@ -116,7 +116,11 @@ function this.ChangeUserName(type, name, teamPosId, sex, callBack)
|
|||
local config = ConfigManager.GetConfigDataByKey(ConfigName.PlayerRole, "Role", sex)
|
||||
PlayerManager.head = config.RolePic
|
||||
end
|
||||
|
||||
if type == 1 then
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_CREATE_ROLE })
|
||||
else
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_CHANGENAME })
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
if callBack then callBack() end
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ function this.SetInfo()
|
|||
this.btnUnlock:GetComponent("Image").sprite = Util.LoadSprite(GetPictureFont("X1_chengzhangshouce_jiesuo"))
|
||||
end
|
||||
|
||||
this.time.text = GetLanguageStrById(10525)..TimeToMD(this.activityInfo.startTime).." - "..TimeToMD(this.activityInfo.endTime)
|
||||
this.time.text = GetLanguageStrById(10525)..TimeToYMDHMS(this.activityInfo.startTime).." - "..TimeToYMDHMS(this.activityInfo.endTime)
|
||||
this.title_lock:SetActive(not PlayerManager.hadBuySeason)
|
||||
|
||||
this.OnChangeTab(curIndex)
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function SettingPanel:OnOpen(index)
|
||||
--NetManager.GetGoogleCommentReward()
|
||||
funIndex = index or 1
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue