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.
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard.Lottery;
|
||||
|
||||
public class LotteryBigChanceTreasureBox : LotteryTreasureBox
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _parentTreasureObj;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _centerLine;
|
||||
|
||||
[SerializeField]
|
||||
private UISprite _backGround;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _labelOverTrasureBox;
|
||||
|
||||
[SerializeField]
|
||||
private UISprite _touchBg;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _labelCenter;
|
||||
|
||||
protected override void UpdateInfoLabel()
|
||||
{
|
||||
switch (_lotteryRewardData.state)
|
||||
{
|
||||
case LotteryRewardData.eLotteryRewardState.Unapplied:
|
||||
_labelInfoText.gameObject.SetActive(value: true);
|
||||
break;
|
||||
case LotteryRewardData.eLotteryRewardState.Applied:
|
||||
case LotteryRewardData.eLotteryRewardState.WaitResult:
|
||||
_labelInfoText.fontSize = 13;
|
||||
_labelInfoText.gameObject.SetActive(value: true);
|
||||
break;
|
||||
default:
|
||||
_labelInfoText.gameObject.SetActive(value: false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateStatusText()
|
||||
{
|
||||
switch (_lotteryRewardData.state)
|
||||
{
|
||||
case LotteryRewardData.eLotteryRewardState.Unapplied:
|
||||
_labelStatus.text = Data.SystemText.Get("Mission_0087");
|
||||
_labelInfoText.color = LabelDefine.TEXT_COLOR_ORANGE;
|
||||
_labelOverTrasureBox.text = Data.SystemText.Get("Mission_0010");
|
||||
break;
|
||||
case LotteryRewardData.eLotteryRewardState.Applied:
|
||||
case LotteryRewardData.eLotteryRewardState.WaitResult:
|
||||
_labelStatus.text = Data.SystemText.Get("Mission_0089");
|
||||
_labelStatus.color = LabelDefine.TEXT_COLOR_ORANGE;
|
||||
break;
|
||||
case LotteryRewardData.eLotteryRewardState.NotReceived:
|
||||
_labelCenter.text = Data.SystemText.Get("Mission_0091");
|
||||
_labelCenter.color = LabelDefine.TEXT_COLOR_ORANGE;
|
||||
break;
|
||||
case LotteryRewardData.eLotteryRewardState.Received:
|
||||
_labelCenter.text = Data.SystemText.Get("Mission_0092");
|
||||
break;
|
||||
case LotteryRewardData.eLotteryRewardState.NotAchieved:
|
||||
_labelCenter.text = Data.SystemText.Get("Mission_0059");
|
||||
break;
|
||||
default:
|
||||
_labelStatus.text = string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateRewardImage()
|
||||
{
|
||||
if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.Received)
|
||||
{
|
||||
string textureRewardImage = string.Empty;
|
||||
if (_lotteryRewardData.IsSpecial)
|
||||
{
|
||||
string path = "thumbnail_lottery";
|
||||
textureRewardImage = Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.Lottery, isfetch: true);
|
||||
_labelRewardNum.gameObject.SetActive(value: false);
|
||||
}
|
||||
else if (_lotteryRewardData.NormalGotRewardList.Count > 0)
|
||||
{
|
||||
string textureName = _lotteryRewardData.NormalGotRewardList[0].TextureName;
|
||||
textureRewardImage = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item, isfetch: true);
|
||||
_labelRewardNum.gameObject.SetActive(value: true);
|
||||
_labelRewardNum.text = _lotteryRewardData.NormalGotRewardList[0].RewardGotNum.ToString();
|
||||
}
|
||||
SetTextureRewardImage(textureRewardImage);
|
||||
_labelCenter.gameObject.SetActive(value: true);
|
||||
_backGround.gameObject.SetActive(value: false);
|
||||
_labelTreasureTouch.gameObject.SetActive(value: false);
|
||||
_touchBg.gameObject.SetActive(value: false);
|
||||
return;
|
||||
}
|
||||
if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.Unapplied)
|
||||
{
|
||||
_centerLine.SetActive(value: true);
|
||||
UIManager.SetObjectToGrey(_spriteTreasureImage.gameObject, b: true);
|
||||
_textureRewardImage.gameObject.SetActive(value: false);
|
||||
_labelRewardNum.gameObject.SetActive(value: false);
|
||||
_backGround.gameObject.SetActive(value: false);
|
||||
_labelOverTrasureBox.gameObject.SetActive(value: true);
|
||||
return;
|
||||
}
|
||||
_textureRewardImage.gameObject.SetActive(value: false);
|
||||
_labelRewardNum.gameObject.SetActive(value: false);
|
||||
_spriteTreasureImage.gameObject.SetActive(value: true);
|
||||
if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.NotReceived)
|
||||
{
|
||||
_labelTreasureTouch.gameObject.SetActive(value: true);
|
||||
_labelTreasureTouch.text = GetTouchText();
|
||||
_backGround.gameObject.SetActive(value: false);
|
||||
_touchBg.gameObject.SetActive(value: true);
|
||||
_labelCenter.gameObject.SetActive(value: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_labelTreasureTouch.gameObject.SetActive(value: false);
|
||||
if (_lotteryRewardData.state == LotteryRewardData.eLotteryRewardState.NotAchieved)
|
||||
{
|
||||
_labelCenter.gameObject.SetActive(value: true);
|
||||
_backGround.gameObject.SetActive(value: false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateNonActiveColor()
|
||||
{
|
||||
switch (_lotteryRewardData.state)
|
||||
{
|
||||
case LotteryRewardData.eLotteryRewardState.Received:
|
||||
if (_lotteryRewardData.IsSpecial)
|
||||
{
|
||||
SetNonActiveColor(isNonActive: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNonActiveColor(isNonActive: true);
|
||||
}
|
||||
break;
|
||||
case LotteryRewardData.eLotteryRewardState.Unapplied:
|
||||
case LotteryRewardData.eLotteryRewardState.NotAchieved:
|
||||
SetNonActiveColor(isNonActive: true);
|
||||
break;
|
||||
case LotteryRewardData.eLotteryRewardState.Applied:
|
||||
case LotteryRewardData.eLotteryRewardState.WaitResult:
|
||||
case LotteryRewardData.eLotteryRewardState.NotReceived:
|
||||
SetNonActiveColor(isNonActive: false);
|
||||
break;
|
||||
default:
|
||||
_labelStatus.text = string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetNonActiveColor(bool isNonActive)
|
||||
{
|
||||
UIManager.SetObjectToGrey(_parentTreasureObj, isNonActive);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace Wizard.Lottery;
|
||||
|
||||
public class LotteryReceiveBigChanceTask : BaseTask
|
||||
{
|
||||
public class LotteryReceiveBigChanceTaskParam : BaseParam
|
||||
{
|
||||
public int campaign_id;
|
||||
|
||||
public int mission_id;
|
||||
}
|
||||
|
||||
public LotteryRewardData Result { get; private set; }
|
||||
|
||||
public LotteryReceiveBigChanceTask()
|
||||
{
|
||||
base.type = ApiType.Type.LotteryReceiveBigChance;
|
||||
}
|
||||
|
||||
public void SetParameter(int campaignId, int missionId)
|
||||
{
|
||||
LotteryReceiveBigChanceTaskParam lotteryReceiveBigChanceTaskParam = new LotteryReceiveBigChanceTaskParam();
|
||||
lotteryReceiveBigChanceTaskParam.campaign_id = campaignId;
|
||||
lotteryReceiveBigChanceTaskParam.mission_id = missionId;
|
||||
base.Params = lotteryReceiveBigChanceTaskParam;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
Result = new LotteryRewardData(base.ResponseData["data"]["lottery_reward"]);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace Wizard.Lottery;
|
||||
|
||||
public class LotteryReceiveDoubleChanceTask : BaseTask
|
||||
{
|
||||
public class LotteryReceiveDoubleChanceTaskParam : BaseParam
|
||||
{
|
||||
public int campaign_id;
|
||||
|
||||
public int mission_id;
|
||||
}
|
||||
|
||||
public LotteryRewardData Result { get; private set; }
|
||||
|
||||
public LotteryReceiveDoubleChanceTask()
|
||||
{
|
||||
base.type = ApiType.Type.LotteryReceiveDoubleChance;
|
||||
}
|
||||
|
||||
public void SetParameter(int campaignId, int missionId)
|
||||
{
|
||||
LotteryReceiveDoubleChanceTaskParam lotteryReceiveDoubleChanceTaskParam = new LotteryReceiveDoubleChanceTaskParam();
|
||||
lotteryReceiveDoubleChanceTaskParam.campaign_id = campaignId;
|
||||
lotteryReceiveDoubleChanceTaskParam.mission_id = missionId;
|
||||
base.Params = lotteryReceiveDoubleChanceTaskParam;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
Result = new LotteryRewardData(base.ResponseData["data"]["lottery_reward"]);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace Wizard.Lottery;
|
||||
|
||||
public class LotteryReceiveTask : BaseTask
|
||||
{
|
||||
public class LotteryReceiveTaskParam : BaseParam
|
||||
{
|
||||
public int mission_id;
|
||||
}
|
||||
|
||||
public LotteryRewardData Result { get; private set; }
|
||||
|
||||
public LotteryReceiveTask()
|
||||
{
|
||||
base.type = ApiType.Type.LotteryReceive;
|
||||
}
|
||||
|
||||
public void SetParameter(int mission_id)
|
||||
{
|
||||
LotteryReceiveTaskParam lotteryReceiveTaskParam = new LotteryReceiveTaskParam();
|
||||
lotteryReceiveTaskParam.mission_id = mission_id;
|
||||
base.Params = lotteryReceiveTaskParam;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
Result = new LotteryRewardData(base.ResponseData["data"]["lottery_reward"]);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user