using asap.core; using cfg; using game; using GameCore; using System.Collections.Generic; public class EventPinballInfoPopupPanel : EventInfoPopupPanelTitle { public List rewardItems; protected override void Start() { base.Start(); SetData(); } void SetData() { var m_DataManager = GContext.container.Resolve(); var tables = GContext.container.Resolve(); List pinballRewards = tables.TbEventPinballReward.DataList; int grandPrizeDropID = pinballRewards[pinballRewards.Count - 1].DropID; DropPackageList dropPackageList = tables.TbDrop[grandPrizeDropID].DropList; Item itemcfg = tables.TbItem[dropPackageList.DropIDList[0]]; var grandPrizeItemData = GContext.container.Resolve().GetItemDataByDropIdLureInflation(m_DataManager.PinballData.InflationRate, itemcfg.RedirectID); if (grandPrizeItemData != null) { int dataCount = grandPrizeItemData.Count; int rewardCount = rewardItems.Count; for (int j = 0; j < rewardCount; j++) { if (j < dataCount) { rewardItems[j].SetData(grandPrizeItemData[j]); } else { rewardItems[j].gameObject.SetActive(false); } } } } }