优化挂机时长特权显示,涉及表:PrivilegeTypeConfig

gaoxin 2020-09-24 19:16:38 +08:00
parent 02f50abafd
commit 293a4baaa5
4 changed files with 18 additions and 5 deletions

View File

@ -17638,8 +17638,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchoredPosition: {x: 85.4, y: 0}
m_SizeDelta: {x: 170.7, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2692009125031853627
CanvasRenderer:

View File

@ -1196,6 +1196,7 @@ PRIVILEGE_TYPE = {
GUILDTRANSCRIPT_BATTLENUM = 3011, -- 公会副本挑战次数
GUILDTRANSCRIPT_BUY_BATTLENUM = 3012, -- 公会副本挑战购买次数
FINDTREASURE_EXPERT = 34, -- 活动寻宝达人寻宝消耗降低%s
HANG_ON_TIME = 2002, -- 挂机时长特权
}

View File

@ -137,7 +137,7 @@ function this.GetTableStaticData()
--宝箱能出现的时间(60秒加一次收益)
this.adventureRefresh = GameSetting[1].AdventureRefresh
--宝箱不领取最多能增长奖励的时间(10个小时)
this.adventureOffline = GameSetting[1].AdventureOffline + PrivilegeManager.GetPrivilegeNumber(2002)
this.adventureOffline = GameSetting[1].AdventureOffline + PrivilegeManager.GetPrivilegeNumber(PRIVILEGE_TYPE.HANG_ON_TIME)
--this.adventureFastBattle = GameSetting[1].AdventureFastBattle
--冒险宝箱显示的三种状态(达到多少时间显示什么宝箱)
--每日奖励

View File

@ -16,6 +16,7 @@ local ReceiveTypeIconDef = {
"t_tequan_meirijiangli", --每日礼包
}
local orginLayer
local GameSetting = ConfigManager.GetConfig(ConfigName.GameSetting)
function VipPanelV2:InitComponent()
orginLayer = 0
@ -307,11 +308,22 @@ function VipPanelV2:SetVipPrivileges(curVipLevel)
item:SetActive(false)
-- local str = "<size=45><color=#7bb15bFF> </color></size>"
-- str = string.format("<size=45><color=#7bb15bFF>%s</color></size>", privilegeInfo.value)
local colorStr = "<color=#7AB159><size=35>%s</size></color>"
local formatStr
if privilegeInfo.IfFloat == 2 then --特权关卡挂机加成百分比
Util.GetGameObject(item, "title"):GetComponent("Text").text = string.format(privilegeInfo.content, "<color=#7AB159><size=35>"..(privilegeInfo.value*100-100).."%</size></color>")
formatStr = string.format(colorStr, (privilegeInfo.value*100-100).."%")
else
Util.GetGameObject(item, "title"):GetComponent("Text").text = string.format(privilegeInfo.content, "<color=#7AB159><size=35>" .. privilegeInfo.value .. "</size></color>")
formatStr = string.format(colorStr, privilegeInfo.value)
end
local title = Util.GetGameObject(item, "title"):GetComponent("Text")
--
if privilegeInfo.id == PRIVILEGE_TYPE.HANG_ON_TIME then
-- 挂机时长特权特殊显示处理
title.text = string.format(privilegeInfo.content, string.format(colorStr, privilegeInfo.value + GameSetting[1].AdventureOffline), formatStr)
else
title.text = string.format(privilegeInfo.content, formatStr)
end
PlayUIAnim(Util.GetGameObject(item, "content"))
coroutine.wait(0.03)
--加成为0就别丢人现眼了