七日签到
This commit is contained in:
parent
d87d9068ab
commit
f3a21862c2
@ -927,6 +927,7 @@ local LocalizationGlobalConst =
|
||||
IDLE_DESC_8 = "IDLE_DESC_8",
|
||||
IDLE_DESC_9 = "IDLE_DESC_9",
|
||||
CARD_MONTHLY_DESC_33 = "CARD_MONTHLY_DESC_33",
|
||||
NEXT_REFRESH_DESC = "NEXT_REFRESH_DESC",
|
||||
}
|
||||
|
||||
return LocalizationGlobalConst
|
||||
@ -927,6 +927,7 @@ local localization_global =
|
||||
["IDLE_DESC_8"] = "月卡特权",
|
||||
["IDLE_DESC_9"] = "激活月卡后每日快速挂机次数无上限",
|
||||
["CARD_MONTHLY_DESC_33"] = "购买<color=#E67C00>特权月卡</color>可使用<color=#fa5a4c>2倍速战斗</color>功能。",
|
||||
["NEXT_REFRESH_DESC"] = "倒计时:{0}",
|
||||
}
|
||||
|
||||
return localization_global
|
||||
@ -1,8 +1,8 @@
|
||||
local ShopConst = {}
|
||||
|
||||
ShopConst.PRIVILEGE_CARD_ID = {
|
||||
AD_CARD = 1053000001,
|
||||
MONTHLY_CARD = 1053000101,
|
||||
AD_CARD = 1053000101,
|
||||
MONTHLY_CARD = 1053000001,
|
||||
-- LIFETIME_CARD = 20302,
|
||||
-- CHALLEGE_CARD = 20402,
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ function SignWeekCell:refresh(day)
|
||||
self.signFlag:setVisible(true)
|
||||
elseif freeCanGet then -- 可领取
|
||||
self.funcBtn:setActive(true)
|
||||
self.funcBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_5")
|
||||
self.funcBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
||||
self.funcBtnCostIcon:setVisible(false)
|
||||
self.funcBtnCostTx:setVisible(false)
|
||||
self.funcBtnCenterTx:setVisible(true)
|
||||
@ -67,7 +67,7 @@ function SignWeekCell:refresh(day)
|
||||
end
|
||||
else -- 还未到达可领取天数
|
||||
self.funcBtn:setActive(true)
|
||||
self.funcBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_5")
|
||||
self.funcBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1")
|
||||
self.funcBtnCostIcon:setVisible(false)
|
||||
self.funcBtnCostTx:setVisible(false)
|
||||
self.funcBtnCenterTx:setVisible(true)
|
||||
@ -78,8 +78,8 @@ function SignWeekCell:refresh(day)
|
||||
end
|
||||
|
||||
-- 刷新slider部分
|
||||
self.upSlider:setVisible(day ~= 1)
|
||||
self.downSlider:setVisible(day ~= 7)
|
||||
-- self.upSlider:setVisible(day ~= 1)
|
||||
-- self.downSlider:setVisible(day ~= 7)
|
||||
self.upIcon:setVisible(day <= curDay)
|
||||
self.downIcon:setVisible(day < curDay)
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ function SignWeekComp:refreshTop()
|
||||
self.signTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_4, DataManager.SignWeekData:getSignDay()))
|
||||
self.lockFlag:setActive(not DataManager.SignWeekData:isUnlockPro())
|
||||
self.buyBtn:setActive(not DataManager.SignWeekData:isUnlockPro())
|
||||
self.gotFlag:setActive(DataManager.SignWeekData:isUnlockPro())
|
||||
-- self.gotFlag:setActive(DataManager.SignWeekData:isUnlockPro())
|
||||
self.cardDescTx:setText(DataManager.SignWeekData:isUnlockPro() and I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_6) or I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_5))
|
||||
end
|
||||
|
||||
|
||||
@ -156,17 +156,17 @@ end
|
||||
function SignMainUI:onRefresh()
|
||||
local openCount = 0
|
||||
for i, btn in ipairs(self.btns) do
|
||||
if self:isOpen(i) then
|
||||
btn:setActive(true)
|
||||
openCount = openCount + 1
|
||||
if self.curPage == i then
|
||||
btn:setSprite(GConst.SignConst.SIGN_PAGE_BTN_ICON_ATLAS[i], GConst.SignConst.SIGN_PAGE_BTN_ICON_1[i])
|
||||
else
|
||||
btn:setSprite(GConst.SignConst.SIGN_PAGE_BTN_ICON_ATLAS[i], GConst.SignConst.SIGN_PAGE_BTN_ICON_2[i])
|
||||
end
|
||||
else
|
||||
-- if self:isOpen(i) then
|
||||
-- btn:setActive(true)
|
||||
-- openCount = openCount + 1
|
||||
-- if self.curPage == i then
|
||||
-- btn:setSprite(GConst.SignConst.SIGN_PAGE_BTN_ICON_ATLAS[i], GConst.SignConst.SIGN_PAGE_BTN_ICON_1[i])
|
||||
-- else
|
||||
-- btn:setSprite(GConst.SignConst.SIGN_PAGE_BTN_ICON_ATLAS[i], GConst.SignConst.SIGN_PAGE_BTN_ICON_2[i])
|
||||
-- end
|
||||
-- else
|
||||
btn:setActive(false)
|
||||
end
|
||||
-- end
|
||||
end
|
||||
local width = BTN_RIGHT + BTN_WIDTH * openCount + BTN_SPACING * (openCount - 1)
|
||||
self.btnContent:setSizeDeltaX(width)
|
||||
|
||||
@ -45,6 +45,12 @@ function TalentInfoUI:onLoadRootComplete()
|
||||
end
|
||||
end
|
||||
|
||||
-- TalentData.SKILL_REFESH_ID = 9
|
||||
-- TalentData.HP_RESTORE_ID = 10
|
||||
-- TalentData.SELECT_SKILL_ID = 11
|
||||
-- TalentData.ICON_ADD_ID = 12
|
||||
-- TalentData.EXP_ADD_ID = 16
|
||||
|
||||
function TalentInfoUI:onRefresh()
|
||||
self.id = self.list[self.idx].id
|
||||
self.talentCell:refresh(self.id, self.list[self.idx])
|
||||
@ -54,8 +60,12 @@ function TalentInfoUI:onRefresh()
|
||||
local str = I18N:getText("talent", self.id, "desc")
|
||||
if attr and #attr > 0 then
|
||||
str = str .. GFunc.getFinalAttrValue(attr[1].type, attr[1].num)
|
||||
-- else
|
||||
-- str = str .. (num or 0)
|
||||
elseif self.id == DataManager.TalentData.SKILL_REFESH_ID or self.id == DataManager.TalentData.SELECT_SKILL_ID then
|
||||
str = str .. (num or 0)
|
||||
elseif self.id == DataManager.TalentData.HP_RESTORE_ID then
|
||||
str = str .. (num or 0) // GConst.DEFAULT_FACTOR
|
||||
else
|
||||
str = str .. (num or 0) / GConst.DEFAULT_FACTOR .. "%"
|
||||
end
|
||||
self.descTx:setText(str)
|
||||
end
|
||||
|
||||
@ -171,11 +171,10 @@ function PrivilegeCardData:getIsLifetimeCardActive()
|
||||
end
|
||||
|
||||
function PrivilegeCardData:getIsSkipAd()
|
||||
if self:getIsCardActive(GConst.ShopConst.PRIVILEGE_CARD_ID.AD_CARD) then
|
||||
return true
|
||||
-- if self:getIsCardActive(GConst.ShopConst.PRIVILEGE_CARD_ID.AD_CARD) then
|
||||
-- return true
|
||||
-- end
|
||||
-- return false
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function PrivilegeCardData:getIsChallegeCardActive()
|
||||
|
||||
@ -3,11 +3,11 @@ local TalentData = class("TalentData", BaseData)
|
||||
local TalentCfg = ConfigManager:getConfig("talent")
|
||||
local PlayerExpCfg = ConfigManager:getConfig("player_exp")
|
||||
|
||||
local SKILL_REFESH_ID = 9
|
||||
local HP_RESTORE_ID = 10
|
||||
local SELECT_SKILL_ID = 11
|
||||
local ICON_ADD_ID = 12
|
||||
local EXP_ADD_ID = 16
|
||||
TalentData.SKILL_REFESH_ID = 9
|
||||
TalentData.HP_RESTORE_ID = 10
|
||||
TalentData.SELECT_SKILL_ID = 11
|
||||
TalentData.ICON_ADD_ID = 12
|
||||
TalentData.EXP_ADD_ID = 16
|
||||
|
||||
function TalentData:setDirty()
|
||||
self.data.isDirty = not self.data.isDirty
|
||||
@ -157,33 +157,33 @@ end
|
||||
|
||||
--@region 获取特殊天赋属性
|
||||
function TalentData:getSkillRefreshCount()
|
||||
local lv = self:getLevels(SKILL_REFESH_ID)
|
||||
local cfg = TalentCfg[SKILL_REFESH_ID]
|
||||
local lv = self:getLevels(self.SKILL_REFESH_ID)
|
||||
local cfg = TalentCfg[self.SKILL_REFESH_ID]
|
||||
return lv * (cfg.value or 0)
|
||||
end
|
||||
|
||||
function TalentData:getHpRestore()
|
||||
local lv = self:getLevels(HP_RESTORE_ID)
|
||||
local cfg = TalentCfg[HP_RESTORE_ID]
|
||||
local lv = self:getLevels(self.HP_RESTORE_ID)
|
||||
local cfg = TalentCfg[self.HP_RESTORE_ID]
|
||||
return lv * (cfg.value or 0)
|
||||
end
|
||||
|
||||
function TalentData:getSelectSkillBegin()
|
||||
local lv = self:getLevels(SELECT_SKILL_ID)
|
||||
local cfg = TalentCfg[SELECT_SKILL_ID]
|
||||
local lv = self:getLevels(self.SELECT_SKILL_ID)
|
||||
local cfg = TalentCfg[self.SELECT_SKILL_ID]
|
||||
return lv * (cfg.value or 0)
|
||||
end
|
||||
|
||||
function TalentData:getIconAdd()
|
||||
local lv = self:getLevels(ICON_ADD_ID)
|
||||
local cfg = TalentCfg[ICON_ADD_ID]
|
||||
local lv = self:getLevels(self.ICON_ADD_ID)
|
||||
local cfg = TalentCfg[self.ICON_ADD_ID]
|
||||
return lv * (cfg.value or 0)
|
||||
end
|
||||
|
||||
function TalentData:getExpAdd()
|
||||
local lv = self:getLevels(EXP_ADD_ID)
|
||||
local lv = self:getLevels(self.EXP_ADD_ID)
|
||||
lv = 1
|
||||
local cfg = TalentCfg[EXP_ADD_ID]
|
||||
local cfg = TalentCfg[self.EXP_ADD_ID]
|
||||
return lv * (cfg.value or 0)
|
||||
end
|
||||
--@endregion
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user