Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev
commit
4d1496580a
|
@ -142,6 +142,7 @@ function LikeAbilityPanel:OnShow()
|
||||||
self.btnXiaoYaoLock.gameObject:SetActive(false)
|
self.btnXiaoYaoLock.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
self.btnXiaoYaoText.text=string.format("%d/%d",BagManager.GetItemCountById(UpViewRechargeType.YunYouVle),PrivilegeManager.GetPrivilegeNumber(39))
|
self.btnXiaoYaoText.text=string.format("%d/%d",BagManager.GetItemCountById(UpViewRechargeType.YunYouVle),PrivilegeManager.GetPrivilegeNumber(39))
|
||||||
|
CheckRedPointStatus(RedPointType.XiaoYaoYouRedPoint)
|
||||||
end
|
end
|
||||||
|
|
||||||
function LikeAbilityPanel:UpdateTopLayoutPanel()
|
function LikeAbilityPanel:UpdateTopLayoutPanel()
|
||||||
|
|
|
@ -75,6 +75,29 @@ function this:InitComponent()
|
||||||
self.RechargeScrollView.elastic = false
|
self.RechargeScrollView.elastic = false
|
||||||
end
|
end
|
||||||
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()
|
function this:BindEvent()
|
||||||
local localSelf = self
|
local localSelf = self
|
||||||
|
@ -84,25 +107,28 @@ function this:BindEvent()
|
||||||
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
|
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
|
||||||
local shopType = localSelf.ShopType
|
local shopType = localSelf.ShopType
|
||||||
local isAutoRecover = ShopManager.IsAutoRecoverCount(shopType)
|
local isAutoRecover = ShopManager.IsAutoRecoverCount(shopType)
|
||||||
if (isPopUp ~= currentTime) and not isAutoRecover then
|
if shopType == SHOP_TYPE.SOUL_PRINT_SHOP then
|
||||||
local shopInfo = ShopManager.GetShopInfoByType(shopType)
|
local itemlist = ShopManager.CheckShopItemList(self.ShopData.storeItem)
|
||||||
local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2]
|
local isShow = false
|
||||||
local refreshNum = PrivilegeManager.GetPrivilegeUsedTimes(shopInfo.RefreshPrivilege)
|
for k,v in pairs(itemlist) do
|
||||||
local costNum = CalculateCostCount(refreshNum, abcd)
|
local goods = ShopManager.GetShopItemGoodsInfo(v.id)
|
||||||
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
local con = ConfigManager.GetConfigData(ConfigName.ItemConfig,goods[1][1])
|
||||||
local costName = GetLanguageStrById(itemConfig[costId].Name)
|
if con.Quantity >= 6 then
|
||||||
local str = string.format(Language[12030], costNum, costName)
|
isShow = true
|
||||||
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)
|
|
||||||
end
|
end
|
||||||
ShopManager.RequestRefreshShop(shopType, false)
|
end
|
||||||
end, Language[10731], Language[10732],nil,true)
|
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
|
else
|
||||||
ShopManager.RequestRefreshShop(localSelf.ShopType, false)
|
RefreshShop(isPopUp,currentTime,isAutoRecover,shopType)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- 重置商店刷新按钮点击状态
|
-- 重置商店刷新按钮点击状态
|
||||||
ShopManager.SetShopRefreshBtnClickStatus(localSelf.ShopType, true)
|
ShopManager.SetShopRefreshBtnClickStatus(localSelf.ShopType, true)
|
||||||
|
|
Loading…
Reference in New Issue