cull(engine-cleanup): pass-8 phase-2 cascade round 1 after MyPageItemBattle stub

This commit is contained in:
gamer147
2026-07-03 21:51:02 -04:00
parent 57dee92570
commit 006a6ae7ab
48 changed files with 4 additions and 1845 deletions

View File

@@ -83,12 +83,6 @@ public class AllLabelColorChanger
}
};
public static Dictionary<Color32, ColorSet> COLOR_TABLE_DECK_SELECTION_ROTATION_UNLIMITED = new Dictionary<Color32, ColorSet> {
{
LabelDefine.TEXT_COLOR_NORMAL,
new ColorSet(FromHexRGB(16777215), FromHexRGB(16777215), UILabel.Effect.None, new Vector2(2f, 2f))
} };
public static Dictionary<Color32, ColorSet> COLOR_TABLE_DECK_SELECTION = new Dictionary<Color32, ColorSet>
{
{

View File

@@ -25,8 +25,6 @@ public class AvatarBattleAllInfo
private double _receiveServerUnixTime;
public bool IsWithinFreeMatchPeriod => IsWithinPeriod(FreeMatchPeriod);
public AvatarBattleInfo Get(string id)
{
if (string.IsNullOrEmpty(id))

View File

@@ -12,9 +12,6 @@ public class CampaignBattleWin
public enum eBoxStatus
{
NO_GET,
ACTIVE,
ALREADY_GET
}
public bool IsInSessionCampaign { get; private set; }

View File

@@ -144,8 +144,6 @@ public static class Data
public static GenerateDeckCode GenerateDeckCode { get; set; }
public static InviteFriendBattle InviteFriendBattle { get; set; }
public static InitializeRoomBattle InitializeRoomBattle { get; set; }
public static ReplayInfo ReplayInfo { get; set; }

View File

@@ -20,8 +20,6 @@ public class DeckSelectUI : MonoBehaviour
public bool CanUseNonPossessionCard { get; set; }
public IFirstDisplayPageIndexGetter FirstDisplayPageIndexGetter { get; set; }
public int? LongTextTitlePosition { get; set; }
}
private enum ChangeMoveDirection
@@ -197,51 +195,6 @@ public class DeckSelectUI : MonoBehaviour
public bool IsPageMoving { get; private set; }
public void Initialize(List<DeckGroup> deckGroupList, Format format, bool isVisibleCreateNew, Action<DeckData> onSelectDeck, Action<Format> onChangePage, Action onInitializeFinish, InitOptions initOptions = null)
{
if (initOptions == null)
{
initOptions = new InitOptions();
}
_infoButton.gameObject.SetActive(initOptions.OnClickInfoButton != null);
_canUseNonPossessionCard = initOptions.CanUseNonPossessionCard;
UIEventListener uIEventListener = UIEventListener.Get(_flickCollider.gameObject);
uIEventListener.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener.onDrag, (UIEventListener.VectorDelegate)delegate(GameObject g, Vector2 v)
{
OnDragPanel(v);
});
UIEventListener uIEventListener2 = UIEventListener.Get(_rightButton.gameObject);
uIEventListener2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener2.onClick, (UIEventListener.VoidDelegate)delegate
{
NextPage();
});
UIEventListener uIEventListener3 = UIEventListener.Get(_leftButton.gameObject);
uIEventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener3.onClick, (UIEventListener.VoidDelegate)delegate
{
PrevPage();
});
if (initOptions.OnClickInfoButton != null)
{
UIEventListener uIEventListener4 = UIEventListener.Get(_infoButton.gameObject);
uIEventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener4.onClick, (UIEventListener.VoidDelegate)delegate
{
initOptions.OnClickInfoButton.Call();
});
}
OnSelectDeck = onSelectDeck;
OnChangePage = onChangePage;
_deckTables[0] = new DeckTable(_deckTableGrids[0], _deckFrameOriginal, OnClickDeck, OnDragPanel, initOptions.OnUpdateDeckUICustomize);
_deckTables[1] = new DeckTable(_deckTableGrids[1], _deckFrameOriginal, OnClickDeck, OnDragPanel, initOptions.OnUpdateDeckUICustomize);
_cautionLabel.gameObject.SetActive(value: false);
Action onSettingDeckListFinish = delegate
{
_isInitialized = true;
onInitializeFinish.Call();
};
UpdateDeckView(deckGroupList, format, isVisibleCreateNew, onSettingDeckListFinish, initOptions.PrimaryFirstDisplayDeck, initOptions.FirstDisplayPageIndexGetter);
}
public void UpdateDeckView(List<DeckGroup> deckGroupList, Format format, bool isVisibleCreateNew, Action onSettingDeckListFinish = null, DeckData primaryFirstDisplayDeck = null, IFirstDisplayPageIndexGetter firstDisplayPageIndexGetter = null)
{
List<DeckData> list = new List<DeckData>();

View File

@@ -1,263 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Cute;
using UnityEngine;
namespace Wizard;
public class DeckSelectUIDialog
{
public enum eFormatChangeUIType
{
SingleFormat,
NormalFormatOnly,
WithPrerotation,
WithCrossover,
WithMyRotation,
UseOtherCategory
}
private static readonly Vector2 FORMAT_CHANGE_UI_POSITION = new Vector3(-508f, 65f);
private DeckSelectUIDialogTitle _deckSelectDialogTitleUI;
private DeckGroupListData _deckGroupListData;
private bool _isVisibleCreateNew;
private DeckSelectUI _deckSelectUI;
private static readonly Format[] OTHER_CATEGORY_FORMATS = new Format[5]
{
Format.Crossover,
Format.PreRotation,
Format.MyRotation,
Format.Avatar,
Format.Max
};
private static readonly Dictionary<FormatChangeUI.FormatCategory, Format> FORMAT_CATEGORY_TO_FORMAT = new Dictionary<FormatChangeUI.FormatCategory, Format>
{
{
FormatChangeUI.FormatCategory.Rotation,
Format.Rotation
},
{
FormatChangeUI.FormatCategory.Unlimited,
Format.Unlimited
},
{
FormatChangeUI.FormatCategory.PreRotation,
Format.PreRotation
},
{
FormatChangeUI.FormatCategory.Crossover,
Format.Crossover
},
{
FormatChangeUI.FormatCategory.Other,
Format.Max
},
{
FormatChangeUI.FormatCategory.Hof,
Format.Hof
},
{
FormatChangeUI.FormatCategory.Windfall,
Format.Windfall
},
{
FormatChangeUI.FormatCategory.MyRotation,
Format.MyRotation
},
{
FormatChangeUI.FormatCategory.Avatar,
Format.Avatar
}
};
public DialogBase Dialog { get; private set; }
public static DeckSelectUIDialog Create(string dialogTitle, DeckGroupListData deckGroupListData, Format defaultFormat, eFormatChangeUIType formatChangeUIType, bool isVisibleCreateNew, Action<DialogBase, DeckData> OnSelectDeck, DeckSelectUI.InitOptions initOptions = null)
{
if (defaultFormat == Format.All)
{
defaultFormat = (Format)PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_FORMAT);
}
if (formatChangeUIType == eFormatChangeUIType.UseOtherCategory && IsIncludeInOtherCategory(defaultFormat))
{
defaultFormat = Format.Max;
bool num = PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.LAST_BATTLE_IS_TRIALDECK);
bool flag = PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.LAST_BATTLE_IS_DEFDECK);
if (!num && !flag)
{
Format[] oTHER_CATEGORY_FORMATS = OTHER_CATEGORY_FORMATS;
foreach (Format format in oTHER_CATEGORY_FORMATS)
{
if (deckGroupListData.IsExistDeckListByFormat(format))
{
defaultFormat = format;
break;
}
}
}
}
if (formatChangeUIType != eFormatChangeUIType.SingleFormat && !deckGroupListData.IsExistDeckListByFormat(defaultFormat))
{
defaultFormat = deckGroupListData.DeckGroupList.FirstOrDefault((DeckGroup deckGroup) => deckGroup.DeckDataList.Any((DeckData deck) => !deck.IsNoCard()))?.DeckFormat ?? Format.Rotation;
}
FormatChangeUI.FormatCategory formatCategoryByFormat = GetFormatCategoryByFormat(defaultFormat, formatChangeUIType == eFormatChangeUIType.UseOtherCategory);
DeckSelectUIDialog deckSelectUIDialog = new DeckSelectUIDialog(dialogTitle, deckGroupListData, defaultFormat, formatCategoryByFormat, formatChangeUIType, isVisibleCreateNew, OnSelectDeck, initOptions);
deckSelectUIDialog.CreateFormatChangeUI(formatCategoryByFormat, formatChangeUIType);
return deckSelectUIDialog;
}
private DeckSelectUIDialog(string dialogTitle, DeckGroupListData deckGroupListData, Format format, FormatChangeUI.FormatCategory formatCategory, eFormatChangeUIType formatChangeUIType, bool isVisibleCreateNew, Action<DialogBase, DeckData> OnSelectDeck, DeckSelectUI.InitOptions initOptions)
{
DeckSelectUIDialog deckSelectUIDialog = this;
_isVisibleCreateNew = isVisibleCreateNew;
_deckGroupListData = deckGroupListData;
Dialog = UIManager.GetInstance().CreateDialogClose();
Dialog.SetTitleLabel(dialogTitle);
Dialog.SetSize(DialogBase.Size.XL);
Dialog.SetButtonLayout(DialogBase.ButtonLayout.NONE);
Dialog.SetActive(inActive: false);
int? longTextPositionOverride = initOptions?.LongTextTitlePosition;
_deckSelectDialogTitleUI = DeckSelectUIDialogTitle.Create(Dialog, dialogTitle, format, formatChangeUIType != eFormatChangeUIType.SingleFormat, longTextPositionOverride);
List<DeckGroup> deckGroupList = GetDeckGroupList(formatCategory);
GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("UI/DeckList/DeckSelectUI/DeckSelectUI")) as GameObject;
_deckSelectUI = gameObject.GetComponent<DeckSelectUI>();
_deckSelectUI.gameObject.SetActive(value: false);
_deckSelectUI.Initialize(deckGroupList, format, isVisibleCreateNew, delegate(DeckData deck)
{
OnSelectDeck.Call(deckSelectUIDialog.Dialog, deck);
}, delegate(Format changeFormat)
{
deckSelectUIDialog._deckSelectDialogTitleUI.UpdateFormatObj(changeFormat);
}, delegate
{
deckSelectUIDialog.Dialog.SetActive(inActive: true);
deckSelectUIDialog._deckSelectUI.gameObject.SetActive(value: true);
}, initOptions);
Dialog.SetObj(_deckSelectUI.gameObject);
_deckSelectUI.gameObject.GetComponent<UIPanel>().alpha = 1f;
}
public void Close()
{
if (Dialog != null)
{
Dialog.Close();
}
}
public static string GetTitleByBattleType(DataMgr.BattleType battleType)
{
string result = string.Empty;
switch (battleType)
{
case DataMgr.BattleType.FreeBattle:
result = Data.SystemText.Get("Battle_0005");
break;
case DataMgr.BattleType.RankBattle:
result = Data.SystemText.Get("Battle_0006");
break;
case DataMgr.BattleType.RoomBattle:
case DataMgr.BattleType.RoomTwoPick:
result = Data.SystemText.Get("Battle_0007");
break;
case DataMgr.BattleType.ColosseumNormal:
case DataMgr.BattleType.ColosseumHof:
result = Data.SystemText.Get("Battle_0488");
break;
}
return result;
}
private void CreateFormatChangeUI(FormatChangeUI.FormatCategory defaultFormatCategory, eFormatChangeUIType formatChangeUIType)
{
if (formatChangeUIType != eFormatChangeUIType.SingleFormat)
{
FormatChangeUI.FormatCategory anotherFormatCategory = FormatChangeUI.FormatCategory.Invalid;
switch (formatChangeUIType)
{
case eFormatChangeUIType.NormalFormatOnly:
anotherFormatCategory = FormatChangeUI.FormatCategory.Invalid;
break;
case eFormatChangeUIType.UseOtherCategory:
anotherFormatCategory = FormatChangeUI.FormatCategory.Other;
break;
case eFormatChangeUIType.WithPrerotation:
anotherFormatCategory = FormatChangeUI.FormatCategory.PreRotation;
break;
case eFormatChangeUIType.WithCrossover:
anotherFormatCategory = FormatChangeUI.FormatCategory.Crossover;
break;
case eFormatChangeUIType.WithMyRotation:
anotherFormatCategory = FormatChangeUI.FormatCategory.MyRotation;
break;
}
FormatChangeUI formatChangeUI = FormatChangeUI.Create(defaultFormatCategory, anotherFormatCategory, OnClickChangeFormatBtn);
Dialog.AttachObjToTitleLabel(formatChangeUI.gameObject, FORMAT_CHANGE_UI_POSITION);
}
}
private void OnClickChangeFormatBtn(FormatChangeUI.FormatCategory formatCategory)
{
Format formatByFormatCategory = GetFormatByFormatCategory(formatCategory);
_deckSelectUI.gameObject.SetActive(value: false);
List<DeckGroup> deckGroupList = GetDeckGroupList(formatCategory);
_deckSelectUI.UpdateDeckView(deckGroupList, formatByFormatCategory, _isVisibleCreateNew, delegate
{
_deckSelectUI.gameObject.SetActive(value: true);
});
}
private List<DeckGroup> GetDeckGroupList(FormatChangeUI.FormatCategory formatCategory)
{
List<DeckGroup> list = new List<DeckGroup>();
if (formatCategory == FormatChangeUI.FormatCategory.Other)
{
Format[] oTHER_CATEGORY_FORMATS = OTHER_CATEGORY_FORMATS;
foreach (Format format in oTHER_CATEGORY_FORMATS)
{
list.AddRange(_deckGroupListData.SelectDeckGroupList(format));
}
}
else
{
Format formatByFormatCategory = GetFormatByFormatCategory(formatCategory);
list.AddRange(_deckGroupListData.SelectDeckGroupList(formatByFormatCategory));
}
return list;
}
private static Format GetFormatByFormatCategory(FormatChangeUI.FormatCategory formatCategory)
{
return FORMAT_CATEGORY_TO_FORMAT[formatCategory];
}
private static FormatChangeUI.FormatCategory GetFormatCategoryByFormat(Format format, bool useOtherCategory)
{
if (useOtherCategory && IsIncludeInOtherCategory(format))
{
return FormatChangeUI.FormatCategory.Other;
}
FormatChangeUI.FormatCategory result = FormatChangeUI.FormatCategory.Invalid;
foreach (KeyValuePair<FormatChangeUI.FormatCategory, Format> item in FORMAT_CATEGORY_TO_FORMAT)
{
if (item.Value == format)
{
result = item.Key;
break;
}
}
return result;
}
private static bool IsIncludeInOtherCategory(Format format)
{
return OTHER_CATEGORY_FORMATS.Any((Format f) => f == format);
}
}

View File

@@ -1,181 +0,0 @@
using System.Collections;
using UnityEngine;
namespace Wizard;
public class DeckSelectUIDialogTitle : MonoBehaviour
{
private static readonly Color32 FORMAT_COLOR_ROTATION = new Color32(43, 39, 144, byte.MaxValue);
private static readonly Color32 FORMAT_COLOR_UNLIMITED = new Color32(125, 60, 37, byte.MaxValue);
private static readonly Color32 FORMAT_COLOR_PRE_ROTATION = new Color32(23, 111, 40, byte.MaxValue);
private static readonly Color32 FORMAT_COLOR_CROSSOVER = new Color32(156, 55, 140, byte.MaxValue);
private static readonly Color32 FORMAT_COLOR_MYROTATION = new Color32(184, 25, 70, byte.MaxValue);
private static readonly Color32 FORMAT_COLOR_AVATAR = new Color32(147, 140, 19, byte.MaxValue);
[SerializeField]
private GameObject _titleUIRoot;
[SerializeField]
private UILabel _deckListTitleLabel;
[SerializeField]
private UITable _formatTable;
[SerializeField]
private UILabel _formatLabel;
[SerializeField]
private UISprite _formatIcon;
[SerializeField]
private UISprite _formatDecorationSprite;
[SerializeField]
private int _tableBorderLine;
private Format _format;
private Vector3 _tableFirstPosition;
private bool _isFirstUpdateTablePosition = true;
private int? _longTextPositionOverride;
private bool _isExistFormatChangeUI;
public static DeckSelectUIDialogTitle Create(DialogBase dialog, string titleText, Format defaultFormat, bool isExistFormatChangeUI, int? longTextPositionOverride)
{
DeckSelectUIDialogTitle component = (Object.Instantiate(Resources.Load("UI/DeckList/DeckSelectUI/DeckSelectUIDialogTitle")) as GameObject).GetComponent<DeckSelectUIDialogTitle>();
component.Initialize(dialog, titleText, defaultFormat, isExistFormatChangeUI, longTextPositionOverride);
return component;
}
private void Initialize(DialogBase dialog, string titleText, Format defaultFormat, bool isExistFormatChangeUI, int? longTextPositionOverride)
{
_longTextPositionOverride = longTextPositionOverride;
_isExistFormatChangeUI = isExistFormatChangeUI;
_deckListTitleLabel.InitializeFont();
_formatLabel.InitializeFont();
_deckListTitleLabel.text = titleText;
dialog.AttachObjToTitleLabel(_titleUIRoot, Vector3.zero);
dialog.SetTitleLabelActive(active: false);
UpdateFormatObj(defaultFormat);
}
public void UpdateFormatObj(Format format)
{
_format = format;
switch (format)
{
case Format.Rotation:
SetActiveFormatObjs(isActive: true);
_formatIcon.spriteName = "icon_timesliprotation_s";
_formatLabel.text = Data.SystemText.Get("Common_0154");
_formatDecorationSprite.color = FORMAT_COLOR_ROTATION;
break;
case Format.PreRotation:
SetActiveFormatObjs(isActive: true);
_formatIcon.spriteName = "icon_prerotation_s";
_formatLabel.text = Data.SystemText.Get("Common_0163");
_formatDecorationSprite.color = FORMAT_COLOR_PRE_ROTATION;
break;
case Format.Unlimited:
SetActiveFormatObjs(isActive: true);
_formatIcon.spriteName = "icon_unlimited_s";
_formatLabel.text = Data.SystemText.Get("Common_0155");
_formatDecorationSprite.color = FORMAT_COLOR_UNLIMITED;
break;
case Format.Crossover:
SetActiveFormatObjs(isActive: true);
_formatIcon.spriteName = "icon_crossover_s";
_formatLabel.text = Data.SystemText.Get("Common_0166");
_formatDecorationSprite.color = FORMAT_COLOR_CROSSOVER;
break;
case Format.MyRotation:
SetActiveFormatObjs(isActive: true);
_formatIcon.spriteName = "icon_myrotation_s";
_formatLabel.text = Data.SystemText.Get("Common_0178");
_formatDecorationSprite.color = FORMAT_COLOR_MYROTATION;
break;
case Format.Avatar:
SetActiveFormatObjs(isActive: true);
_formatIcon.spriteName = "icon_heroesbattle_s";
_formatLabel.text = Data.SystemText.Get("HeroesBattle_0001");
_formatDecorationSprite.color = FORMAT_COLOR_AVATAR;
break;
default:
SetActiveFormatObjs(isActive: false);
break;
}
_formatTable.Reposition();
if (UIManager.GetInstance().IsCurrentScene(UIManager.ViewScene.QuestSelectionPage))
{
_deckListTitleLabel.color = LabelDefine.TEXT_COLOR_NORMAL;
_formatLabel.color = LabelDefine.TEXT_COLOR_NORMAL;
if (format == Format.Unlimited || format == Format.Rotation)
{
AllLabelColorChanger.ChangeAllLabel(_formatTable.gameObject, AllLabelColorChanger.COLOR_TABLE_DECK_SELECTION_ROTATION_UNLIMITED);
}
else
{
AllLabelColorChanger.ChangeAllLabel(_formatTable.gameObject);
}
}
UpdateTablePosition();
}
private IEnumerator UpdateTableCoroutine()
{
yield return null;
UpdateTablePosition();
}
[ContextMenu("UpdateTablePosition")]
public void UpdateTablePosition()
{
Bounds bounds = NGUIMath.CalculateRelativeWidgetBounds(_formatTable.transform);
if (bounds.size.x < 1f)
{
UIManager.GetInstance().StartCoroutine(UpdateTableCoroutine());
return;
}
if (_isFirstUpdateTablePosition)
{
_isFirstUpdateTablePosition = false;
_tableFirstPosition = _formatTable.transform.localPosition;
}
_formatTable.transform.localPosition = _tableFirstPosition;
if (!_isExistFormatChangeUI)
{
return;
}
if ((int)bounds.size.x <= _tableBorderLine)
{
if (_longTextPositionOverride.HasValue && _format == Format.Rotation)
{
_formatTable.transform.localPosition = new Vector3(_longTextPositionOverride.Value, _tableFirstPosition.y, _tableFirstPosition.z);
}
}
else if (_longTextPositionOverride.HasValue)
{
_formatTable.transform.localPosition = new Vector3(_longTextPositionOverride.Value, _tableFirstPosition.y, _tableFirstPosition.z);
}
else
{
_formatTable.transform.localPosition = _tableFirstPosition + new Vector3(bounds.size.x - (float)_tableBorderLine, 0f, 0f);
}
}
private void SetActiveFormatObjs(bool isActive)
{
_formatIcon.gameObject.SetActive(isActive);
_formatLabel.gameObject.SetActive(isActive);
_formatDecorationSprite.gameObject.SetActive(isActive);
}
}

View File

@@ -13,7 +13,6 @@ public class FirstTips : MonoBehaviour
Deck = 0,
Battle = 4,
ShopCardPack = 10,
BattleBeforeFormatUser = 13,
ColosseumInfo = 17,
GachaPointExchange = 24,
Quest = 25,
@@ -21,7 +20,6 @@ public class FirstTips : MonoBehaviour
Crossover = 28,
MyRotationDeck = 33,
BossRush = 34,
HeroesFreeMatch = 40,
TimeslipResurgentCard = 42,
Max = 46,
MyPage = 1001 }

View File

@@ -15,10 +15,7 @@ public class FormatChangeUI : MonoBehaviour
Unlimited,
PreRotation,
Crossover,
Hof,
Windfall,
MyRotation,
Avatar,
Other
}
@@ -55,14 +52,6 @@ public class FormatChangeUI : MonoBehaviour
private Action<FormatCategory> _onChangeFormat;
public static FormatChangeUI Create(FormatCategory defaultFormatCategory, FormatCategory anotherFormatCategory, Action<FormatCategory> onChangeFormat)
{
FormatChangeUI component = (UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/Guild/FormatChangeUI")) as GameObject).GetComponent<FormatChangeUI>();
component.gameObject.SetActive(value: true);
component.Initialize(defaultFormatCategory, anotherFormatCategory, onChangeFormat);
return component;
}
public void ChangeFormat(FormatCategory inFormatCategory)
{
_currentFormatCategory = inFormatCategory;

View File

@@ -6,29 +6,6 @@ namespace Wizard;
public static class FreeAndRankMatchDeckSelectConfirmDialog
{
public static void Create(DialogBase dialogDeckList, DeckData deck, bool isBattleEnd)
{
if (!deck.IsUsable())
{
InCompleteDeckDecideDialog.Create(dialogDeckList, deck, null, canUseNonPossessionCard: false, ChangeViewSceneAndSetBattleRetry);
return;
}
CompleteDeckDecideDialog.CreateForSingleDeck(dialogDeckList, deck, showSimpleStageOption: true, delegate
{
DecideDeck(deck, isBattleEnd);
}).DecisionUI.CardListCustomize = delegate(UICardList uiCardList)
{
if (!deck.IsRentalDeck)
{
uiCardList.SetEnableBlueButton(isEnable: true, Data.SystemText.Get("Card_0007"), delegate
{
DeckCardEditUI.SetDeckEditParameter(deck, null);
ChangeViewSceneAndSetBattleRetry(UIManager.ViewScene.DeckCardEdit);
});
}
};
}
public static void DecideDeck(DeckData deck, bool isBattleEnd, bool notBlack = false, bool notCollider = false)
{

View File

@@ -1,33 +0,0 @@
namespace Wizard;
public class InviteAcceptTask : BaseTask
{
public class InviteAcceptTaskParam : BaseParam
{
public int friend_viewer_id;
}
public InviteAcceptTask()
{
base.type = ApiType.Type.InviteAccept;
}
public void SetParameter(int friendViewerId)
{
InviteAcceptTaskParam inviteAcceptTaskParam = new InviteAcceptTaskParam();
inviteAcceptTaskParam.friend_viewer_id = friendViewerId;
base.Params = inviteAcceptTaskParam;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
Data.InviteFriendBattle.RoomId = base.ResponseData["data"]["room_id"].ToString();
Data.InviteFriendBattle.BattleParameterInstance = BattleParameter.JsonToBattleParameter(base.ResponseData["data"]);
return num;
}
}

View File

@@ -1,39 +0,0 @@
using LitJson;
namespace Wizard;
public class InviteGetListTask : BaseTask
{
public class InviteGetListTaskParam : BaseParam
{
}
public InviteGetListTask()
{
base.type = ApiType.Type.InviteGetList;
}
public void SetParameter()
{
InviteGetListTaskParam inviteGetListTaskParam = new InviteGetListTaskParam();
base.Params = inviteGetListTaskParam;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
Data.FriendInfo.Initialize();
JsonData jsonData = base.ResponseData["data"];
for (int i = 0; i < jsonData.Count; i++)
{
UserFriend item = new UserFriend(jsonData[i]);
Data.FriendInfo.data.friendList.Add(item);
}
Data.FriendInfo.servertime = base.ResponseData["data_headers"]["servertime"].ToInt();
return num;
}
}

View File

@@ -1,145 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using Cute;
namespace Wizard;
public class LoadQueue
{
public delegate void Callback(string id);
private class Data
{
public string ID { get; private set; }
public List<string> PathList { get; set; }
public Callback OnStart { get; set; }
public Callback OnEnd { get; set; }
public Data(string id, List<string> pathList, Callback onStart, Callback onEnd)
{
ID = id;
PathList = pathList;
OnStart = onStart;
OnEnd = onEnd;
}
}
private enum State
{
IDLE,
LOAD
}
private readonly List<Data> _loadList = new List<Data>();
private State _state;
public bool IsChangingPauseLoad { get; private set; }
public bool IsClearing { get; private set; }
public void AddToLast(string id, List<string> pathList, Callback onStart, Callback onEnd)
{
Add(isFirst: false, id, pathList, onStart, onEnd);
}
public void Add(bool isFirst, string id, List<string> pathList, Callback onStart, Callback onEnd)
{
Remove(id);
Data item = new Data(id, pathList, onStart, onEnd);
if (isFirst)
{
_loadList.Insert(0, item);
}
else
{
_loadList.Add(item);
}
}
public bool Remove(string id)
{
if (IsValidId(id))
{
return _loadList.RemoveAll((Data x) => x.ID == id) > 0;
}
return false;
}
public void StartLoad()
{
IsChangingPauseLoad = false;
if (_state != State.LOAD)
{
_state = State.LOAD;
LoadNext();
}
}
private void LoadNext()
{
if (_loadList.Count <= 0)
{
_state = State.IDLE;
return;
}
Data data = _loadList[0];
_loadList.RemoveAt(0);
data.OnStart?.Invoke(data.ID);
if (data.PathList != null)
{
List<string> list = (data.PathList = data.PathList.Where((string path) => !string.IsNullOrEmpty(path)).ToList());
List<string> list3 = list;
if (list3.Count > 0)
{
Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(list3, delegate
{
EndOneLoad(data);
});
return;
}
}
EndOneLoad(data);
}
private void EndOneLoad(Data data)
{
if (IsClearing)
{
_state = State.IDLE;
IsClearing = false;
if (data.PathList != null)
{
Toolbox.ResourcesManager.RemoveAssetGroup(data.PathList);
}
}
else if (IsChangingPauseLoad)
{
_state = State.IDLE;
IsChangingPauseLoad = false;
data.OnEnd?.Invoke(data.ID);
}
else
{
data.OnEnd?.Invoke(data.ID);
LoadNext();
}
}
public void Clear()
{
_loadList.Clear();
if (_state == State.LOAD)
{
IsClearing = true;
}
}
private static bool IsValidId(string id)
{
return !string.IsNullOrEmpty(id);
}
}

View File

@@ -20,8 +20,6 @@ public class MyPageDetail
public int unreceived_mission_reward_count;
public LotteryLoadTaskData _lotteryData = new LotteryLoadTaskData();
public List<MyPageBannerBase.BannerInfo> _bannerList;
public List<MyPageBannerBase.BannerInfo> _subBannerInfoList;
@@ -38,20 +36,6 @@ public class MyPageDetail
public SpeedChallengeInfo SpeedChallengeInfo { get; set; }
public bool IsRoomNonPossessionCardCampaign()
{
if (RoomNonPossessionCardCampaign == null)
{
return false;
}
double nowUnixTime = GetNowUnixTime();
if (nowUnixTime < RoomNonPossessionCardCampaign.StartUnixTime || nowUnixTime >= RoomNonPossessionCardCampaign.EndUnixTime)
{
return false;
}
return true;
}
private double GetNowUnixTime()
{
return ServerUnixTime + (double)Time.realtimeSinceStartup - (double)SinceTime;

View File

@@ -1,34 +0,0 @@
using UnityEngine;
namespace Wizard;
public class MyPageRewardDialogBoxCount : MonoBehaviour
{
[SerializeField]
private UILabel _label;
public static GameObject Create(GameObject prefab, CampaignBattleWin info)
{
GameObject obj = Object.Instantiate(prefab);
obj.GetComponentInChildren<MyPageRewardDialogBoxCount>().Initialize(info);
return obj;
}
private void Initialize(CampaignBattleWin info)
{
string text = "";
switch (info.BoxStatus)
{
case CampaignBattleWin.eBoxStatus.NO_GET:
text = Data.SystemText.Get("MyPage_0078");
break;
case CampaignBattleWin.eBoxStatus.ACTIVE:
text = Data.SystemText.Get("MyPage_0079");
break;
case CampaignBattleWin.eBoxStatus.ALREADY_GET:
text = Data.SystemText.Get("MyPage_0080");
break;
}
_label.text = Data.SystemText.Get("MyPage_0077") + " " + text;
}
}

View File

@@ -1,198 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Cute;
using UnityEngine;
namespace Wizard;
public class MyPageSpecialWinRewardDialog : MonoBehaviour
{
private float[] _memoryValue = new float[16]
{
0f, 0.0585f, 0.126f, 0.194f, 0.263f, 0.331f, 0.399f, 0.467f, 0.535f, 0.602f,
0.67f, 0.738f, 0.806f, 0.875f, 0.943f, 1f
};
[SerializeField]
private UISprite _boxSprite;
[SerializeField]
private UIGauge _gradeGauge;
[SerializeField]
private UISprite _gaugeBackground;
[SerializeField]
private UILabel _treasureBoxLabel;
[SerializeField]
private UILabel _titleLabel;
[SerializeField]
private UILabel _completeLabel;
[SerializeField]
private GameObject _clickObject;
[SerializeField]
private BoxCollider _clickObjectCollider;
[SerializeField]
private UILabel _remineNumLabel;
private List<string> _loadFileList = new List<string>();
private UIAtlas _arenaAtlas;
private BoxCollider _notTouchMypageCollider;
private GameObject _boxOpenEffectObj;
private GameObject _treasureEffectObj;
public static GameObject Create(GameObject prefab, BoxCollider notTouchMypageCollider)
{
GameObject obj = UnityEngine.Object.Instantiate(prefab);
obj.GetComponentInChildren<MyPageSpecialWinRewardDialog>().Initialize(notTouchMypageCollider);
return obj;
}
private void Initialize(BoxCollider notTouchMypageCollider)
{
SystemText systemText = Data.SystemText;
_notTouchMypageCollider = notTouchMypageCollider;
SpecialTreasureInfo info = Data.MyPageNotifications.data.CampaignBattleWin.SpecialTreasureInfo;
_titleLabel.text = systemText.Get("MyPage_0109", info.SpecialTreasureBoxNecessaryNumbers.ToString());
_remineNumLabel.text = systemText.Get("MyPage_0113", (info.SpecialTreasureBoxNecessaryNumbers - info.ReceivedBoxNumbers).ToString());
_gradeGauge.Value = _memoryValue[info.ReceivedBoxNumbers];
_treasureBoxLabel.text = (info.IsGotSpecialTreasureBox ? systemText.Get("TreasureBoxCp_0009") : "");
UIManager.SetObjectToGrey(_boxSprite.gameObject, info.IsGotSpecialTreasureBox);
_completeLabel.gameObject.SetActive(info.ReceivedBoxNumbers == info.SpecialTreasureBoxNecessaryNumbers);
_clickObject.SetActive(info.IsTreasureBoxReadyToOpen);
_clickObjectCollider.enabled = info.IsTreasureBoxReadyToOpen;
string atlasName = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Arena, null);
_loadFileList.Add(atlasName);
StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(atlasName, delegate
{
atlasName = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Arena, null, isload: true);
_arenaAtlas = Toolbox.ResourcesManager.LoadObject<GameObject>(atlasName).GetComponent<UIAtlas>();
_boxSprite.atlas = _arenaAtlas;
_gaugeBackground.atlas = UIManager.GetInstance().GetAtlasList().FirstOrDefault((UIAtlas s) => s.name == "MypageComon");
_boxSprite.spriteName = (info.IsGotSpecialTreasureBox ? $"box_2pick_0{5}_open" : $"box_2pick_0{5}_close");
_gaugeBackground.spriteName = "gauge_bg_scale_15";
}));
UIEventListener.Get(_boxSprite.gameObject).onClick = OnClickBoxReceiveRewards;
}
private void OnClickBoxReceiveRewards(GameObject g)
{
MypageReceiveSpecialTreasureTask receiveSpecialTreasureTask = new MypageReceiveSpecialTreasureTask();
receiveSpecialTreasureTask.SetParameter();
UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(receiveSpecialTreasureTask, delegate
{
UIManager.GetInstance().StartCoroutine(RunOpenBoxEffect(receiveSpecialTreasureTask.Result, delegate
{
Data.MyPageNotifications.data.CampaignBattleWin.SpecialTreasureInfo.SetGotSpecialTreasureBox(isGot: true);
CreateRewardDialog(receiveSpecialTreasureTask, RedrawDialog);
RunHideBoxEffect();
}));
}));
}
private IEnumerator RunOpenBoxEffect(MypageReceiveSpecialTreasureTask.MypageTreasureBoxCpOpenTaskData result, Action endAction)
{
UIManager.GetInstance().OpenNotTouch();
_notTouchMypageCollider.enabled = true;
yield return new WaitForSeconds(1f);
_boxOpenEffectObj = NGUITools.AddChild(base.gameObject, Resources.Load("UI/layoutParts/RankWinnerRewardResultPanel") as GameObject);
NguiObjs component = _boxOpenEffectObj.GetComponent<NguiObjs>();
UISprite bg = component.sprites[0];
UISprite window = component.sprites[1];
UISprite box = component.sprites[2];
box.atlas = _arenaAtlas;
UILabel label = component.labels[0];
label.text = Data.SystemText.Get("MyPage_0111");
UIPanel panel = _boxOpenEffectObj.GetComponent<UIPanel>();
panel.alpha = 0f;
box.spriteName = $"box_2pick_0{5}_close";
string loadEffectName = $"cmn_arena_treasure_{6}";
List<string> list = new List<string>();
list.Add(Toolbox.ResourcesManager.GetAssetTypePath(loadEffectName, ResourcesManager.AssetLoadPathType.Effect2D));
yield return UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(list, null));
_treasureEffectObj = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(loadEffectName, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)) as GameObject);
_treasureEffectObj.transform.parent = _boxOpenEffectObj.transform;
/* Pre-Phase-5b: SetUIParticleShader dropped */
_boxOpenEffectObj.SetLayer(LayerMask.NameToLayer("SystemUI"), isSetChildren: true);
bg.alpha = 0f;
box.alpha = 0f;
label.alpha = 0f;
panel.alpha = 1f;
TweenAlpha.Begin(bg.gameObject, 0.5f, 0.65f);
TweenAlpha.Begin(label.gameObject, 0.5f, 1f);
TweenAlpha.Begin(box.gameObject, 0.5f, 1f);
label.transform.localPosition = new Vector3(100f, 0f, 0f);
window.transform.localScale = new Vector3(1f, 0.01f, 1f);
box.transform.localPosition = new Vector3(180f, 0f, 0f);
iTween.MoveTo(label.gameObject, iTween.Hash("x", 20f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo));
iTween.ScaleTo(window.gameObject, iTween.Hash("y", 1f, "time", 0.5f, "easetype", iTween.EaseType.easeInOutExpo));
iTween.MoveTo(box.gameObject, iTween.Hash("y", 20f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo));
yield return new WaitForSeconds(0.8f);
TweenAlpha.Begin(label.gameObject, 0.5f, 0f);
iTween.MoveTo(box.gameObject, iTween.Hash("x", 0f, "time", 0.7f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo));
yield return new WaitForSeconds(1f);
_treasureEffectObj.transform.localPosition = box.transform.localPosition;
_treasureEffectObj.transform.localScale = Vector3.one * 320f * 1.75f;
_treasureEffectObj.SetActive(value: true);
box.gameObject.SetActive(value: false);
yield return new WaitForSeconds(1.2f);
endAction.Call();
}
private void CreateRewardDialog(MypageReceiveSpecialTreasureTask info, Action onClose)
{
UIManager.GetInstance().createInSceneCenterLoading();
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
dialogBase.SetSize(DialogBase.Size.M);
dialogBase.SetLayer("MyPage");
dialogBase.SetPanelDepth(105, isSetBackViewDepthImmediately: true);
dialogBase.SetTitleLabel(Data.SystemText.Get("TreasureBoxCp_0026"));
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
RewardBase component = NGUITools.AddChild(dialogBase.gameObject, Resources.Load<GameObject>("UI/layoutParts/StoryRewardPanel")).GetComponent<RewardBase>();
for (int i = 0; i < info.Result.RewardDataList.Count; i++)
{
component.AddReward(info.Result.RewardDataList[i]);
}
component.EndCreate();
dialogBase.OnClose = delegate
{
onClose.Call();
};
}
private void RunHideBoxEffect()
{
_treasureEffectObj.SetActive(value: false);
_boxOpenEffectObj.SetActive(value: false);
UnityEngine.Object.Destroy(_boxOpenEffectObj);
UnityEngine.Object.Destroy(_treasureEffectObj);
UIManager.GetInstance().offNotTouch();
_notTouchMypageCollider.enabled = false;
}
private void RedrawDialog()
{
SpecialTreasureInfo specialTreasureInfo = Data.MyPageNotifications.data.CampaignBattleWin.SpecialTreasureInfo;
_boxSprite.spriteName = (specialTreasureInfo.IsGotSpecialTreasureBox ? $"box_2pick_0{5}_open" : $"box_2pick_0{5}_close");
UIManager.SetObjectToGrey(_boxSprite.gameObject, specialTreasureInfo.IsGotSpecialTreasureBox);
_completeLabel.gameObject.SetActive(specialTreasureInfo.ReceivedBoxNumbers == specialTreasureInfo.SpecialTreasureBoxNecessaryNumbers);
_treasureBoxLabel.text = (specialTreasureInfo.IsGotSpecialTreasureBox ? Data.SystemText.Get("TreasureBoxCp_0009") : "");
_clickObject.SetActive(specialTreasureInfo.IsTreasureBoxReadyToOpen);
MyPageMenu.Instance.SetAfterSpecialWinRewardOpened();
MyPageMenu.Instance.SpecialWinRewardOpened();
}
}

View File

@@ -33,8 +33,6 @@ public class MyRotationAllInfo
public bool IsMyRotationEnable => IsWithinPeriod(FreeMatchPeriod);
public bool IsWithinFreeMatchPeriod => IsWithinPeriod(FreeMatchPeriod);
public MyRotationInfo Get(string id)
{
if (string.IsNullOrEmpty(id))

View File

@@ -26,12 +26,6 @@ public class MypageReceiveSpecialTreasureTask : BaseTask
base.type = ApiType.Type.TreasureOpenSpecialTreasureBox;
}
public void SetParameter()
{
MypageReceiveSpecialTreasureTaskParam mypageReceiveSpecialTreasureTaskParam = new MypageReceiveSpecialTreasureTaskParam();
base.Params = mypageReceiveSpecialTreasureTaskParam;
}
protected override int Parse()
{
int num = base.Parse();

View File

@@ -14,33 +14,19 @@ public static class NetworkDefine
SHOP_SKIN_MAINTENANCE = 2024,
SHOP_ITEM_MAINTENANCE = 2037,
MISSION_MAINTENANCE = 2010,
ROOM_BATTLE_MAINTENANCE = 2014,
STORY_MAINTENANCE = 2015,
CARD_MAINTENANCE = 2018,
DECK_MAINTENANCE = 2019,
ROOM_TWOPICK_MAINTENANCE = 2029,
ROOM_ALL_MAINTENANCE = 2030,
ROOM_WATCHING_MAINTENANCE = 2031,
FREEBATTLE_UNLIMITED = 2044,
FREEBATTLE_ROTATION = 2045,
RANKBATTLE_UNLIMITED = 2046,
RANKBATTLE_ROTATION = 2047,
ROOM_ROTATION = 2049,
COLOSSEUM = 2050,
GUILD_MAINTENANCE = 2054,
ARENA_SEALED_BATTLE_MAINTENANCE = 2056,
FREEBATTLE_PREROTATION = 2065,
BATTLE_PASS = 2070,
AUTO_DECK_CREATE = 2080,
FREEBATTLE_CROSSOVER = 2084,
RANKBATTLE_CROSSOVER = 2085,
FREEBATTLE_MYROTATION = 2093,
BOSS_RUSH = 2096,
REPLAY_ALL = 2034,
NEWREPLAY_ALL = 2097,
NEWREPLAY_EXCLUDE_ROTATION = 2098,
NEWREPLAY_RECORD = 2099,
FREEBATTLE_AVATAR = 2103}
NEWREPLAY_RECORD = 2099}
public enum ServerBattleType
{

View File

@@ -210,8 +210,7 @@ public class PlayerStaticData : MonoBehaviour
public enum RankTexSize
{
S,
L }
S}
public enum CountryTexSize
{
@@ -415,17 +414,6 @@ public class PlayerStaticData : MonoBehaviour
return Data.Load.data._userRank[(int)inFormat].rank;
}
public static void LoadUserRankTexture(Format inFormat)
{
UserRankTexture.Format = inFormat;
UserRankTexture.LoadTexture();
}
public static void AttachUserRankTexture(UITexture uiTexture, RankTexSize size)
{
UserRankTexture.AttachTexture(uiTexture, (int)size);
}
public static bool IsMasterRankCurrentFormat()
{
return IsMasterRank(Data.CurrentFormat);

View File

@@ -5,6 +5,4 @@ public class RoomNonPossessionCardCampaign
public double StartUnixTime { get; set; }
public double EndUnixTime { get; set; }
public string EndLocalTimeString => ConvertTime.ToLocal(ConvertTime.UnixTimeToDateTime((int)EndUnixTime)).ToString();
}

View File

@@ -10,27 +10,10 @@ public class SpecialTreasureInfo
public bool IsGotSpecialTreasureBox { get; private set; }
public bool IsTreasureBoxReadyToOpen
{
get
{
if (SpecialTreasureBoxNecessaryNumbers == ReceivedBoxNumbers)
{
return !IsGotSpecialTreasureBox;
}
return false;
}
}
public SpecialTreasureInfo(JsonData json)
{
SpecialTreasureBoxNecessaryNumbers = json["special_treasure_box_necessary_numbers"].ToInt();
ReceivedBoxNumbers = json["received_box_numbers"].ToInt();
IsGotSpecialTreasureBox = json["is_got_special_treasure_box"].ToInt() == 1;
}
public void SetGotSpecialTreasureBox(bool isGot)
{
IsGotSpecialTreasureBox = isGot;
}
}

View File

@@ -10,7 +10,6 @@ public class UIAtlasManager
{
public enum AssetBundleNames
{
MypageComon,
Battle,
BattleLang,
Arena,

View File

@@ -106,19 +106,6 @@ public static class UIUtil
}
}
public static bool IsValidIdDigits(string idString, int numOfDigits)
{
if (idString.Length != numOfDigits)
{
return false;
}
if (!int.TryParse(idString, out var result))
{
return false;
}
return result >= 0;
}
public static string CreateListText(IList<string> list, string separator, string header = null, string footer = null)
{
StringBuilder tempStringBuilder = GetTempStringBuilder();