Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionDialog.cs
gamer147 0455ff649e feat(battle-engine): EffectType full enum + collection/card/vfx extension copies
Replaces partial EffectMgr.EffectType with all 226 decomp values; copies the
IsNotNullOrEmpty/EquelsID/FindFromCardId/GetAllFuncVfxResults extension files +
UI extensions; adds Renderer/MeshFilter shared-material/mesh/sortingOrder. Compile
loop then closed the revealed deps (3242 files). 9.1k -> 18 errors.
2026-06-05 20:38:56 -04:00

43 lines
1.4 KiB
C#

using System.Collections.Generic;
using UnityEngine;
namespace Wizard.Lottery;
public class LotteryMissionDialog : MonoBehaviour
{
[SerializeField]
private GameObject _lotteryMissionItemPrefab;
[SerializeField]
private UIGrid _grid;
public static void Create(GameObject prefab, LotteryInfoTask.LotteryInfoData lotteryData)
{
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
LotteryMissionDialog component = Object.Instantiate(prefab).GetComponent<LotteryMissionDialog>();
dialogBase.SetObj(component.gameObject);
dialogBase.SetSize(DialogBase.Size.M);
dialogBase.SetTitleLabel(Data.SystemText.Get("Mission_0075"));
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn);
component.Initialize(lotteryData);
}
private void Initialize(LotteryInfoTask.LotteryInfoData lotteryData)
{
List<LotteryMissionData> list = new List<LotteryMissionData>(lotteryData.LotteryMissionList);
if (lotteryData.BigChanceMission != null)
{
list.Add(lotteryData.BigChanceMission);
}
for (int i = 0; i < list.Count; i++)
{
LotteryMissionData lotteryData2 = list[i];
bool flag = i + 1 == list.Count;
AchievementWindowBase component = NGUITools.AddChild(_grid.gameObject, _lotteryMissionItemPrefab).GetComponent<AchievementWindowBase>();
component.gameObject.SetActive(value: true);
component.SetLottery(lotteryData2, !flag);
}
_grid.Reposition();
}
}