Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/TwoPickDoMatchingTask.cs
gamer147 824309ec44 feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the
AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed
the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
2026-06-05 20:30:59 -04:00

54 lines
1.5 KiB
C#

using LitJson;
namespace Wizard.Scripts.Network.Task.Arena.TwoPick;
public class TwoPickDoMatchingTask : DoMatchingBase
{
private const string DATA = "data";
private const string DISCOVERED_REWAED = "discovered_reward";
private const string GRADE_ID = "grade_id";
private const string REWARD_MESSAGE = "reward_message";
public TwoPickDoMatchingTask()
{
base.type = ApiType.Type.ArenaTwoPickDoMatching;
if (GameMgr.GetIns().GetDataMgr().TwoPickFormat == TwoPickFormat.Chaos)
{
base.type = ApiType.Type.ArenaTwoPickChaosDoMatching;
}
if (GameMgr.GetIns().GetDataMgr().TwoPickFormat == TwoPickFormat.Cube)
{
base.type = ApiType.Type.ArenaTwoPickCubeDoMatching;
}
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
SettingDoMatchingData();
if (base.ResponseData["data"].Keys.Contains("discovered_reward"))
{
if (base.ResponseData["data"]["discovered_reward"].Keys.Contains("grade_id"))
{
JsonData jsonData = base.ResponseData["data"]["discovered_reward"]["grade_id"];
JsonData jsonData2 = base.ResponseData["data"]["discovered_reward"]["reward_message"];
Wizard.Data.DoMatchingDetail.data.SetWinnerRewardInfo(jsonData.ToInt(), jsonData2.ToString());
}
}
else
{
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_GRADE, 0);
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_STRING, "");
Wizard.Data.DoMatchingDetail.data.ClearWinnerRewardInfo();
}
return num;
}
}