【家园】界面微调

dev_chengFeng
ZhangBiao 2022-01-06 10:56:59 +08:00
parent 893e33d920
commit 499e1d2d49
5 changed files with 22 additions and 7 deletions

View File

@ -558,6 +558,8 @@ UpViewRechargeType = {
LingMaiCoin = 1273,--灵脉币
yonghengzhiyao = 1287,
qianmianhuan = 1288,
HomeLand_ShiWu = 12061,--家园食物
HomeLand_BeiChenZhiJing = 12062,--家园北辰之晶
}
SHOP_PAGE = {

View File

@ -48,10 +48,12 @@ function this.GetServerData(msg,func)
LogGreen("Id:"..tostring(value.id).." startTime:"..tostring(TimeStampToDateStr4(value.productionStartTime)).." endTime:"..tostring(TimeStampToDateStr4(value.upLvEndTime)))
if value.id and value.id > 0 then
local data = HomeLandLevel[value.id]
this.BuildData[data.PoolID].level = data.level
this.BuildData[data.PoolID].startTime = value.productionStartTime
this.BuildData[data.PoolID].endTime = value.upLvEndTime
this.BuildData[data.PoolID].dataSingle = HomeLandLevel[value.id]
if data then
this.BuildData[data.PoolID].level = data.level
this.BuildData[data.PoolID].startTime = value.productionStartTime
this.BuildData[data.PoolID].endTime = value.upLvEndTime
this.BuildData[data.PoolID].dataSingle = HomeLandLevel[value.id]
end
end
end
end
@ -65,7 +67,7 @@ end
--获取服务器装备信息
function this.GetServerEquipData(msg,func)
this.levelProId = msg.equipRankUp
this.levelProId = msg.equipRankUp > 0 and msg.equipRankUp or 1
-- this.levelProId = msg.equipRankUp + 1
-- this.levelProId = 1
if msg.infos and #msg.infos > 0 then

View File

@ -263,11 +263,13 @@ end
function HomeLand:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.UI.OnUpdateData, self.OnShow,self)
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, self.OnShow,self)
Game.GlobalEvent:AddEvent(GameEvent.Privilege.OnPrivilegeZeroUpdate, self.OnShow,self)
end
function HomeLand:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnUpdateData, self.OnShow,self)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, self.OnShow,self)
Game.GlobalEvent:RemoveEvent(GameEvent.Privilege.OnPrivilegeZeroUpdate, self.OnShow,self)
end
--待功能扩展(试图打开某个状态)
@ -407,7 +409,7 @@ function HomeLand:SetBuildsState()
-- PlayUIAnim(curObj.upgradeImg)
else--如果没有就是可以点击升级
if data.dataSingle.Cost then
LogGreen("Name:"..tostring(data.dataSingle.Name).." cost:"..tostring(data.dataSingle.Cost[1][1]).."#"..data.dataSingle.Cost[1][2])
-- LogGreen("Name:"..tostring(data.dataSingle.Name).." cost:"..tostring(data.dataSingle.Cost[1][1]).."#"..data.dataSingle.Cost[1][2])
curObj.btnUpgrade:SetActive(true)
end
end
@ -445,6 +447,9 @@ function HomeLand:SetTime()
if curObj.leftTime < 0 then
NetManager.HomeInfoRequest(function ()
self:OnShow()
if UIManager.IsOpen(UIName.MsgPanel) then
UIManager.ClosePanel(UIName.MsgPanel)
end
PopupTipPanel.ShowTip(string.format("<color=#00FF00>%s</color>已升级至<color=#00FF00>%s</color>级",curObj.data.dataMain.Name,curObj.data.dataSingle.level))
end)
end

View File

@ -868,7 +868,9 @@ local jumpDic = {
UIManager.OpenPanel(UIName.ActivityMainPanel,36)
end,
[JumpType.HomeLand] = function(data,args)
UIManager.OpenPanel(UIName.HomeLandPanel)
HomeLandManager.GetData(function ()
UIManager.OpenPanel(UIName.HomeLandPanel)
end)
end,
}

View File

@ -66,6 +66,8 @@ local _ShowPlusType = {
UpViewRechargeType.LingMaiCoin,
UpViewRechargeType.yonghengzhiyao,
UpViewRechargeType.qianmianhuan,
UpViewRechargeType.HomeLand_ShiWu,
UpViewRechargeType.HomeLand_BeiChenZhiJing,
}
-- 判断是否显示加号
@ -412,6 +414,8 @@ function UpView:RechargeType(_type)
_type == UpViewRechargeType.LingMaiCoin or
_type == UpViewRechargeType.godEquipStone or
_type == UpViewRechargeType.yonghengzhiyao or
_type == UpViewRechargeType.HomeLand_ShiWu or
_type == UpViewRechargeType.HomeLand_BeiChenZhiJing or
_type == UpViewRechargeType.qianmianhuan then
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _type)
end