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:
@@ -0,0 +1,53 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class PracticePuzzleBattleFinish : BaseTask
|
||||
{
|
||||
public class PracticePuzzleBattleFinishParam : BaseParam
|
||||
{
|
||||
public int puzzle_id;
|
||||
|
||||
public int retry_count;
|
||||
|
||||
public bool is_win;
|
||||
}
|
||||
|
||||
public PracticePuzzleBattleFinish()
|
||||
{
|
||||
base.type = ApiType.Type.PracticePuzzleBattleFinish;
|
||||
}
|
||||
|
||||
public void SetParameter(int puzzleId, int retryCount, bool isWin)
|
||||
{
|
||||
PracticePuzzleBattleFinishParam practicePuzzleBattleFinishParam = new PracticePuzzleBattleFinishParam();
|
||||
practicePuzzleBattleFinishParam.puzzle_id = puzzleId;
|
||||
practicePuzzleBattleFinishParam.retry_count = retryCount;
|
||||
practicePuzzleBattleFinishParam.is_win = isWin;
|
||||
base.Params = practicePuzzleBattleFinishParam;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
DeleteRecoveryFileIfBattleAlreadyEnded(num);
|
||||
return num;
|
||||
}
|
||||
Data.PracticePuzzleFinishData = new PracticePuzzleFinishData();
|
||||
Data.PracticePuzzleFinishData._responseData = base.ResponseData;
|
||||
Data.PracticePuzzleFinishData.class_chara_experience = 0;
|
||||
Data.PracticePuzzleFinishData.class_chara_level = 0;
|
||||
Data.PracticePuzzleFinishData.get_class_chara_experience = base.ResponseData["data"]["get_class_experience"].ToInt();
|
||||
Data.PracticePuzzleFinishData.class_chara_experience = base.ResponseData["data"]["class_experience"].ToInt();
|
||||
Data.PracticePuzzleFinishData.class_chara_level = base.ResponseData["data"]["class_level"].ToInt();
|
||||
JsonData jsonData = base.ResponseData["data"]["achieved_info"];
|
||||
if (jsonData.GetJsonType() == JsonType.Object)
|
||||
{
|
||||
Data.PracticePuzzleFinishData.AchievedInfo.Read(jsonData);
|
||||
}
|
||||
PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(base.ResponseData["data"]["reward_list"]);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user