Files
back_cantanBuilding/Assets/Scripts/UI/Shop/GiftPopupPanel_6.cs
2026-05-26 16:15:54 +08:00

50 lines
1.3 KiB
C#

using asap.core;
using GameCore;
using System.Collections.Generic;
using UnityEngine;
public class GiftPopupPanelEnergyEvent
{
public bool isClose;
}
public class GiftPopupPanel_6 : GiftPopupPanel_Energy
{
protected override int Type => 1;
protected override void OnClickClose()
{
base.OnClickClose();
UIManager.Instance.DestroyUI(UITypes.GiftPopupPanel_6);
}
protected override void SetPack()
{
int vipLevel = curTriggerPackState.vipLevel;
int buyCount = GContext.container.Resolve<PlayerShopData>().GetShopPackBuyCount(curTriggerPackState.lastID);
List<int> VIPPackList = packManager.VIPPackList[vipLevel];
if (buyCount > VIPPackList.Count)
{
buyCount = VIPPackList.Count;
}
else if (buyCount <= 0)
{
buyCount = 1;
}
int id = VIPPackList[buyCount - 1];
MMTService mMTService = GContext.container.Resolve<MMTService>();
if (mMTService.mmt && id == 4000002)
{
id = 4000003;
}
Debug.Log($"[MMBeginnerPack] packID == {id}");
pack = _tables.TbPack.GetOrDefault(id);
if (pack == null)
{
Debug.LogError($"[MMBeginnerPack] pack is null, id == {id}");
pack = _tables.TbPack.GetOrDefault(4000002);
}
}
}