备份CatanBuilding瘦身独立工程
This commit is contained in:
49
Assets/Scripts/UI/Shop/GiftPopupPanel_6.cs
Normal file
49
Assets/Scripts/UI/Shop/GiftPopupPanel_6.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user