diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 9efc6b59b1..0d4f833c9e 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -1047,6 +1047,7 @@ JumpType = { firstRecharge = 30001, ZhiZunJiangShi = 30002, + SurpriseBox = 40001,--惊喜礼盒 } NPCPosType={ diff --git a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua index 36bd6ee21f..75095af1e5 100644 --- a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua @@ -1225,37 +1225,4 @@ function this.CheckRedPointChaofanRuSheng() return false end ---右侧伸缩条大小检测 -function this.CheckRightUpArenaSize() - local num = 0 - --首充检测 - local act1 = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FirstRecharge) - if act1 then - num = num + 1 - end - --每日豪礼检测 - local act2 = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DailyRecharge) - if act2 then - num = num + 1 - end - --限时折扣检测 - local actGroup = ConfigManager.GetConfig(ConfigName.ActivityGroups) - local shopData = actGroup[13].ShopData - local giftList = OperatingManager.GetInfoList(shopData) - if #giftList > 0 then - local time = giftList[1].endTime - GetTimeStamp() - if time > 1 then - num = num + 1 - end - end - local y = 0 - if num == 1 then - y = 512 - elseif num == 2 then - y = 663 - elseif num == 3 then - y = 814 - end - return y -end return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index e5e7a19de0..115a0a24c1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -800,6 +800,7 @@ function this.CreatActivity() Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.RefreshRightUp) end +local ySet = {[1] = 361 ,[2] = 512,[3] = 663,[4] = 814,[5] = 965 } --设置右侧条 function this.SetRightBarSize() this.RightUp2:SetActive(PlayerManager.level >= 5) @@ -809,7 +810,13 @@ function this.SetRightBarSize() this.RightUp2rectSize.sizeDelta = Vector3.New(180,220,0) this.RightUp2btnImg.rotation = Quaternion.Euler(Vector3.New(0,0,-90)) else - local y = ActivityGiftManager.CheckRightUpArenaSize() + local num = 0 + for i = 1, this.RightUp2Grid.transform.childCount do + if this.RightUp2Grid.transform:GetChild(i - 1).gameObject.activeInHierarchy then + num = num + 1 + end + end + local y = ySet[num] this.RightUp2bgSize.sizeDelta =Vector3.New(180,y,0) this.RightUp2rectSize.sizeDelta = Vector3.New(180,y,0) this.RightUp2btnImg.rotation = Quaternion.Euler(Vector3.New(0,0,90)) diff --git a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua index 1e6f577e23..86bfabf736 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua @@ -676,6 +676,14 @@ local jumpDic = { [JumpType.ZhiZunJiangShi] = function(data) UIManager.OpenPanel(UIName.SupremeHeroPopup) end, + [JumpType.SurpriseBox] = function(data) + local activityId = ActivityGiftManager.IsActivityTypeOpen(data[1]) + if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(data[1]) then + UIManager.OpenPanel(UIName.SurpriseBoxPanel) + else + PopupTipPanel.ShowTip("活动尚未开启") + end + end, } function this.JumpActivity(data,skipfactor)