Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
ZhangBiao 2021-10-28 17:30:56 +08:00
commit 4d1496580a
2 changed files with 43 additions and 16 deletions

View File

@ -142,6 +142,7 @@ function LikeAbilityPanel:OnShow()
self.btnXiaoYaoLock.gameObject:SetActive(false)
end
self.btnXiaoYaoText.text=string.format("%d/%d",BagManager.GetItemCountById(UpViewRechargeType.YunYouVle),PrivilegeManager.GetPrivilegeNumber(39))
CheckRedPointStatus(RedPointType.XiaoYaoYouRedPoint)
end
function LikeAbilityPanel:UpdateTopLayoutPanel()

View File

@ -75,6 +75,29 @@ function this:InitComponent()
self.RechargeScrollView.elastic = false
end
end
local RefreshShop = function(isPopUp,currentTime,isAutoRecover,shopType)
if (isPopUp ~= currentTime) and not isAutoRecover then
local shopInfo = ShopManager.GetShopInfoByType(shopType)
local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2]
local refreshNum = PrivilegeManager.GetPrivilegeUsedTimes(shopInfo.RefreshPrivilege)
local costNum = CalculateCostCount(refreshNum, abcd)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local costName = GetLanguageStrById(itemConfig[costId].Name)
local str = string.format(Language[12030], costNum, costName)
MsgPanel.ShowTwo(str, function()
end, function(isShow)
if (isShow) then
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. shopType, currentTime)
end
ShopManager.RequestRefreshShop(shopType, false)
end, Language[10731], Language[10732],nil,true)
else
ShopManager.RequestRefreshShop(shopType, false)
end
end
--绑定事件(用于子类重写)
function this:BindEvent()
local localSelf = self
@ -84,25 +107,28 @@ function this:BindEvent()
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
local shopType = localSelf.ShopType
local isAutoRecover = ShopManager.IsAutoRecoverCount(shopType)
if (isPopUp ~= currentTime) and not isAutoRecover then
local shopInfo = ShopManager.GetShopInfoByType(shopType)
local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2]
local refreshNum = PrivilegeManager.GetPrivilegeUsedTimes(shopInfo.RefreshPrivilege)
local costNum = CalculateCostCount(refreshNum, abcd)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local costName = GetLanguageStrById(itemConfig[costId].Name)
local str = string.format(Language[12030], costNum, costName)
MsgPanel.ShowTwo(str, function()
end, function(isShow)
if (isShow) then
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. localSelf.ShopType, currentTime)
if shopType == SHOP_TYPE.SOUL_PRINT_SHOP then
local itemlist = ShopManager.CheckShopItemList(self.ShopData.storeItem)
local isShow = false
for k,v in pairs(itemlist) do
local goods = ShopManager.GetShopItemGoodsInfo(v.id)
local con = ConfigManager.GetConfigData(ConfigName.ItemConfig,goods[1][1])
if con.Quantity >= 6 then
isShow = true
end
ShopManager.RequestRefreshShop(shopType, false)
end, Language[10731], Language[10732],nil,true)
end
if isShow then
MsgPanel.ShowTwo("当前商店存在红色魂印,刷新后将会消失,是否确认刷新?", function()
end, function()
RefreshShop(isPopUp,currentTime,isAutoRecover,shopType)
end, Language[10731], Language[10732],nil,false)
else
RefreshShop(isPopUp,currentTime,isAutoRecover,shopType)
end
else
ShopManager.RequestRefreshShop(localSelf.ShopType, false)
RefreshShop(isPopUp,currentTime,isAutoRecover,shopType)
end
-- 重置商店刷新按钮点击状态
ShopManager.SetShopRefreshBtnClickStatus(localSelf.ShopType, true)