This commit is contained in:
puxuan 2025-10-15 20:03:34 +08:00
parent 2740e23e9b
commit 3692ef1e34
4 changed files with 12 additions and 8 deletions

View File

@ -253,6 +253,7 @@ GConst.ATLAS_PATH = {
UI_SUPPLY = "assets/arts/atlas/ui/supply.asset",
UI_DUNGEON = "assets/arts/atlas/ui/dungeon.asset",
UI_FIRST_CHARGE = "assets/arts/atlas/ui/act_firstcharge.asset",
UI_ACT_SEVENDAY = "assets/arts/atlas/ui/act_sevenday.asset",
}
GConst.TOUCH_EVENT = {

View File

@ -57,9 +57,9 @@ function GiftCell:refresh(info, period)
self.limitTx:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_ROUTINE_DESC_8) .. giftRemainNum .. "/" .. info.cfg.limit)
if info.cfg.recharge_id then
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_11")
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_SEVENDAY, "act_sevenday_bg_5")
else
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_10")
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_SEVENDAY, "act_sevenday_bg_4")
end
if info.cfg.recommend then
@ -78,7 +78,7 @@ function GiftCell:refresh(info, period)
GFunc.setAdsSprite(self.claimBtnAdImg)
local isClaimAll = giftRemainNum <= 0
if isClaimAll then
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_3")
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1")
self.claimBtn:setTouchEnable(false)
self.claimBtnTxGray:setVisible(true)
self.claimBtnTxGray:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_ROUTINE_DESC_10))
@ -92,7 +92,7 @@ function GiftCell:refresh(info, period)
else
self.claimBtn:setTouchEnable(true)
if info.cfg.parameter_pro and info.cfg.parameter_pro[1] == 1 then -- 免费
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_3")
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
self.claimBtnAdImg:setActive(false)
self.claimBtnIcon:setActive(false)
self.claimBtnNumTx:setActive(false)
@ -103,7 +103,7 @@ function GiftCell:refresh(info, period)
self.claimBtnTx:setVisible(false)
self.claimBtnTxGray:setVisible(false)
elseif info.cfg.item_cost then -- 道具购买
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_3")
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
self.claimBtnIcon:setSprite(GFunc.getIconRes(info.cfg.item_cost[1].id))
self.claimBtnAdImg:setActive(false)
self.claimBtnIcon:setActive(true)
@ -114,7 +114,7 @@ function GiftCell:refresh(info, period)
self.claimBtnNumTx:setText(info.cfg.item_cost[1].num)
GFunc.centerImgAndTx(self.claimBtnIcon, self.claimBtnNumTx, 0, nil, -6)
elseif info.cfg.recharge_id == nil then -- 广告
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_3")
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
self.claimBtnAdImg:setActive(true)
self.claimBtnIcon:setActive(false)
self.claimBtnNumTx:setActive(false)
@ -125,7 +125,7 @@ function GiftCell:refresh(info, period)
self.claimBtnTx:setVisible(false)
self.claimBtnTxGray:setVisible(false)
elseif info.cfg.recharge_id then -- 付费购买
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_3")
self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
self.claimBtnAdImg:setActive(false)
self.claimBtnIcon:setActive(false)
self.claimBtnNumTx:setActive(false)

View File

@ -232,6 +232,9 @@ end
-- 获取所在段位的积分 cur - min
function ArenaData:getGradingScore(score)
if score <= 0 then
return 0
end
return score - self:getGradingMinScore(score)
end

View File

@ -816,7 +816,7 @@ function BattleBaseData:initHeroData(formation)
---- 攻击力
for matchType, attrName in pairs(GConst.MATCH_ATTACK_NAME) do
unitData.attr[attrName] = heroEntity:getTotalAttrValue(attrName)
unitData.attr[attrName] = heroEntity:getTotalAttrValue(attrName) // DEFAULT_FACTOR
end
---- 暴击率