Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuubari committed May 18, 2015
2 parents ae599d6 + 0aba91a commit b27ec11
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.7.0.0")]
[assembly: AssemblyVersion("3.8.0.0")]
3 changes: 2 additions & 1 deletion Grabacr07.KanColleViewer/readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
����������������������������������������������������������������������
��‹Ƃ��Z�����I (KanColleViewer)
version 3.7 2015/05/03
version 3.8 2015/05/18
����������������������������������������������������������������������


Expand Down Expand Up @@ -80,6 +80,7 @@ C# + WPF

���X�V����

2015/05/18 - version 3.8 �����[�X
2015/05/03 - version 3.7 �����[�X
2015/02/07 - version 3.5 �����[�X
2014/09/26 - version 3.4 �����[�X
Expand Down
8 changes: 8 additions & 0 deletions Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ public IObservable<Session> api_get_member_questlist
get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_get_member/questlist"); }
}

/// <summary>
/// エンド ポイント "/kcsapi/api_get_member/ship_deck" からのセッションを配信します。
/// </summary>
public IObservable<Session> api_get_member_ship_deck
{
get { return this.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_get_member/ship_deck"); }
}

/// <summary>
/// エンド ポイント "/kcsapi/api_req_hensei/change" からのセッションを配信します。
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions Grabacr07.KanColleWrapper/KanColleProxy.Endpoints.tt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"/kcsapi/api_get_member/kdock",
"/kcsapi/api_get_member/material",
"/kcsapi/api_get_member/questlist",
"/kcsapi/api_get_member/ship_deck",
"/kcsapi/api_req_hensei/change",
"/kcsapi/api_req_hokyu/charge",
"/kcsapi/api_req_kaisou/powerup",
Expand Down
1 change: 1 addition & 0 deletions Grabacr07.KanColleWrapper/KanColleWrapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
<Compile Include="Models\ConditionRejuvenatedEventArgs.cs" />
<Compile Include="Models\CreatedSlotItem.cs" />
<Compile Include="Models\FleetCondition.cs" />
<Compile Include="Models\Raw\kcsapi_ship_deck.cs" />
<Compile Include="Models\Raw\kcsapi_mst_maparea.cs" />
<Compile Include="Models\Raw\kcsapi_mst_mapinfo.cs" />
<Compile Include="Models\Raw\kcsapi_remodel_slot.cs" />
Expand Down
13 changes: 13 additions & 0 deletions Grabacr07.KanColleWrapper/Models/Raw/kcsapi_ship_deck.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;

namespace Grabacr07.KanColleWrapper.Models.Raw
{
// ReSharper disable InconsistentNaming

public class kcsapi_ship_deck
{
public kcsapi_ship2[] api_ship_data { get; set; }
public kcsapi_deck[] api_deck_data { get; set; }
}
}
24 changes: 23 additions & 1 deletion Grabacr07.KanColleWrapper/Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public Organization(Homeport parent, KanColleProxy proxy)

proxy.api_get_member_deck.TryParse<kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
proxy.api_get_member_deck_port.TryParse<kcsapi_deck[]>().Subscribe(x => this.Update(x.Data));
proxy.api_get_member_ship_deck.TryParse<kcsapi_ship_deck>().Subscribe(x => this.Update(x.Data));

proxy.api_req_hensei_change.TryParse().Subscribe(this.Change);
proxy.api_req_hokyu_charge.TryParse<kcsapi_charge>().Subscribe(x => this.Charge(x.Data));
Expand Down Expand Up @@ -415,7 +416,7 @@ private void SubscribeSortieSessions(KanColleProxy proxy)
this.towShipIds.Add(towOfferedShipIds[0]);
}
});
proxy.api_get_member_ship2
proxy.api_get_member_ship_deck
.Subscribe(_ =>
{
evacuationOfferedShipIds = null;
Expand Down Expand Up @@ -459,6 +460,27 @@ private void Homing()
}
}

private void Update(kcsapi_ship_deck source)
{
if (source.api_deck_data != null)
{
foreach (var deck in source.api_deck_data)
{
var target = this.Fleets[deck.api_id];
target.Update(deck);
}
}

if (source.api_ship_data != null)
{
foreach (var ship in source.api_ship_data)
{
var target = this.Ships[ship.api_id];
target.Update(ship);
}
}
}

#endregion
}
}

0 comments on commit b27ec11

Please sign in to comment.