Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryMissionTreasureBox.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

56 lines
1.5 KiB
C#

using System;
using UnityEngine;
namespace Wizard.Lottery;
public class LotteryMissionTreasureBox : LotteryTreasureBox
{
[SerializeField]
private UILabel _categoryLabel;
[SerializeField]
protected UISprite _categoryLabelLine;
public void Initialize(LotteryRewardData data, string categoryText, Action onClickEvent)
{
_categoryLabel.text = categoryText;
SetData(data, string.Empty, onClickEvent);
switch (data.state)
{
case LotteryRewardData.eLotteryRewardState.Applied:
case LotteryRewardData.eLotteryRewardState.Received:
case LotteryRewardData.eLotteryRewardState.NotAchieved:
UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: true);
break;
default:
UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: false);
break;
case LotteryRewardData.eLotteryRewardState.NotReceived:
break;
}
if (data.MissionData.IsTimeOver)
{
UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: true);
}
}
protected override void UpdateStatusText()
{
LotteryRewardData.eLotteryRewardState state = _lotteryRewardData.state;
base.UpdateStatusText();
if (state == LotteryRewardData.eLotteryRewardState.NotAchieved)
{
_labelStatus.text = Data.SystemText.Get("Mission_0059");
}
if (_lotteryRewardData.MissionData != null && _lotteryRewardData.MissionData.IsTimeOver)
{
_labelStatus.text = Data.SystemText.Get("Mission_0078");
}
}
public virtual void SetCategoryLabelLineWitdh(int width)
{
_categoryLabelLine.width = width;
}
}