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.
This commit is contained in:
59
SVSim.BattleEngine/Engine/Wizard/RankBattleDoMatchingTask.cs
Normal file
59
SVSim.BattleEngine/Engine/Wizard/RankBattleDoMatchingTask.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class RankBattleDoMatchingTask : 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 RankBattleDoMatchingTask()
|
||||
{
|
||||
switch (Data.CurrentFormat)
|
||||
{
|
||||
case Format.Rotation:
|
||||
base.type = ApiType.Type.RankBattleDoMatchingRotation;
|
||||
break;
|
||||
case Format.Unlimited:
|
||||
base.type = ApiType.Type.RankBattleDoMatchingUnlimited;
|
||||
break;
|
||||
case Format.Crossover:
|
||||
base.type = ApiType.Type.RankBattleDoMatchingCrossover;
|
||||
break;
|
||||
default:
|
||||
Debug.LogError("UnknownFormat:" + Data.CurrentFormat);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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"];
|
||||
Data.DoMatchingDetail.data.SetWinnerRewardInfo(jsonData.ToInt(), jsonData2.ToString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_GRADE, 0);
|
||||
PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_STRING, "");
|
||||
Data.DoMatchingDetail.data.ClearWinnerRewardInfo();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user