public static string[] fgo_battleresult(string uid, BattleInfo bi) { var table = new Hashtable { { "ac", "action" }, { "key", "battleresult" }, { "deviceid", FgoMain.get_device_id() }, { "os", FgoMain.get_os() }, { "ptype", FgoMain.get_ptype() }, { "usk", FgoMain.get_usk(uid) }, { "umk", "" }, { "rgsid", 1001 }, { "rkchannel", FgoMain.get_rkchannel() }, { "raidResult", "[]" }, { "superBossResult", "[]" }, { "result", "{\"battleId\":" + bi.battleId + ",\"battleResult\":1,\"scores\":\"\",\"action\":\"\",\"elapsedTurn\":" + new Random().Next(5, 10) + ",\"aliveUniqueIds\":[],\"battleStatus\":" + FgoMain.calc_battleStatus(uid, bi.battleId) + ",\"voicePlayedList\":\"[]\"}" }, { "userId", uid }, { "appVer", FgoMain.get_game_version() }, { "dateVer", FgoMain.get_date_ver() }, { "lastAccessTime", FgoMain.get_timestamp_fgo() }, { "try", "" }, { "developmentAuthCode", FgoMain.get_developmentAuthCode() }, { "userAgent", 1 }, { "isBattleError", 0 }, { "dataVer", FgoMain.get_data_ver() } }; var response = JObject.Parse(FgoMain.convert_response(NetworkAPI.CreatePostHttpResponse(FgoMain.get_main_address("ac"), table))); var resCode = FgoMain.parse_rescode(response); var usk = ""; if (response["response"][0]["usk"] != null) { usk = response["response"][0]["usk"].ToString(); FgoMain.calc_usk(uid, usk); } if (resCode != "00") { return(new string[3] { resCode, response["response"][0]["fail"]["title"].ToString(), response["response"][0]["fail"]["detail"].ToString() }); } return(new string[1] { "00" }); }