【灵脉秘境】提交

dev_chengFeng
ZhangBiao 2021-11-18 15:14:39 +08:00
parent a2a5d0f192
commit 58d7a71faf
5 changed files with 49 additions and 31 deletions

View File

@ -29,6 +29,7 @@ end
function this:OnShow(_parent)
self.parent = _parent
self.data = LingMaiMiJingManager.recordData
PlayerPrefs.SetString(PlayerManager.uid.."LingMai",this.recordData[1].time..#this.recordData)
self:Refresh()
end

View File

@ -177,13 +177,11 @@ function JumpServerPanel:BtnClick(id)
if id == JumpServer_Type.HightLadder then
UIManager.OpenPanel(UIName.JumpServerHightLadderPanel)
self:ClosePanel()
end
if id == JumpServer_Type.YuXuLunDao then
NetManager.CrossYuXuLunDaoGetInfoRequest(1,function(msg)
UIManager.OpenPanel(UIName.WorldArenaMainPanel,msg)
self:ClosePanel()
end)
end
if id == JumpServer_Type.QiJieShiLian then
@ -192,7 +190,6 @@ function JumpServerPanel:BtnClick(id)
QiJieShiLianManager.IsLock = false
if qiejieConfig[msg.id] then
UIManager.OpenPanel(UIName.QiJieShiLianPanel)
self:ClosePanel()
else
LogError("七界试炼不存在该ID"..tostring(msg.id))
PopupTipPanel.ShowTip("无法进入,请联系客服!")
@ -200,15 +197,18 @@ function JumpServerPanel:BtnClick(id)
end)
end
if id == JumpServer_Type.LingMaiMiJing then
-- NetManager
if LingMaiMiJingManager.state == 1 then
UIManager.OpenPanel(UIName.QiJieShiLianPanel)
self:ClosePanel()
elseif LingMaiMiJingManager.state == 0 then
PopupTipPanel.ShowTip("灵脉未开启!")
else
PopupTipPanel.ShowTip("不在抢夺阶段!")
end
NetManager.GetLingMaiInfoRequest(0,function ()
if LingMaiMiJingManager.state == 0 then
PopupTipPanel.ShowTip("灵脉秘境未开启!")
else
if not LingMaiMiJingManager.GetData() then
LogError("灵脉试炼数据为空")
PopupTipPanel.ShowTip("灵脉暂无法进入,请耐心等待!")
return
end
UIManager.OpenPanel(UIName.LingMaiMiJingPanel)
end
end)
end
end

View File

@ -13,6 +13,7 @@ function this.Initialize()
this.curPage = 0
this.lingmaiData = {}
this.battleResult = {}
this.recordData = {}
end
--获取manager中的信息
@ -80,7 +81,7 @@ end
--获取服务器发来的信息
function this.GetLingMaiServerData(msg,func)
this.state = msg.state == 0 and 4 or msg.state
this.state = msg.state
this.myPlaceId = msg.myOccupyId
this.startTime = msg.myOccupyTime
this.fightTime = msg.remainChangeTimes
@ -127,4 +128,26 @@ function this.CheckPrivilage(func)
end
end
function this.CheckRedPoint()
if PrivilegeManager.GetPrivilegeRemainValue(2030) > 0 or this.CheckRecord() then
return true
else
return false
end
end
function this.CheckRecord()
NetManager.LingMaiRecordRequest(function ()
if #this.recordData > 0 then
if not PlayerPrefs.GetString(PlayerManager.uid.."LingMai", this.recordData[1].time..#this.recordData) then
PlayerPrefs.SetString(PlayerManager.uid.."LingMai", "")
end
if PlayerPrefs.GetString(PlayerManager.uid.."LingMai") ~= this.recordData[1].time..#this.recordData then
return true
end
end
return false
end)
end
return LingMaiMiJingManager

View File

@ -116,10 +116,6 @@ end
function LingMaiMiJingPanel:OnShow()
NetManager.GetLingMaiInfoRequest(LingMaiMiJingManager.curPage,function ()
self.data = LingMaiMiJingManager.GetData()
if not self.data then
self:ClosePanel()
return
end
self:SetTime()
self:SetMydata()
self:SetVeins()
@ -168,8 +164,7 @@ function LingMaiMiJingPanel:SetVeins()
local grid = Util.GetGameObject(go,"obtain/grid")
local rewardPre = Util.GetGameObject(grid,"rewardPre")
rewardPre:SetActive(false)
-- obtain:SetActive(LingMaiMiJingManager.state == 1)
obtain:SetActive(true)
obtain:SetActive(LingMaiMiJingManager.state == 1)
title.text = data.veinName
num.text = data.No
@ -191,11 +186,11 @@ function LingMaiMiJingPanel:SetVeins()
Util.GetGameObject(item,"Text"):GetComponent("Text").text = string.format( "%s/分",data.RewardList[j][2])
end
Util.AddOnceClick(go,function ()
-- if LingMaiMiJingManager.state == 1 then
if LingMaiMiJingManager.state == 1 then
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid,PLAYER_INFO_VIEW_TYPE.LINGMAIMIJING,data.serverName and data.serverName or nil,data)
-- else
-- PopupTipPanel.ShowTip("<color=red>灵脉秘境未开启!</color>")
-- end
else
PopupTipPanel.ShowTip("<color=red>灵脉秘境未开启!</color>")
end
end)
end
end

View File

@ -642,14 +642,13 @@ function this:BindEvent()
end)
Util.AddClick(this.btnHongMeng,function()
-- NetManager.HongMengInfoResponse(function ()
-- if HarmonyManager:HongMengTowerUpLimit() > 0 then
-- UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
-- else
-- UIManager.OpenPanel(UIName.HongMengPanel)
-- end
-- end)
UIManager.OpenPanel(UIName.LingMaiMiJingPanel)
NetManager.HongMengInfoResponse(function ()
if HarmonyManager:HongMengTowerUpLimit() > 0 then
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
else
UIManager.OpenPanel(UIName.HongMengPanel)
end
end)
end)
Util.AddClick(this.btnTianShuMiJuan,function()