diff --git a/source/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs b/source/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs index fda367d66..2e8eb1ee8 100644 --- a/source/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs +++ b/source/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs @@ -15,4 +15,4 @@ ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] -[assembly: AssemblyVersion("4.2.3.0")] +[assembly: AssemblyVersion("4.2.4.0")] diff --git a/source/Grabacr07.KanColleWrapper/KanColleClient.cs b/source/Grabacr07.KanColleWrapper/KanColleClient.cs index bfe39327b..4acbeccae 100644 --- a/source/Grabacr07.KanColleWrapper/KanColleClient.cs +++ b/source/Grabacr07.KanColleWrapper/KanColleClient.cs @@ -100,14 +100,15 @@ private KanColleClient() public void Initialieze() { var proxy = this.Proxy ?? (this.Proxy = new KanColleProxy()); - var basic = proxy.api_get_member_basic.TryParse().FirstAsync().ToTask(); - var kdock = proxy.api_get_member_kdock.TryParse().FirstAsync().ToTask(); - var sitem = proxy.api_get_member_slot_item.TryParse().FirstAsync().ToTask(); + var requireInfo = proxy.api_get_member_require_info.TryParse().FirstAsync().ToTask(); + //var basic = proxy.api_get_member_basic.TryParse().FirstAsync().ToTask(); + //var kdock = proxy.api_get_member_kdock.TryParse().FirstAsync().ToTask(); + //var sitem = proxy.api_get_member_slot_item.TryParse().FirstAsync().ToTask(); proxy.api_start2.FirstAsync().Subscribe(async session => { var timeout = Task.Delay(TimeSpan.FromSeconds(20)); - var canInitialize = await Task.WhenAny(new Task[] { basic, kdock, sitem }.WhenAll(), timeout) != timeout; + var canInitialize = await Task.WhenAny(new Task[] { requireInfo }.WhenAll(), timeout) != timeout; // タイムアウト仕掛けてるのは、今後のアップデートで basic, kdock, slot_item のいずれかが来なくなったときに // 起動できなくなる (IsStarted を true にできなくなる) のを防ぐため @@ -122,9 +123,10 @@ public void Initialieze() if (canInitialize) { - this.Homeport.UpdateAdmiral((await basic).Data); - this.Homeport.Itemyard.Update((await sitem).Data); - this.Homeport.Dockyard.Update((await kdock).Data); + var data = await requireInfo; + this.Homeport.UpdateAdmiral(data.Data.api_basic); + this.Homeport.Itemyard.Update(data.Data.api_slot_item); + this.Homeport.Dockyard.Update(data.Data.api_kdock); } this.IsStarted = true; diff --git a/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs b/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs index 8c946dd5b..118a2c0fc 100644 --- a/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs +++ b/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs @@ -350,5 +350,13 @@ public IObservable api_req_combined_battle_goback_port get { return this.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_combined_battle/goback_port"); } } + /// + /// エンド ポイント "/kcsapi/api_get_member/require_info" からのセッションを配信します。 + /// + public IObservable api_get_member_require_info + { + get { return this.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_get_member/require_info"); } + } + } } diff --git a/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt b/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt index 6d44484ff..b889642b7 100644 --- a/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt +++ b/source/Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt @@ -50,6 +50,7 @@ "/kcsapi/api_req_combined_battle/airbattle", "/kcsapi/api_req_combined_battle/battleresult", "/kcsapi/api_req_combined_battle/goback_port", + "/kcsapi/api_get_member/require_info", }; #> // diff --git a/source/Grabacr07.KanColleWrapper/KanColleWrapper.csproj b/source/Grabacr07.KanColleWrapper/KanColleWrapper.csproj index 99fb412f3..a3d67fc32 100644 --- a/source/Grabacr07.KanColleWrapper/KanColleWrapper.csproj +++ b/source/Grabacr07.KanColleWrapper/KanColleWrapper.csproj @@ -117,6 +117,7 @@ + diff --git a/source/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_require_info.cs b/source/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_require_info.cs new file mode 100644 index 000000000..34a57097a --- /dev/null +++ b/source/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_require_info.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Grabacr07.KanColleWrapper.Models.Raw +{ + public class kcsapi_require_info + { + public kcsapi_basic api_basic { get; set; } + public kcsapi_slotitem[] api_slot_item { get; set; } + //public Api_Unsetslot api_unsetslot { get; set; } + public kcsapi_kdock[] api_kdock { get; set; } + public kcsapi_useitem[] api_useitem { get; set; } + //public Api_Furniture[] api_furniture { get; set; } + } +} diff --git a/source/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs b/source/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs index 2a55f9794..729f59846 100644 --- a/source/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs +++ b/source/Grabacr07.KanColleWrapper/Models/Raw/kcsapi_start2.cs @@ -97,7 +97,7 @@ public class Api_Mst_Shipgraph public int api_id { get; set; } public int api_sortno { get; set; } public string api_filename { get; set; } - public string api_version { get; set; } + //public string api_version { get; set; } public int[] api_boko_n { get; set; } public int[] api_boko_d { get; set; } public int[] api_kaisyu_n { get; set; } @@ -228,7 +228,7 @@ public class Api_Mst_Furnituregraph public int api_type { get; set; } public int api_no { get; set; } public string api_filename { get; set; } - public string api_version { get; set; } + //public string api_version { get; set; } } public class Api_Mst_Useitem diff --git a/source/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs b/source/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs index 8d6ac266b..766a2ab93 100644 --- a/source/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs +++ b/source/Grabacr07.KanColleWrapper/Properties/AssemblyInfo.cs @@ -10,5 +10,5 @@ [assembly: ComVisible(false)] [assembly: Guid("8A13AB28-4E9F-423D-80AD-23EEF2821959")] -[assembly: AssemblyVersion("1.5.0")] -[assembly: AssemblyInformationalVersion("1.5.0")] +[assembly: AssemblyVersion("1.5.1")] +[assembly: AssemblyInformationalVersion("1.5.1")] diff --git a/source/Tools/Grabacr07.Tools.JsonViewer/App.config b/source/Tools/Grabacr07.Tools.JsonViewer/App.config index b71194fb8..deaa9e274 100644 --- a/source/Tools/Grabacr07.Tools.JsonViewer/App.config +++ b/source/Tools/Grabacr07.Tools.JsonViewer/App.config @@ -1,6 +1,6 @@ - + - + diff --git a/source/Tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj b/source/Tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj index 996449abb..618b865d0 100644 --- a/source/Tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj +++ b/source/Tools/Grabacr07.Tools.JsonViewer/JsonViewer.csproj @@ -9,7 +9,7 @@ Properties Grabacr07.Tools.JsonViewer Grabacr07.Tools.JsonViewer - v4.5 + v4.6 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4