Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c
commit
6f0132e18d
|
@ -465,7 +465,7 @@ function this.ExecuteLoading()
|
|||
function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end,
|
||||
function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end,
|
||||
function() NetManager.HardStageRequest(LoadingPanel.OnStep) end,
|
||||
-- function() NetManager.VipLevelStateRequset(LoadingPanel.OnStep) end,
|
||||
function() NetManager.VipLevelStateRequset(LoadingPanel.OnStep) end,
|
||||
--[[[35] =]] function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
-- 登录成功确认
|
||||
NetManager.LoginConfimRequest()
|
||||
|
|
|
@ -920,7 +920,7 @@ end
|
|||
--Vip等级奖励推送
|
||||
function this.RefreshLevleRewardDatas(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.VipLevelStateRewardResponse()
|
||||
local msg = PlayerInfoProto_pb.VipLevelStateResponse()
|
||||
msg:ParseFromString(data)
|
||||
VipManager.InitLevleRewardDatas(msg)
|
||||
end
|
||||
|
|
|
@ -397,13 +397,13 @@ end
|
|||
function this.CheckNewVipRP()
|
||||
--等级奖励红点
|
||||
local vipCurLevel = VipManager.GetVipLevel()
|
||||
-- if levleRewardDatas then
|
||||
-- for i = 0, #levleRewardDatas do
|
||||
-- if levleRewardDatas[i].val and levleRewardDatas[i].val == 1 then
|
||||
-- return true
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
if levleRewardDatas and #levleRewardDatas > 0 then
|
||||
for i = 1, #levleRewardDatas do
|
||||
if levleRewardDatas[i] == 1 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if vipCurLevel >= VipManager.GetMaxVipLevel() then
|
||||
return false
|
||||
|
@ -477,9 +477,8 @@ function this.GetAddPro()
|
|||
end
|
||||
--levleRewardDatas vip特权等级奖励初始化
|
||||
function this.InitLevleRewardDatas(msg)
|
||||
LogError("----------------------------------")
|
||||
for i = 1, #msg.vipState do
|
||||
LogError("msg.vipState[i].key "..msg.vipState[i].key.." val "..msg.vipState[i].val)
|
||||
-- LogPink("msg.vipState[i].key "..msg.vipState[i].key.." val "..msg.vipState[i].val)
|
||||
levleRewardDatas[msg.vipState[i].key] = msg.vipState[i].val--val 0 不可领取 1 可领取 2已领取
|
||||
end
|
||||
end
|
||||
|
@ -496,4 +495,14 @@ function this.GetLevleRewardDatas(key)
|
|||
end
|
||||
|
||||
end
|
||||
function this.GetCurMinCanGetRewardLevel()
|
||||
if levleRewardDatas and #levleRewardDatas > 0 then
|
||||
for i = 1, #levleRewardDatas do
|
||||
if levleRewardDatas[i] == 1 then
|
||||
return i
|
||||
end
|
||||
end
|
||||
end
|
||||
return math.min(VipManager.GetVipLevel() + 1, VipManager.GetMaxVipLevel())
|
||||
end
|
||||
return this
|
|
@ -202,7 +202,7 @@ function VipPanelV2:SetPanelStatus()
|
|||
local maxLv = VipManager.GetMaxVipLevel()
|
||||
self.curLevel.sprite = this.spLoader:LoadSprite("r_zjm_tequanpaizi_0" .. self.context.vipLevel.."_zh")
|
||||
-- 显示的
|
||||
self.curShowLevel = math.min(self.context.vipLevel + 1, maxLv)
|
||||
self.curShowLevel = VipManager.GetCurMinCanGetRewardLevel()--math.min(self.context.vipLevel + 1, maxLv)
|
||||
self:RefreshPanelStatus(self.curShowLevel)
|
||||
self:CheckTaskShow()
|
||||
self.BtnLeft:SetActive(self.curShowLevel > 1)
|
||||
|
@ -541,13 +541,17 @@ function this.CheckVipLvPos(tarObj,lv)
|
|||
end
|
||||
--奖励
|
||||
function VipPanelV2:ShowRewardInfo(level)
|
||||
LogYellow("level "..level)
|
||||
local state = VipManager.GetLevleRewardDatas(level)--0 未领取 1 已领取
|
||||
local vipCurLevel = VipManager.GetVipLevel()
|
||||
if state == 0 or state == 1 then
|
||||
if state == 0 then
|
||||
self.getReawardBtnText.text = Language[10018]
|
||||
Util.SetGray(self.getReawardBtn, true)
|
||||
elseif state == 1 then
|
||||
self.getReawardBtnText.text = Language[10018]
|
||||
Util.SetGray(self.getReawardBtn, false)
|
||||
elseif state == 2 then
|
||||
self.getReawardBtnText.text = Language[10101]
|
||||
Util.SetGray(self.getReawardBtn, false)
|
||||
end
|
||||
local curConfig = ConfigManager.GetConfigData(ConfigName.VipLevelConfig, level)
|
||||
local reward = curConfig.Reward
|
||||
|
|
Loading…
Reference in New Issue