50 lines
1.3 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|