Files
ft/Client/Assets/Scripts/UI/Pinball/EventPinballInfoPopupPanel.cs
2026-06-29 21:18:33 +08:00

44 lines
1.4 KiB
C#

using asap.core;
using cfg;
using game;
using GameCore;
using System.Collections.Generic;
public class EventPinballInfoPopupPanel : EventInfoPopupPanelTitle
{
public List<RewardItemNew> rewardItems;
protected override void Start()
{
base.Start();
SetData();
}
void SetData()
{
var m_DataManager = GContext.container.Resolve<EventPinballDataManager>();
var tables = GContext.container.Resolve<Tables>();
List<EventPinballReward> 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<PlayerItemData>().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);
}
}
}
}
}