战令购买提示
This commit is contained in:
parent
6e33313f69
commit
74c514f7fe
@ -98,6 +98,9 @@ local const = {
|
||||
["num_for_nothing"]="Vwg="
|
||||
}
|
||||
},
|
||||
["bounty_senior_rise"]={
|
||||
["value"]=10
|
||||
},
|
||||
["idle_maxtime"]={
|
||||
["value"]=57600
|
||||
},
|
||||
@ -166,6 +169,6 @@ local const = {
|
||||
}
|
||||
}
|
||||
local config = {
|
||||
data=const,count=34
|
||||
data=const,count=35
|
||||
}
|
||||
return config
|
||||
@ -76,15 +76,26 @@ function BountyBuyUI:initBtns()
|
||||
|
||||
local buyBtnAdvanced = self.uiMap["bounty_buy_ui.bg.buy_btn_advanced"]
|
||||
buyBtnAdvanced:addClickListener(function()
|
||||
self:closeUI()
|
||||
ModuleManager.BountyManager:buyBounty(true)
|
||||
local level = DataManager.BountyData:getLevel()
|
||||
local maxLevel = DataManager.BountyData:getMaxLevel()
|
||||
local buyProBountyAddLevels = DataManager.BountyData:getBuyProBountyAddLevelCount()
|
||||
if level > maxLevel - buyProBountyAddLevels then
|
||||
local params = {
|
||||
content = "购买此通行证会超过通行证等级上限,会造成损失,是否购买?",
|
||||
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL,
|
||||
okFunc = function()
|
||||
self:closeUI()
|
||||
ModuleManager.BountyManager:buyBounty(true)
|
||||
end
|
||||
}
|
||||
GFunc.showMessageBox(params)
|
||||
else
|
||||
self:closeUI()
|
||||
ModuleManager.BountyManager:buyBounty(true)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function BountyBuyUI:onRefresh()
|
||||
|
||||
end
|
||||
|
||||
function BountyBuyUI:updateTime()
|
||||
local remainTime = self.endTime - Time:getServerTime()
|
||||
if remainTime < 0 then
|
||||
|
||||
@ -53,14 +53,17 @@ function MessageBox:showMessageBox(params)
|
||||
if costId then
|
||||
local itemInfo = ConfigManager:getConfig("item")[costId]
|
||||
if itemInfo then
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.icon"]:setVisible(true)
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.icon"]:setSprite(GConst.ATLAS_PATH.ICON_ITEM, itemInfo.icon)
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.text"]:setText(tostring(costNum))
|
||||
GFunc.centerImgAndTx(uiMap["message_box.title_bg_img.btn.ok_btn.icon"], uiMap["message_box.title_bg_img.btn.ok_btn.text"])
|
||||
else
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.icon"]:setVisible(false)
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.text"]:setAnchoredPositionX(0)
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.text"]:setText(okText or I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK))
|
||||
end
|
||||
else
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.icon"]:setVisible(false)
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.text"]:setAnchoredPositionX(0)
|
||||
uiMap["message_box.title_bg_img.btn.ok_btn.text"]:setText(okText or I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK))
|
||||
end
|
||||
@ -113,7 +116,7 @@ function MessageBox:showMessageBox(params)
|
||||
end)
|
||||
|
||||
local textUI = uiMap["message_box.title_bg_img.today.text"]
|
||||
textUI:setText(I18N:getGlobalText(I18N.GlobalConst.CONFIRM_IGNORE))
|
||||
textUI:setText("临时文本:今日不再提示")
|
||||
|
||||
GFunc.centerImgAndTx(checkUI, textUI, 5)
|
||||
else
|
||||
|
||||
@ -134,7 +134,7 @@ function BountyData:addExp(num)
|
||||
end
|
||||
|
||||
function BountyData:getLvUpExp()
|
||||
local info = self:getSeasonInfoByLevel(self.level)
|
||||
local info = self:getSeasonInfoByLevel(self.level + 1)
|
||||
if info == nil then
|
||||
return self.repeatLevelInfo and self.repeatLevelInfo.exp or 1
|
||||
end
|
||||
@ -343,4 +343,11 @@ function BountyData:getRechargeId(advanced)
|
||||
return 0
|
||||
end
|
||||
|
||||
function BountyData:getBuyProBountyAddLevelCount()
|
||||
if self.buyProBountyAddLevelCount == nil then
|
||||
self.buyProBountyAddLevelCount = ConfigManager:getConfig("const")["bounty_senior_rise"].value
|
||||
end
|
||||
return self.buyProBountyAddLevelCount
|
||||
end
|
||||
|
||||
return BountyData
|
||||
Loading…
x
Reference in New Issue
Block a user