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