玲珑宝镜红点提交

wangzhenxing 2022-12-27 15:44:08 +08:00
parent c1e82cdeac
commit 5a9de1f434
3 changed files with 16 additions and 1 deletions

View File

@ -110,6 +110,7 @@ function this.ResetLocalData(var)--初始化所有本地的每日一刷--1是五
PlayerPrefs.SetInt(PlayerManager.uid.."piaomiaozhilv", 0)
PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen,0)
PlayerPrefs.SetInt(PlayerManager.uid.."kaifuchongbang",0)
PlayerPrefs.SetInt(PlayerManager.uid.."lingShouBaoGe",0)
end
if var == 1 then

View File

@ -106,12 +106,21 @@ function this.CheckRedPointLingLong()
if not id or id < 1 then
return false
end
local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig,117)
local strs = string.split(config.Value,"|")
local costId = tonumber(strs[1])
if BagManager.GetItemCountById(costId) > 0 then
return true
end
local state=PlayerPrefs.GetInt(PlayerManager.uid.."lingShouBaoGe")
if state==0 then
return true
end
local isBuy=OperatingManager.IsBuyGift(20017)
if not isBuy then
return true
end
local actconfigs = ActivityGiftManager.GetActivityInfoByType(id)
for i = 1,#actconfigs.mission do
local config = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,actconfigs.mission[i].missionId)

View File

@ -93,6 +93,7 @@ function LingLongBaoJingPanel:InitComponent(gameObject)
-- 奖励预览
self.btnPreview = Util.GetGameObject(self.gameObject, "button/previewBtn")
self.shopBtn = Util.GetGameObject(self.gameObject, "button/shopBtn")
self.shopRed = Util.GetGameObject(self.gameObject, "button/shopBtn/red")
self.helpBtn = Util.GetGameObject(self.luckyTurnPanel,"button/helpBtn")
self.helpPosition = Util.GetGameObject(self.luckyTurnPanel,"BG/helpPos"):GetComponent("RectTransform").localPosition
@ -154,6 +155,7 @@ function LingLongBaoJingPanel:BindEvent()
Util.AddClick(self.shopBtn, function()
JumpManager.GoJump(40036)
PlayerPrefs.SetInt(PlayerManager.uid.."lingShouBaoGe",1)
end)
Util.AddClick(self.skip, function()
@ -285,6 +287,8 @@ function LingLongBaoJingPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Activity.OnActivityProgressStateChange,self.RefreshProgress1,self)
end
--界面打开时调用(用于子类重写)
function LingLongBaoJingPanel:OnOpen(_activityConfig,_index,parent)
self.actConfig = _activityConfig
@ -318,7 +322,7 @@ function LingLongBaoJingPanel:OnShow(_sortingOrder)
end
end
self.turnEffect = Timer.New()
self.shopRed:SetActive(PlayerPrefs.GetInt(PlayerManager.uid.."lingShouBaoGe")==0 or not OperatingManager.IsBuyGift(20017))
self:RefreshTreasureType()
self:DelayMaskWithTime(0.5)
self:SetPropShow()
@ -336,6 +340,7 @@ function LingLongBaoJingPanel:OnShow(_sortingOrder)
self.shopBtn:SetActive(not not act)
end
function LingLongBaoJingPanel:SetLayer()
self.firstLayer.overrideSorting = true
self.firstLayer.sortingOrder = self.sortingOrder